diff --git a/.travis.yml b/.travis.yml index 578df911eb..4a62227ecd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,6 @@ notifications: email: false before_install: npm config set progress=false && npm i -g npm@latest --no-audit install: npm ci --no-audit -cache: - directories: - - node_modules jobs: include: - node_js: lts/* diff --git a/cli/asc.js b/cli/asc.js index 151a6c1322..61f6601ae5 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -387,11 +387,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.libraryFiles["runtime/" + 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; @@ -431,8 +454,8 @@ exports.main = function main(argv, options, callback) { // Initialize default aliases assemblyscript.setGlobalAlias(compilerOptions, "Math", "NativeMath"); assemblyscript.setGlobalAlias(compilerOptions, "Mathf", "NativeMathf"); - assemblyscript.setGlobalAlias(compilerOptions, "abort", "~lib/env/abort"); - assemblyscript.setGlobalAlias(compilerOptions, "trace", "~lib/env/trace"); + assemblyscript.setGlobalAlias(compilerOptions, "abort", "~lib/builtins/abort"); + assemblyscript.setGlobalAlias(compilerOptions, "trace", "~lib/builtins/trace"); } // Add or override aliases if specified @@ -463,15 +486,13 @@ exports.main = function main(argv, options, callback) { var module; stats.compileCount++; - (() => { - try { - stats.compileTime += measure(() => { - module = assemblyscript.compileProgram(program, compilerOptions); - }); - } catch (e) { - return callback(e); - } - })(); + try { + stats.compileTime += measure(() => { + module = assemblyscript.compileProgram(program, compilerOptions); + }); + } catch (e) { + return callback(e); + } if (checkDiagnostics(parser, stderr)) { if (module) module.dispose(); return callback(Error("Compile error")); diff --git a/cli/asc.json b/cli/asc.json index 523d2416f9..76be15b213 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.", + "", + " none No allocator/GC or compose your own. [default]", + " trace TLSF memory allocator and ITCM garbage collector.", + " arena Just the arena memory allocator. No free/GC.", + "" + ], + "type": "s", + "default": "none" + }, "debug": { "description": "Enables debug information in emitted binaries.", "type": "b", diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index 7178bc54c3..17c21d1b0a 100644 Binary files a/examples/game-of-life/build/optimized.wasm and b/examples/game-of-life/build/optimized.wasm differ diff --git a/examples/game-of-life/build/optimized.wat b/examples/game-of-life/build/optimized.wat index a9e5754338..b8ed6f9532 100644 --- a/examples/game-of-life/build/optimized.wat +++ b/examples/game-of-life/build/optimized.wat @@ -8,13 +8,10 @@ (import "config" "BGR_ALIVE" (global $assembly/config/BGR_ALIVE i32)) (import "config" "BIT_ROT" (global $assembly/config/BIT_ROT i32)) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $assembly/index/w (mut i32) (i32.const 0)) (global $assembly/index/h (mut i32) (i32.const 0)) (global $assembly/index/s (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "fill" (func $assembly/index/fill)) @@ -136,7 +133,7 @@ local.get $7 local.get $1 select - local.tee $2 + local.tee $3 global.get $assembly/index/w local.get $4 i32.mul @@ -165,7 +162,7 @@ local.get $7 i32.eq select - local.tee $3 + local.tee $2 global.get $assembly/index/w local.get $4 i32.mul @@ -179,7 +176,7 @@ global.get $assembly/index/w local.get $0 i32.mul - local.get $2 + local.get $3 i32.add i32.const 2 i32.shl @@ -190,7 +187,7 @@ global.get $assembly/index/w local.get $0 i32.mul - local.get $3 + local.get $2 i32.add i32.const 2 i32.shl @@ -201,7 +198,7 @@ global.get $assembly/index/w local.get $5 i32.mul - local.get $2 + local.get $3 i32.add i32.const 2 i32.shl @@ -223,7 +220,7 @@ global.get $assembly/index/w local.get $5 i32.mul - local.get $3 + local.get $2 i32.add i32.const 2 i32.shl diff --git a/examples/game-of-life/build/untouched.wat b/examples/game-of-life/build/untouched.wat index c8a5ebf3cb..64f056fc06 100644 --- a/examples/game-of-life/build/untouched.wat +++ b/examples/game-of-life/build/untouched.wat @@ -13,9 +13,7 @@ (global $assembly/index/w (mut i32) (i32.const 0)) (global $assembly/index/h (mut i32) (i32.const 0)) (global $assembly/index/s (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "fill" (func $assembly/index/fill)) @@ -53,7 +51,7 @@ br_if $break|1 block $assembly/index/set|inlined.0 local.get $3 - local.set $4 + local.set $6 local.get $2 local.set $5 call $~lib/bindings/Math/random @@ -68,17 +66,17 @@ i32.const -16777216 i32.or end - local.set $6 + local.set $4 global.get $assembly/index/s local.get $5 global.get $assembly/index/w i32.mul i32.add - local.get $4 + local.get $6 i32.add i32.const 2 i32.shl - local.get $6 + local.get $4 i32.store end local.get $3 @@ -192,13 +190,13 @@ local.set $7 block $assembly/index/get|inlined.0 (result i32) local.get $6 - local.set $8 - local.get $3 local.set $9 - local.get $9 + local.get $3 + local.set $8 + local.get $8 global.get $assembly/index/w i32.mul - local.get $8 + local.get $9 i32.add i32.const 2 i32.shl @@ -225,13 +223,13 @@ i32.add block $assembly/index/get|inlined.2 (result i32) local.get $7 - local.set $8 - local.get $3 local.set $9 - local.get $9 + local.get $3 + local.set $8 + local.get $8 global.get $assembly/index/w i32.mul - local.get $8 + local.get $9 i32.add i32.const 2 i32.shl @@ -259,13 +257,13 @@ i32.add block $assembly/index/get|inlined.4 (result i32) local.get $7 - local.set $8 - local.get $2 local.set $9 - local.get $9 + local.get $2 + local.set $8 + local.get $8 global.get $assembly/index/w i32.mul - local.get $8 + local.get $9 i32.add i32.const 2 i32.shl @@ -293,13 +291,13 @@ i32.add block $assembly/index/get|inlined.6 (result i32) local.get $5 - local.set $8 - local.get $4 local.set $9 - local.get $9 + local.get $4 + local.set $8 + local.get $8 global.get $assembly/index/w i32.mul - local.get $8 + local.get $9 i32.add i32.const 2 i32.shl @@ -328,20 +326,20 @@ local.set $8 block $assembly/index/get|inlined.8 (result i32) local.get $5 - local.set $9 - local.get $2 local.set $10 - local.get $10 + local.get $2 + local.set $9 + local.get $9 global.get $assembly/index/w i32.mul - local.get $9 + local.get $10 i32.add i32.const 2 i32.shl i32.load end - local.set $10 - local.get $10 + local.set $9 + local.get $9 i32.const 1 i32.and if @@ -352,12 +350,12 @@ i32.eq if local.get $5 - local.set $9 + local.set $12 local.get $2 local.set $11 + local.get $9 + local.set $10 local.get $10 - local.set $12 - local.get $12 i32.const 24 i32.shr_u global.get $assembly/config/BIT_ROT @@ -371,24 +369,20 @@ select local.set $13 block $assembly/index/set|inlined.1 - local.get $9 - local.set $14 - local.get $11 - local.set $15 local.get $13 i32.const 24 i32.shl - local.get $12 + local.get $10 i32.const 16777215 i32.and i32.or local.set $16 global.get $assembly/index/s - local.get $15 + local.get $11 global.get $assembly/index/w i32.mul i32.add - local.get $14 + local.get $12 i32.add i32.const 2 i32.shl @@ -397,23 +391,23 @@ end else local.get $5 - local.set $13 + local.set $11 local.get $2 - local.set $12 + local.set $10 global.get $assembly/config/BGR_DEAD i32.const -16777216 i32.or - local.set $11 + local.set $13 global.get $assembly/index/s - local.get $12 + local.get $10 global.get $assembly/index/w i32.mul i32.add - local.get $13 + local.get $11 i32.add i32.const 2 i32.shl - local.get $11 + local.get $13 i32.store end else @@ -424,13 +418,13 @@ local.get $5 local.set $11 local.get $2 - local.set $12 + local.set $10 global.get $assembly/config/BGR_ALIVE i32.const -16777216 i32.or local.set $13 global.get $assembly/index/s - local.get $12 + local.get $10 global.get $assembly/index/w i32.mul i32.add @@ -442,43 +436,39 @@ i32.store else local.get $5 - local.set $13 - local.get $2 - local.set $12 - local.get $10 local.set $11 - local.get $11 + local.get $2 + local.set $10 + local.get $9 + local.set $13 + local.get $13 i32.const 24 i32.shr_u global.get $assembly/config/BIT_ROT i32.sub - local.tee $9 + local.tee $12 i32.const 0 local.tee $16 - local.get $9 + local.get $12 local.get $16 i32.gt_s select - local.set $9 + local.set $12 block $assembly/index/set|inlined.4 - local.get $13 - local.set $16 local.get $12 - local.set $15 - local.get $9 i32.const 24 i32.shl - local.get $11 + local.get $13 i32.const 16777215 i32.and i32.or local.set $14 global.get $assembly/index/s - local.get $15 + local.get $10 global.get $assembly/index/w i32.mul i32.add - local.get $16 + local.get $11 i32.add i32.const 2 i32.shl @@ -527,23 +517,23 @@ f64.lt if local.get $3 - local.set $4 + local.set $6 local.get $1 local.set $5 global.get $assembly/config/BGR_ALIVE i32.const -16777216 i32.or - local.set $6 + local.set $4 global.get $assembly/index/s local.get $5 global.get $assembly/index/w i32.mul i32.add - local.get $4 + local.get $6 i32.add i32.const 2 i32.shl - local.get $6 + local.get $4 i32.store end local.get $3 diff --git a/examples/i64-polyfill/build/optimized.wat b/examples/i64-polyfill/build/optimized.wat index ad28e90a41..3c44151e21 100644 --- a/examples/i64-polyfill/build/optimized.wat +++ b/examples/i64-polyfill/build/optimized.wat @@ -4,12 +4,9 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $assembly/i64/lo (mut i32) (i32.const 0)) (global $assembly/i64/hi (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getLo" (func $assembly/i64/getLo)) (export "getHi" (func $assembly/i64/getHi)) (export "clz" (func $assembly/i64/clz)) diff --git a/examples/i64-polyfill/build/untouched.wat b/examples/i64-polyfill/build/untouched.wat index c90ef2b171..75dce31faf 100644 --- a/examples/i64-polyfill/build/untouched.wat +++ b/examples/i64-polyfill/build/untouched.wat @@ -8,9 +8,7 @@ (elem (i32.const 0) $null) (global $assembly/i64/lo (mut i32) (i32.const 0)) (global $assembly/i64/hi (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getLo" (func $assembly/i64/getLo)) (export "getHi" (func $assembly/i64/getHi)) (export "clz" (func $assembly/i64/clz)) diff --git a/examples/mandelbrot/assembly/index.ts b/examples/mandelbrot/assembly/index.ts index b7f2bb811e..30328077c0 100644 --- a/examples/mandelbrot/assembly/index.ts +++ b/examples/mandelbrot/assembly/index.ts @@ -43,7 +43,7 @@ export function computeLine(y: u32, width: u32, height: u32, limit: u32): void { let sqd = ix * ix + iy * iy; if (sqd > 1.0) { let frac = Math.log2(0.5 * Math.log(sqd)); - col = ((NUM_COLORS - 1) * clamp((iteration + 1 - frac) * invLimit, 0.0, 1.0)); + col = ((NUM_COLORS - 1) * clamp((iteration + 1 - frac) * invLimit, 0.0, 1.0)); } store(stride + (x << 1), col); } diff --git a/examples/mandelbrot/build/optimized.d.ts b/examples/mandelbrot/build/optimized.d.ts index 58fe356b06..820085f607 100644 --- a/examples/mandelbrot/build/optimized.d.ts +++ b/examples/mandelbrot/build/optimized.d.ts @@ -14,6 +14,5 @@ declare module ASModule { } var NUM_COLORS: i32; function computeLine(y: u32, width: u32, height: u32, limit: u32): void; - function clamp(value: f64, minValue: f64, maxValue: f64): f64; } export default ASModule; diff --git a/examples/mandelbrot/build/optimized.wasm b/examples/mandelbrot/build/optimized.wasm index 3439f6160b..4857d3a4b3 100644 Binary files a/examples/mandelbrot/build/optimized.wasm and b/examples/mandelbrot/build/optimized.wasm differ diff --git a/examples/mandelbrot/build/optimized.wat b/examples/mandelbrot/build/optimized.wat index 2936b04384..026da996c8 100644 --- a/examples/mandelbrot/build/optimized.wat +++ b/examples/mandelbrot/build/optimized.wat @@ -5,52 +5,51 @@ (import "env" "memory" (memory $0 0)) (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) (import "Math" "log2" (func $~lib/bindings/Math/log2 (param f64) (result f64))) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "computeLine" (func $assembly/index/computeLine)) (func $assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) (local $7 i32) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) (local $11 f64) (local $12 f64) (local $13 f64) (local $14 f64) - f64.const 10 - f64.const 3 + (local $15 f64) local.get $1 f64.convert_i32_u - local.tee $8 - f64.mul - f64.const 4 - local.get $2 - f64.convert_i32_u - local.tee $4 + local.tee $9 + f64.const 0.625 f64.mul - f64.min - f64.div - local.set $9 + local.set $4 local.get $0 f64.convert_i32_u - local.get $4 + local.get $2 + f64.convert_i32_u + local.tee $6 f64.const 0.5 f64.mul f64.sub + f64.const 10 + f64.const 3 local.get $9 f64.mul - local.set $10 - local.get $8 - f64.const 0.625 + f64.const 4 + local.get $6 f64.mul - local.get $9 + f64.min + f64.div + local.tee $10 f64.mul - local.set $12 + local.set $11 + local.get $4 + local.get $10 + f64.mul + local.set $13 local.get $0 local.get $1 i32.mul @@ -62,34 +61,35 @@ f64.convert_i32_u local.tee $6 f64.div - local.set $13 + local.set $14 f64.const 8 local.get $6 f64.min - local.set $8 + local.set $15 loop $repeat|0 - local.get $7 - local.get $1 - i32.lt_u - if - local.get $7 + block $break|0 + local.get $8 + local.get $1 + i32.ge_u + br_if $break|0 + local.get $8 f64.convert_i32_u - local.get $9 + local.get $10 f64.mul - local.get $12 + local.get $13 f64.sub - local.set $11 + local.set $12 f64.const 0 local.set $4 f64.const 0 local.set $5 i32.const 0 - local.set $2 + local.set $7 loop $continue|1 local.get $4 local.get $4 f64.mul - local.tee $14 + local.tee $9 local.get $5 local.get $5 f64.mul @@ -104,31 +104,31 @@ f64.mul local.get $5 f64.mul - local.get $10 + local.get $11 f64.add local.set $5 - local.get $14 + local.get $9 local.get $6 f64.sub - local.get $11 + local.get $12 f64.add local.set $4 - local.get $2 + local.get $7 local.get $3 i32.ge_u br_if $break|1 - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $continue|1 end end end loop $continue|2 - local.get $2 + local.get $7 f64.convert_i32_u - local.get $8 + local.get $15 f64.lt if local.get $4 @@ -138,7 +138,7 @@ local.get $5 f64.mul f64.sub - local.get $11 + local.get $12 f64.add local.set $6 f64.const 2 @@ -146,19 +146,21 @@ f64.mul local.get $5 f64.mul - local.get $10 + local.get $11 f64.add local.set $5 local.get $6 local.set $4 - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $continue|2 end end - local.get $7 + i32.const 2047 + local.set $2 + local.get $8 i32.const 1 i32.shl local.get $0 @@ -175,7 +177,7 @@ f64.gt if (result i32) f64.const 2047 - local.get $2 + local.get $7 i32.const 1 i32.add f64.convert_i32_u @@ -185,7 +187,7 @@ f64.mul call $~lib/bindings/Math/log2 f64.sub - local.get $13 + local.get $14 f64.mul f64.const 0 f64.max @@ -197,10 +199,10 @@ i32.const 2047 end i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 br $repeat|0 end end diff --git a/examples/mandelbrot/build/untouched.wat b/examples/mandelbrot/build/untouched.wat index db2e3fde91..9b2e60e08f 100644 --- a/examples/mandelbrot/build/untouched.wat +++ b/examples/mandelbrot/build/untouched.wat @@ -1,7 +1,6 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$dddd (func (param f64 f64 f64) (result f64))) (type $FUNCSIG$v (func)) (import "env" "memory" (memory $0 0)) (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) @@ -9,18 +8,9 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $assembly/index/NUM_COLORS i32 (i32.const 2048)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "computeLine" (func $assembly/index/computeLine)) - (func $assembly/index/clamp (; 2 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - local.get $0 - local.get $1 - f64.max - local.get $2 - f64.min - ) - (func $assembly/index/computeLine (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -39,6 +29,9 @@ (local $19 f64) (local $20 i32) (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) local.get $1 f64.convert_i32_u f64.const 1 @@ -222,17 +215,26 @@ i32.const 1 i32.sub f64.convert_i32_s - local.get $18 - i32.const 1 - i32.add - f64.convert_i32_u - local.get $21 - f64.sub - local.get $10 - f64.mul - f64.const 0 - f64.const 1 - call $assembly/index/clamp + block $assembly/index/clamp|inlined.0 (result f64) + local.get $18 + i32.const 1 + i32.add + f64.convert_i32_u + local.get $21 + f64.sub + local.get $10 + f64.mul + local.set $24 + f64.const 0 + local.set $23 + f64.const 1 + local.set $22 + local.get $24 + local.get $23 + f64.max + local.get $22 + f64.min + end f64.mul i32.trunc_f64_u local.set $20 @@ -255,6 +257,6 @@ unreachable end ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 3 ;) (type $FUNCSIG$v) ) ) diff --git a/examples/n-body/assembly/index.js b/examples/n-body/assembly/index.js index 11c076b27a..3f84716427 100644 --- a/examples/n-body/assembly/index.js +++ b/examples/n-body/assembly/index.js @@ -9,7 +9,7 @@ const imports = { env: { memory: new WebAssembly.Memory({ initial: 10 }), abort: (filename, line, column) => { - throw Error("abort called at " + line + ":" + colum); + throw Error("abort called at " + line + ":" + column); } } }; diff --git a/examples/n-body/assembly/index.ts b/examples/n-body/assembly/index.ts index 6f3ea91260..9a37c2d6ae 100644 --- a/examples/n-body/assembly/index.ts +++ b/examples/n-body/assembly/index.ts @@ -96,7 +96,7 @@ class NBodySystem { py += b.vy * m; pz += b.vz * m; } - bodies[0].offsetMomentum(px, py, pz); + unchecked(bodies[0]).offsetMomentum(px, py, pz); } advance(dt: float): void { @@ -206,5 +206,5 @@ export function bench(steps: u32): void { export function getBody(index: i32): Body | null { var bodies = system.bodies; - return index < bodies.length ? bodies[index] : null; + return index < bodies.length ? unchecked(bodies[index]) : null; } diff --git a/examples/n-body/build/index.asm.js b/examples/n-body/build/index.asm.js index 8dd198d0fc..1c85f4bef6 100644 --- a/examples/n-body/build/index.asm.js +++ b/examples/n-body/build/index.asm.js @@ -20,32 +20,45 @@ function asmFunc(global, env, buffer) { var abort = env.abort; var nan = global.NaN; var infinity = global.Infinity; + var assembly_index_system = 0; var $lib_allocator_arena_startOffset = 0; var $lib_allocator_arena_offset = 0; - var assembly_index_system = 0; var i64toi32_i32$HIGH_BITS = 0; - function $lib_allocator_arena___memory_allocate($0) { + function $lib_allocator_arena___mem_allocate($0) { $0 = $0 | 0; var $1 = 0, $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; if ($0 >>> 0 > 1073741824 >>> 0) abort(); $1 = $lib_allocator_arena_offset; - $2 = (($1 + (wasm2js_i32$0 = $0, wasm2js_i32$1 = 1, wasm2js_i32$2 = $0 >>> 0 > 1 >>> 0, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) + 7 | 0) & 4294967288 | 0; - $3 = __wasm_current_memory(); - if ($2 >>> 0 > ($3 << 16 | 0) >>> 0) { - $0 = ((($2 - $1 | 0) + 65535 | 0) & 4294901760 | 0) >>> 16 | 0; - if ((__wasm_grow_memory((wasm2js_i32$0 = $3, wasm2js_i32$1 = $0, wasm2js_i32$2 = ($3 | 0) > ($0 | 0), wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) | 0) < (0 | 0)) if ((__wasm_grow_memory($0 | 0) | 0) < (0 | 0)) abort();; + $0 = (($1 + (wasm2js_i32$0 = $0, wasm2js_i32$1 = 1, wasm2js_i32$2 = $0 >>> 0 > 1 >>> 0, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) + 7 | 0) & 4294967288 | 0; + $2 = __wasm_current_memory(); + if ($0 >>> 0 > ($2 << 16 | 0) >>> 0) { + $3 = ((($0 - $1 | 0) + 65535 | 0) & 4294901760 | 0) >>> 16 | 0; + if ((__wasm_grow_memory((wasm2js_i32$0 = $2, wasm2js_i32$1 = $3, wasm2js_i32$2 = ($2 | 0) > ($3 | 0), wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) | 0) < (0 | 0)) if ((__wasm_grow_memory($3 | 0) | 0) < (0 | 0)) abort();; } - $lib_allocator_arena_offset = $2; + $lib_allocator_arena_offset = $0; return $1 | 0; } + function $lib_util_runtime_allocate($0) { + $0 = $0 | 0; + var $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $1 = $lib_allocator_arena___mem_allocate(1 << (32 - Math_clz32($0 + 15 | 0) | 0) | 0 | 0) | 0; + wasm2js_i32$0 = $1; + wasm2js_i32$1 = 2774420247; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $1; + wasm2js_i32$1 = $0; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + return $1 + 16 | 0 | 0; + } + function assembly_index_NBodySystem_constructor($0) { $0 = $0 | 0; - var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $49 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; - $7 = HEAP32[($0 + 4 | 0) >> 2] | 0; + var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + $7 = HEAP32[($0 + 12 | 0) >> 2] | 0; repeat_0 : do { if (($1 | 0) < ($7 | 0)) { - $2 = HEAPU32[(((HEAPU32[$0 >> 2] | 0) + ($1 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $2 = HEAPU32[((HEAPU32[($0 + 4 | 0) >> 2] | 0) + ($1 << 2 | 0) | 0) >> 2] | 0; $3 = +HEAPF64[($2 + 48 | 0) >> 3]; $4 = $4 + +HEAPF64[($2 + 24 | 0) >> 3] * $3; $5 = $5 + +HEAPF64[($2 + 32 | 0) >> 3] * $3; @@ -55,9 +68,7 @@ function asmFunc(global, env, buffer) { } break repeat_0; } while (1); - $1 = HEAPU32[$0 >> 2] | 0; - if (0 >>> 0 < ((HEAP32[$1 >> 2] | 0) >>> 2 | 0) >>> 0) $49 = HEAPU32[($1 + 8 | 0) >> 2] | 0; else abort(); - $1 = $49; + $1 = HEAPU32[(HEAPU32[($0 + 4 | 0) >> 2] | 0) >> 2] | 0; wasm2js_i32$0 = $1; wasm2js_f64$0 = -$4 / 39.47841760435743; HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; @@ -67,7 +78,10 @@ function asmFunc(global, env, buffer) { wasm2js_i32$0 = $1; wasm2js_f64$0 = -$6 / 39.47841760435743; HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; - $1 = $lib_allocator_arena___memory_allocate(4 | 0) | 0; + $1 = $lib_util_runtime_allocate(4 | 0) | 0; + wasm2js_i32$0 = $1 - 16 | 0; + wasm2js_i32$1 = 17; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $1; wasm2js_i32$1 = $0; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; @@ -82,8 +96,11 @@ function asmFunc(global, env, buffer) { $4 = +$4; $5 = +$5; $6 = +$6; - var $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; - $7 = $lib_allocator_arena___memory_allocate(56 | 0) | 0; + var $7 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_f64$0 = 0.0; + $7 = $lib_util_runtime_allocate(56 | 0) | 0; + wasm2js_i32$0 = $7 - 16 | 0; + wasm2js_i32$1 = 18; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $7; wasm2js_f64$0 = $0; HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; @@ -108,185 +125,61 @@ function asmFunc(global, env, buffer) { return $7 | 0; } - function $lib_internal_memory_memset($0) { - $0 = $0 | 0; - var $1 = 0, $2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - $1 = $0 + 20 | 0; - wasm2js_i32$0 = $1 - 1 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 1 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 2 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 2 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 3 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 3 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 4 | 0; - wasm2js_i32$1 = 0; - HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; - $1 = (0 - $0 | 0) & 3 | 0; - $0 = $1 + $0 | 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $2 = (20 - $1 | 0) & 4294967292 | 0; - wasm2js_i32$0 = ($2 + $0 | 0) - 4 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - if ($2 >>> 0 <= 8 >>> 0) return; - wasm2js_i32$0 = $0 + 4 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 8 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = $0 + $2 | 0; - wasm2js_i32$0 = $1 - 12 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 8 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - if ($2 >>> 0 <= 24 >>> 0) return; - wasm2js_i32$0 = $0 + 12 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 16 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 20 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0 + 24 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = $0 + $2 | 0; - wasm2js_i32$0 = $1 - 28 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 24 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $1 - 20 | 0; - wasm2js_i32$1 = 0; + function $lib_util_runtime_makeArray() { + var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $0 = $lib_util_runtime_allocate(16 | 0) | 0; + wasm2js_i32$0 = $0 - 16 | 0; + wasm2js_i32$1 = 19; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $1 = $lib_util_runtime_allocate(20 | 0) | 0; wasm2js_i32$0 = $1 - 16 | 0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $1 = ($0 & 4 | 0) + 24 | 0; - $0 = $1 + $0 | 0; - $2 = $2 - $1 | 0; - continue_0 : do { - if ($2 >>> 0 >= 32 >>> 0) { - i64toi32_i32$1 = $0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = $0; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 8 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 16 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$1 = $0 + 24 | 0; - i64toi32_i32$0 = 0; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = 0; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - wasm2js_i32$0 = i64toi32_i32$1; - wasm2js_i32$1 = i64toi32_i32$0; - (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; - $2 = $2 - 32 | 0; - $0 = $0 + 32 | 0; - continue continue_0; - } - break continue_0; - } while (1); - } - - function $lib_array_Array_Body__constructor() { - var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - $1 = $lib_allocator_arena___memory_allocate(32 | 0) | 0; - wasm2js_i32$0 = $1; - wasm2js_i32$1 = 20; + wasm2js_i32$1 = 15; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; - $0 = $lib_allocator_arena___memory_allocate(8 | 0) | 0; wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; + wasm2js_i32$1 = $1; HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $0; - wasm2js_i32$1 = 0; + wasm2js_i32$1 = $1; HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $0; - wasm2js_i32$1 = $1; - HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$1 = 20; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; wasm2js_i32$0 = $0; wasm2js_i32$1 = 5; - HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; - $lib_internal_memory_memset($1 + 8 | 0 | 0); + HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; return $0 | 0; } function assembly_index_init() { var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - $1 = $lib_array_Array_Body__constructor() | 0; - $0 = assembly_index_Body_constructor(+(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(39.47841760435743)) | 0; - wasm2js_i32$0 = HEAPU32[$1 >> 2] | 0; - wasm2js_i32$1 = $0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - $0 = assembly_index_Body_constructor(+(4.841431442464721), +(-1.1603200440274284), +(-.10362204447112311), +(.606326392995832), +(2.81198684491626), +(-.02521836165988763), +(.03769367487038949)) | 0; - wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 4 | 0; - wasm2js_i32$1 = $0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - $0 = assembly_index_Body_constructor(+(8.34336671824458), +(4.124798564124305), +(-.4035234171143214), +(-1.0107743461787924), +(1.8256623712304119), +(.008415761376584154), +(.011286326131968767)) | 0; - wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 8 | 0; - wasm2js_i32$1 = $0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - $0 = assembly_index_Body_constructor(+(12.894369562139131), +(-15.111151401698631), +(-.22330757889265573), +(1.0827910064415354), +(.8687130181696082), +(-.010832637401363636), +(1.7237240570597112e-03)) | 0; - wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 12 | 0; - wasm2js_i32$1 = $0; - HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; - $0 = assembly_index_Body_constructor(+(15.379697114850917), +(-25.919314609987964), +(.17925877295037118), +(.979090732243898), +(.5946989986476762), +(-.034755955504078104), +(2.0336868699246304e-03)) | 0; - wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 16 | 0; - wasm2js_i32$1 = $0; + $1 = $lib_util_runtime_makeArray() | 0; + $0 = HEAPU32[($1 + 4 | 0) >> 2] | 0; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(39.47841760435743)) | 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(4.841431442464721), +(-1.1603200440274284), +(-.10362204447112311), +(.606326392995832), +(2.81198684491626), +(-.02521836165988763), +(.03769367487038949)) | 0; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(8.34336671824458), +(4.124798564124305), +(-.4035234171143214), +(-1.0107743461787924), +(1.8256623712304119), +(.008415761376584154), +(.011286326131968767)) | 0; HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(12.894369562139131), +(-15.111151401698631), +(-.22330757889265573), +(1.0827910064415354), +(.8687130181696082), +(-.010832637401363636), +(1.7237240570597112e-03)) | 0; + HEAP32[(wasm2js_i32$0 + 12 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = assembly_index_Body_constructor(+(15.379697114850917), +(-25.919314609987964), +(.17925877295037118), +(.979090732243898), +(.5946989986476762), +(-.034755955504078104), +(2.0336868699246304e-03)) | 0; + HEAP32[(wasm2js_i32$0 + 16 | 0) >> 2] = wasm2js_i32$1; assembly_index_system = assembly_index_NBodySystem_constructor($1 | 0) | 0; } function assembly_index_NBodySystem_advance($0) { $0 = $0 | 0; - var $1 = 0, $2 = 0.0, $8 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $18 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; + var $1 = 0, $2 = 0.0, $8 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $107 = 0.0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; $12 = HEAPU32[$0 >> 2] | 0; - $13 = HEAP32[($12 + 4 | 0) >> 2] | 0; + $13 = HEAP32[($12 + 12 | 0) >> 2] | 0; repeat_0 : do { if ($3 >>> 0 < $13 >>> 0) { - $0 = HEAPU32[(((HEAPU32[$12 >> 2] | 0) + ($3 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $0 = HEAPU32[((HEAPU32[($12 + 4 | 0) >> 2] | 0) + ($3 << 2 | 0) | 0) >> 2] | 0; $14 = +HEAPF64[$0 >> 3]; $15 = +HEAPF64[($0 + 8 | 0) >> 3]; $16 = +HEAPF64[($0 + 16 | 0) >> 3]; @@ -297,9 +190,8 @@ function asmFunc(global, env, buffer) { $7 = $3 + 1 | 0; repeat_1 : do { if ($7 >>> 0 < $13 >>> 0) { - $1 = HEAPU32[(((HEAPU32[$12 >> 2] | 0) + ($7 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; - $18 = $14 - +HEAPF64[$1 >> 3]; - $2 = $18; + $1 = HEAPU32[((HEAPU32[($12 + 4 | 0) >> 2] | 0) + ($7 << 2 | 0) | 0) >> 2] | 0; + $2 = $14 - +HEAPF64[$1 >> 3]; $9 = $15 - +HEAPF64[($1 + 8 | 0) >> 3]; $10 = $16 - +HEAPF64[($1 + 16 | 0) >> 3]; $8 = $2 * $2 + $9 * $9 + $10 * $10; @@ -309,9 +201,10 @@ function asmFunc(global, env, buffer) { $4 = $4 - $2 * $8; $5 = $5 - $9 * $8; $6 = $6 - $10 * $8; + $107 = $2; $2 = $17 * $11; wasm2js_i32$0 = $1; - wasm2js_f64$0 = +HEAPF64[($1 + 24 | 0) >> 3] + $18 * $2; + wasm2js_f64$0 = +HEAPF64[($1 + 24 | 0) >> 3] + $107 * $2; HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; wasm2js_i32$0 = $1; wasm2js_f64$0 = +HEAPF64[($1 + 32 | 0) >> 3] + $9 * $2; @@ -353,10 +246,10 @@ function asmFunc(global, env, buffer) { $0 = $0 | 0; var $1 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $10 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, $30 = 0.0, $39 = 0.0, $45 = 0.0, $69 = 0.0, $84 = 0.0; $4 = HEAPU32[$0 >> 2] | 0; - $5 = HEAP32[($4 + 4 | 0) >> 2] | 0; + $5 = HEAP32[($4 + 12 | 0) >> 2] | 0; repeat_0 : do { if ($2 >>> 0 < $5 >>> 0) { - $0 = HEAPU32[(((HEAPU32[$4 >> 2] | 0) + ($2 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $0 = HEAPU32[((HEAPU32[($4 + 4 | 0) >> 2] | 0) + ($2 << 2 | 0) | 0) >> 2] | 0; $7 = +HEAPF64[$0 >> 3]; $8 = +HEAPF64[($0 + 8 | 0) >> 3]; $9 = +HEAPF64[($0 + 16 | 0) >> 3]; @@ -371,7 +264,7 @@ function asmFunc(global, env, buffer) { $0 = $2 + 1 | 0; repeat_1 : do { if ($0 >>> 0 < $5 >>> 0) { - $3 = HEAPU32[(((HEAPU32[$4 >> 2] | 0) + ($0 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $3 = HEAPU32[((HEAPU32[($4 + 4 | 0) >> 2] | 0) + ($0 << 2 | 0) | 0) >> 2] | 0; $6 = $7 - +HEAPF64[$3 >> 3]; $69 = $1; $1 = $8 - +HEAPF64[($3 + 8 | 0) >> 3]; @@ -412,18 +305,14 @@ function asmFunc(global, env, buffer) { function assembly_index_getBody($0) { $0 = $0 | 0; - var $1 = 0, $22 = 0, $20 = 0; + var $1 = 0, $14 = 0; $1 = HEAPU32[assembly_index_system >> 2] | 0; - if ($0 >>> 0 < (HEAP32[($1 + 4 | 0) >> 2] | 0) >>> 0) { - $1 = HEAPU32[$1 >> 2] | 0; - if ($0 >>> 0 < ((HEAP32[$1 >> 2] | 0) >>> 2 | 0) >>> 0) $20 = HEAPU32[((($0 << 2 | 0) + $1 | 0) + 8 | 0) >> 2] | 0; else abort(); - $22 = $20; - } else $22 = 0; - return $22 | 0; + if ($0 >>> 0 < (HEAP32[($1 + 12 | 0) >> 2] | 0) >>> 0) $14 = HEAPU32[((HEAPU32[($1 + 4 | 0) >> 2] | 0) + ($0 << 2 | 0) | 0) >> 2] | 0; else $14 = 0; + return $14 | 0; } function start() { - $lib_allocator_arena_startOffset = 40; + $lib_allocator_arena_startOffset = 8; $lib_allocator_arena_offset = $lib_allocator_arena_startOffset; } @@ -431,7 +320,6 @@ function asmFunc(global, env, buffer) { } - var FUNCTION_TABLE_v = [null_]; function __wasm_grow_memory(pagesToAdd) { pagesToAdd = pagesToAdd | 0; var oldPages = __wasm_current_memory() | 0; @@ -477,23 +365,6 @@ function asmFunc(global, env, buffer) { } const memasmFunc = new ArrayBuffer(65536); -const assignasmFunc = ( - function(mem) { - const _mem = new Uint8Array(mem); - return function(offset, s) { - if (typeof Buffer === 'undefined') { - const bytes = atob(s); - for (let i = 0; i < bytes.length; i++) - _mem[offset + i] = bytes.charCodeAt(i); - } else { - const bytes = Buffer.from(s, 'base64'); - for (let i = 0; i < bytes.length; i++) - _mem[offset + i] = bytes[i]; - } - } - } - )(memasmFunc); -assignasmFunc(8, "DQAAAH4AbABpAGIALwBhAHIAcgBhAHkALgB0AHM="); const retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); }},memasmFunc); export const memory = retasmFunc.memory; export const init = retasmFunc.init; diff --git a/examples/n-body/build/index.js b/examples/n-body/build/index.js index 820b3773ed..ca3ead7976 100644 --- a/examples/n-body/build/index.js +++ b/examples/n-body/build/index.js @@ -49,7 +49,7 @@ class NBodySystem { py += b.vy * m; pz += b.vz * m; } - bodies[0].offsetMomentum(px, py, pz); + unchecked(bodies[0]).offsetMomentum(px, py, pz); } advance(dt) { var bodies = this.bodies; @@ -139,6 +139,6 @@ function bench(steps) { exports.bench = bench; function getBody(index) { var bodies = system.bodies; - return index < bodies.length ? bodies[index] : null; + return index < bodies.length ? unchecked(bodies[index]) : null; } exports.getBody = getBody; diff --git a/examples/n-body/build/optimized.wasm b/examples/n-body/build/optimized.wasm index e299a57663..ea9364a216 100644 Binary files a/examples/n-body/build/optimized.wasm and b/examples/n-body/build/optimized.wasm differ diff --git a/examples/n-body/build/optimized.wat b/examples/n-body/build/optimized.wat index de9adc85e5..a1504ac147 100644 --- a/examples/n-body/build/optimized.wat +++ b/examples/n-body/build/optimized.wat @@ -6,21 +6,17 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iddddddd (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $FUNCSIG$i (func (result i32))) - (import "env" "memory" (memory $0 1)) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (import "env" "memory" (memory $0 0)) + (global $assembly/index/system (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 $assembly/index/system (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -43,15 +39,15 @@ i32.add i32.const -8 i32.and - local.tee $2 + local.tee $0 current_memory - local.tee $3 + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $3 local.get $2 + local.get $0 local.get $1 i32.sub i32.const 65535 @@ -60,16 +56,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 + local.get $2 local.get $3 - local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -78,11 +74,32 @@ end end end - local.get $2 + local.get $0 global.set $~lib/allocator/arena/offset local.get $1 ) - (func $assembly/index/NBodySystem#constructor (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add + ) + (func $assembly/index/NBodySystem#constructor (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -91,7 +108,7 @@ (local $6 f64) (local $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $7 loop $repeat|0 local.get $1 @@ -99,12 +116,12 @@ i32.lt_s if local.get $0 - i32.load + i32.load offset=4 local.get $1 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $2 f64.load offset=48 local.set $3 @@ -136,21 +153,10 @@ br $repeat|0 end end - i32.const 0 local.get $0 + i32.load offset=4 i32.load local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.load offset=8 - else - unreachable - end - local.tee $1 local.get $4 f64.neg f64.const 39.47841760435743 @@ -169,17 +175,27 @@ f64.div f64.store offset=40 i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate local.tee $1 + i32.const 16 + i32.sub + i32.const 17 + i32.store + local.get $1 local.get $0 i32.store local.get $1 ) - (func $assembly/index/Body#constructor (; 2 ;) (type $FUNCSIG$iddddddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (func $assembly/index/Body#constructor (; 3 ;) (type $FUNCSIG$iddddddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) (local $7 i32) i32.const 56 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate local.tee $7 + i32.const 16 + i32.sub + i32.const 18 + i32.store + local.get $7 local.get $0 f64.store local.get $7 @@ -202,232 +218,44 @@ f64.store offset=48 local.get $7 ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/makeArray (; 4 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 0 - i32.store8 - local.get $0 - i32.const 20 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - 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 $1 - i32.const 2 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 0 - i32.store8 - local.get $0 - i32.const 3 - i32.add - i32.const 0 - i32.store8 - local.get $1 - i32.const 4 - i32.sub - i32.const 0 - i32.store8 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $1 - local.get $0 - i32.add + i32.const 16 + call $~lib/util/runtime/allocate local.tee $0 - i32.const 0 - i32.store - i32.const 20 - local.get $1 - i32.sub - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store - local.get $2 - 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 $2 - i32.add - local.tee $1 - i32.const 12 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 8 - i32.sub - i32.const 0 - i32.store - local.get $2 - 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 $2 - i32.add - local.tee $1 - i32.const 28 - i32.sub - i32.const 0 - i32.store - local.get $1 - i32.const 24 i32.sub - i32.const 0 + i32.const 19 i32.store - local.get $1 i32.const 20 - i32.sub - i32.const 0 - i32.store - local.get $1 + call $~lib/util/runtime/allocate + local.tee $1 i32.const 16 i32.sub - i32.const 0 + i32.const 15 i32.store local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $1 - local.get $0 - i32.add - local.set $0 - local.get $2 local.get $1 - i32.sub - local.set $2 - loop $continue|0 - local.get $2 - 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 $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 - end - end - ) - (func $~lib/array/Array#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 32 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - i32.const 20 - i32.store - i32.const 8 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 0 i32.store local.get $0 - i32.const 0 + local.get $1 i32.store offset=4 local.get $0 - local.get $1 - i32.store + i32.const 20 + i32.store offset=8 local.get $0 i32.const 5 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - call $~lib/internal/memory/memset + i32.store offset=12 local.get $0 ) (func $assembly/index/init (; 5 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/array/Array#constructor - local.set $1 + call $~lib/util/runtime/makeArray + local.tee $1 + i32.load offset=4 + local.tee $0 f64.const 0 f64.const 0 f64.const 0 @@ -436,11 +264,8 @@ f64.const 0 f64.const 39.47841760435743 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load + i32.store local.get $0 - i32.store offset=8 f64.const 4.841431442464721 f64.const -1.1603200440274284 f64.const -0.10362204447112311 @@ -449,13 +274,8 @@ f64.const -0.02521836165988763 f64.const 0.03769367487038949 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load - i32.const 4 - i32.add + i32.store offset=4 local.get $0 - i32.store offset=8 f64.const 8.34336671824458 f64.const 4.124798564124305 f64.const -0.4035234171143214 @@ -464,13 +284,8 @@ f64.const 0.008415761376584154 f64.const 0.011286326131968767 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load - i32.const 8 - i32.add - local.get $0 i32.store offset=8 + local.get $0 f64.const 12.894369562139131 f64.const -15.111151401698631 f64.const -0.22330757889265573 @@ -479,13 +294,8 @@ f64.const -0.010832637401363636 f64.const 1.7237240570597112e-03 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load - i32.const 12 - i32.add + i32.store offset=12 local.get $0 - i32.store offset=8 f64.const 15.379697114850917 f64.const -25.919314609987964 f64.const 0.17925877295037118 @@ -494,13 +304,7 @@ f64.const -0.034755955504078104 f64.const 2.0336868699246304e-03 call $assembly/index/Body#constructor - local.set $0 - local.get $1 - i32.load - i32.const 16 - i32.add - local.get $0 - i32.store offset=8 + i32.store offset=16 local.get $1 call $assembly/index/NBodySystem#constructor global.set $assembly/index/system @@ -523,11 +327,10 @@ (local $15 f64) (local $16 f64) (local $17 f64) - (local $18 f64) local.get $0 i32.load local.tee $12 - i32.load offset=4 + i32.load offset=12 local.set $13 loop $repeat|0 local.get $3 @@ -535,12 +338,12 @@ i32.lt_u if local.get $12 - i32.load + i32.load offset=4 local.get $3 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $0 f64.load local.set $14 @@ -573,16 +376,15 @@ if local.get $14 local.get $12 - i32.load + i32.load offset=4 local.get $7 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $1 f64.load f64.sub - local.tee $18 local.tee $2 local.get $2 f64.mul @@ -635,7 +437,7 @@ local.get $1 local.get $1 f64.load offset=24 - local.get $18 + local.get $2 local.get $17 local.get $11 f64.mul @@ -721,7 +523,7 @@ local.get $0 i32.load local.tee $4 - i32.load offset=4 + i32.load offset=12 local.set $5 loop $repeat|0 local.get $2 @@ -729,12 +531,12 @@ i32.lt_u if local.get $4 - i32.load + i32.load offset=4 local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $0 f64.load local.set $7 @@ -781,12 +583,12 @@ if local.get $7 local.get $4 - i32.load + i32.load offset=4 local.get $0 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.tee $3 f64.load f64.sub @@ -867,33 +669,22 @@ global.get $assembly/index/system i32.load local.tee $1 - i32.load offset=4 + i32.load offset=12 i32.lt_u if (result i32) - local.get $0 local.get $1 - i32.load - local.tee $1 - i32.load + i32.load offset=4 + local.get $0 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end + i32.shl + i32.add + i32.load else i32.const 0 end ) (func $start (; 11 ;) (type $FUNCSIG$v) - i32.const 40 + i32.const 8 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset diff --git a/examples/n-body/build/untouched.wat b/examples/n-body/build/untouched.wat index 8077faeef7..629228a815 100644 --- a/examples/n-body/build/untouched.wat +++ b/examples/n-body/build/untouched.wat @@ -1,105 +1,52 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiddd (func (param i32 f64 f64 f64) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iiddd (func (param i32 f64 f64 f64) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiddddddd (func (param i32 f64 f64 f64 f64 f64 f64 f64) (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vid (func (param i32 f64))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$vi (func (param i32))) (import "env" "memory" (memory $0 1)) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 40) "\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") - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (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)) (global $~lib/math/NativeMath.PI f64 (f64.const 3.141592653589793)) (global $assembly/index/SOLAR_MASS f64 (f64.const 39.47841760435743)) (global $assembly/index/DAYS_PER_YEAR f64 (f64.const 365.24)) (global $assembly/index/system (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 100)) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $start) - (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 $start:assembly/index (; 2 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $~lib/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 ) - (func $~lib/array/Array#__unchecked_get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/array/Array#__unchecked_get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 i32.const 2 i32.shl i32.add - local.get $4 - i32.add - i32.load offset=8 - ) - (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end ) - (func $assembly/index/Body#offsetMomentum (; 5 ;) (type $FUNCSIG$iiddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $assembly/index/Body#offsetMomentum (; 3 ;) (type $FUNCSIG$iiddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) local.get $0 local.get $1 f64.neg @@ -120,7 +67,19 @@ f64.store offset=40 local.get $0 ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -199,12 +158,64 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $assembly/index/NBodySystem#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/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 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $assembly/index/NBodySystem#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 f64) (local $3 f64) (local $4 f64) @@ -218,26 +229,22 @@ local.set $3 f64.const 0 local.set $4 - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=4 - end - local.set $6 + local.get $1 + call $~lib/array/Array#get:length + local.set $5 block $break|0 i32.const 0 - local.set $5 + local.set $6 loop $repeat|0 - local.get $5 local.get $6 + local.get $5 i32.lt_s i32.eqz br_if $break|0 block local.get $1 - local.get $5 - call $~lib/array/Array#__unchecked_get + local.get $6 + call $~lib/array/Array#__unchecked_get local.set $7 local.get $7 f64.load offset=48 @@ -264,10 +271,10 @@ f64.add local.set $4 end - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 br $repeat|0 unreachable end @@ -275,7 +282,7 @@ end local.get $1 i32.const 0 - call $~lib/array/Array#__get + call $~lib/array/Array#__unchecked_get local.get $2 local.get $3 local.get $4 @@ -285,7 +292,9 @@ i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -293,12 +302,14 @@ i32.store local.get $0 ) - (func $assembly/index/Body#constructor (; 9 ;) (type $FUNCSIG$iiddddddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) + (func $assembly/index/Body#constructor (; 10 ;) (type $FUNCSIG$iiddddddd) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) local.get $0 i32.eqz if i32.const 56 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -324,507 +335,376 @@ f64.store offset=48 local.get $0 ) - (func $assembly/index/Sun (; 10 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - f64.const 0 - global.get $assembly/index/SOLAR_MASS - call $assembly/index/Body#constructor - ) - (func $assembly/index/Jupiter (; 11 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 4.841431442464721 - f64.const -1.1603200440274284 - f64.const -0.10362204447112311 - f64.const 0.001660076642744037 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 0.007699011184197404 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const -6.90460016972063e-05 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 9.547919384243266e-04 - global.get $assembly/index/SOLAR_MASS - f64.mul - call $assembly/index/Body#constructor - ) - (func $assembly/index/Saturn (; 12 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 8.34336671824458 - f64.const 4.124798564124305 - f64.const -0.4035234171143214 - f64.const -0.002767425107268624 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 0.004998528012349172 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 2.3041729757376393e-05 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 2.858859806661308e-04 - global.get $assembly/index/SOLAR_MASS - f64.mul - call $assembly/index/Body#constructor - ) - (func $assembly/index/Uranus (; 13 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 12.894369562139131 - f64.const -15.111151401698631 - f64.const -0.22330757889265573 - f64.const 0.002964601375647616 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 2.3784717395948095e-03 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const -2.9658956854023756e-05 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 4.366244043351563e-05 - global.get $assembly/index/SOLAR_MASS - f64.mul - call $assembly/index/Body#constructor - ) - (func $assembly/index/Neptune (; 14 ;) (type $FUNCSIG$i) (result i32) - i32.const 0 - f64.const 15.379697114850917 - f64.const -25.919314609987964 - f64.const 0.17925877295037118 - f64.const 2.6806777249038932e-03 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 0.001628241700382423 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const -9.515922545197159e-05 - global.get $assembly/index/DAYS_PER_YEAR - f64.mul - f64.const 5.1513890204661145e-05 - global.get $assembly/index/SOLAR_MASS - f64.mul - call $assembly/index/Body#constructor - ) - (func $~lib/internal/arraybuffer/computeSize (; 15 ;) (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/allocateUnsafe (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memset (; 17 ;) (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 $assembly/index/Sun (; 11 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + global.get $assembly/index/SOLAR_MASS + call $assembly/index/Body#constructor ) - (func $~lib/array/Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/memory/memory.copy (; 12 ;) (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.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) + block $~lib/util/memory/memmove|inlined.0 local.get $0 - i32.eqz + local.get $1 + i32.eq if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memmove|inlined.0 end local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 end - local.get $0 ) - (func $~lib/array/Array#__unchecked_set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/util/runtime/makeArray (; 13 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) + i32.const 16 + call $~lib/util/runtime/allocate + local.get $2 + call $~lib/util/runtime/register + local.set $4 local.get $0 - i32.load - local.set $3 local.get $1 - local.set $4 - local.get $2 + i32.shl local.set $5 - i32.const 0 + local.get $5 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register local.set $6 - local.get $3 local.get $4 - i32.const 2 - i32.shl - i32.add local.get $6 - i32.add + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 local.get $5 i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 + ) + (func $assembly/index/Jupiter (; 14 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + f64.const 4.841431442464721 + f64.const -1.1603200440274284 + f64.const -0.10362204447112311 + f64.const 0.001660076642744037 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 0.007699011184197404 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const -6.90460016972063e-05 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 9.547919384243266e-04 + global.get $assembly/index/SOLAR_MASS + f64.mul + call $assembly/index/Body#constructor + ) + (func $assembly/index/Saturn (; 15 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + f64.const 8.34336671824458 + f64.const 4.124798564124305 + f64.const -0.4035234171143214 + f64.const -0.002767425107268624 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 0.004998528012349172 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 2.3041729757376393e-05 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 2.858859806661308e-04 + global.get $assembly/index/SOLAR_MASS + f64.mul + call $assembly/index/Body#constructor + ) + (func $assembly/index/Uranus (; 16 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + f64.const 12.894369562139131 + f64.const -15.111151401698631 + f64.const -0.22330757889265573 + f64.const 0.002964601375647616 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 2.3784717395948095e-03 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const -2.9658956854023756e-05 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 4.366244043351563e-05 + global.get $assembly/index/SOLAR_MASS + f64.mul + call $assembly/index/Body#constructor + ) + (func $assembly/index/Neptune (; 17 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + f64.const 15.379697114850917 + f64.const -25.919314609987964 + f64.const 0.17925877295037118 + f64.const 2.6806777249038932e-03 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 0.001628241700382423 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const -9.515922545197159e-05 + global.get $assembly/index/DAYS_PER_YEAR + f64.mul + f64.const 5.1513890204661145e-05 + global.get $assembly/index/SOLAR_MASS + f64.mul + call $assembly/index/Body#constructor ) - (func $assembly/index/init (; 20 ;) (type $FUNCSIG$v) + (func $assembly/index/init (; 18 ;) (type $FUNCSIG$v) (local $0 i32) + (local $1 i32) i32.const 0 block (result i32) - i32.const 0 i32.const 5 - call $~lib/array/Array#constructor + i32.const 2 + i32.const 19 + i32.const 0 + call $~lib/util/runtime/makeArray local.set $0 local.get $0 - i32.const 0 + i32.load offset=4 + local.set $1 + local.get $1 call $assembly/index/Sun - call $~lib/array/Array#__unchecked_set - local.get $0 - i32.const 1 + i32.store + local.get $1 call $assembly/index/Jupiter - call $~lib/array/Array#__unchecked_set - local.get $0 - i32.const 2 + i32.store offset=4 + local.get $1 call $assembly/index/Saturn - call $~lib/array/Array#__unchecked_set - local.get $0 - i32.const 3 + i32.store offset=8 + local.get $1 call $assembly/index/Uranus - call $~lib/array/Array#__unchecked_set - local.get $0 - i32.const 4 + i32.store offset=12 + local.get $1 call $assembly/index/Neptune - call $~lib/array/Array#__unchecked_set + i32.store offset=16 local.get $0 end call $assembly/index/NBodySystem#constructor global.set $assembly/index/system ) - (func $assembly/index/NBodySystem#advance (; 21 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $assembly/index/NBodySystem#advance (; 19 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -849,26 +729,22 @@ local.get $0 i32.load local.set $2 - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $2 - local.set $3 - local.get $3 - i32.load offset=4 - end - local.set $4 + local.get $2 + call $~lib/array/Array#get:length + local.set $3 block $break|0 i32.const 0 - local.set $3 + local.set $4 loop $repeat|0 - local.get $3 local.get $4 + local.get $3 i32.lt_u i32.eqz br_if $break|0 block local.get $2 - local.get $3 - call $~lib/array/Array#__unchecked_get + local.get $4 + call $~lib/array/Array#__unchecked_get local.set $5 local.get $5 f64.load @@ -892,20 +768,20 @@ f64.load offset=48 local.set $12 block $break|1 - local.get $3 + local.get $4 i32.const 1 i32.add local.set $13 loop $repeat|1 local.get $13 - local.get $4 + local.get $3 i32.lt_u i32.eqz br_if $break|1 block local.get $2 local.get $13 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get local.set $14 local.get $6 local.get $14 @@ -1042,17 +918,17 @@ f64.add f64.store offset=16 end - local.get $3 + local.get $4 i32.const 1 i32.add - local.set $3 + local.set $4 br $repeat|0 unreachable end unreachable end ) - (func $assembly/index/NBodySystem#energy (; 22 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 20 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1080,12 +956,8 @@ block i32.const 0 local.set $3 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=4 - end + local.get $2 + call $~lib/array/Array#get:length local.set $4 end loop $repeat|0 @@ -1097,7 +969,7 @@ block local.get $2 local.get $3 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get local.set $5 local.get $5 f64.load @@ -1152,7 +1024,7 @@ block local.get $2 local.get $13 - call $~lib/array/Array#__unchecked_get + call $~lib/array/Array#__unchecked_get local.set $14 local.get $6 local.get $14 @@ -1217,14 +1089,14 @@ end local.get $1 ) - (func $assembly/index/step (; 23 ;) (type $FUNCSIG$d) (result f64) + (func $assembly/index/step (; 21 ;) (type $FUNCSIG$d) (result f64) global.get $assembly/index/system f64.const 0.01 call $assembly/index/NBodySystem#advance global.get $assembly/index/system call $assembly/index/NBodySystem#energy ) - (func $assembly/index/bench (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $assembly/index/bench (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $break|0 i32.const 0 @@ -1248,31 +1120,35 @@ unreachable end ) - (func $assembly/index/getBody (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) global.get $assembly/index/system i32.load local.set $1 local.get $0 - block $~lib/array/Array#get:length|inlined.4 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.lt_u if (result i32) local.get $1 local.get $0 - call $~lib/array/Array#__get + call $~lib/array/Array#__unchecked_get else i32.const 0 end ) - (func $start (; 26 ;) (type $FUNCSIG$v) - call $start:assembly/index + (func $start (; 24 ;) (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 $null (; 27 ;) (type $FUNCSIG$v) + (func $null (; 25 ;) (type $FUNCSIG$v) ) ) diff --git a/examples/pson/build/optimized.wat b/examples/pson/build/optimized.wat index e996c355e7..b8ba316970 100644 --- a/examples/pson/build/optimized.wat +++ b/examples/pson/build/optimized.wat @@ -21,11 +21,8 @@ (import "pson" "onString" (func $assembly/pson/onString (param i32 i32))) (import "pson" "onBinary" (func $assembly/pson/onBinary (param i32 i32))) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $assembly/pson/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "onNull" (func $assembly/pson/onNull)) (export "onTrue" (func $assembly/pson/onTrue)) (export "onFalse" (func $assembly/pson/onFalse)) @@ -120,7 +117,7 @@ (local $2 i64) block $break|0 global.get $assembly/pson/offset - local.tee $1 + local.tee $0 i32.const 1 i32.add global.set $assembly/pson/offset @@ -141,7 +138,7 @@ block $case1|0 block $case0|0 block $tablify|0 - local.get $1 + local.get $0 i32.load8_u local.tee $0 local.tee $1 diff --git a/examples/pson/build/untouched.wat b/examples/pson/build/untouched.wat index e7a6be1ed1..2f37a02804 100644 --- a/examples/pson/build/untouched.wat +++ b/examples/pson/build/untouched.wat @@ -24,9 +24,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $assembly/pson/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "onNull" (func $assembly/pson/onNull)) (export "onTrue" (func $assembly/pson/onTrue)) (export "onFalse" (func $assembly/pson/onFalse)) diff --git a/lib/loader/index.js b/lib/loader/index.js index 7f79027bdb..5e58a1bf32 100644 --- a/lib/loader/index.js +++ b/lib/loader/index.js @@ -54,7 +54,8 @@ function postInstantiate(baseModule, instance) { var memory_fill = rawExports["memory.fill"]; var memory_free = rawExports["memory.free"]; var table = rawExports.table; - var setargc = rawExports._setargc || function() {}; + var capabilities = rawExports[".capabilities"] || 0; + var setargc = rawExports[".setargc"] || function() {}; // Provide views for all sorts of basic values var buffer, I8, U8, I16, U16, I32, U32, F32, F64, I64, U64; @@ -245,7 +246,7 @@ exports.instantiateStreaming = instantiateStreaming; /** Demangles an AssemblyScript module's exports to a friendly object structure. */ function demangle(exports, baseModule) { var module = baseModule ? Object.create(baseModule) : {}; - var setargc = exports._setargc || function() {}; + var setargc = exports[".setargc"] || function() {}; function hasOwnProperty(elem, prop) { return Object.prototype.hasOwnProperty.call(elem, prop); } diff --git a/lib/parse/build/index.wat b/lib/parse/build/index.wat index 4955d09220..84a5cab80d 100644 --- a/lib/parse/build/index.wat +++ b/lib/parse/build/index.wat @@ -29,36 +29,8 @@ (import "options" "onFunctionName" (func $assembly/options/onFunctionName (param i32 i32 i32))) (import "options" "onLocalName" (func $assembly/options/onLocalName (param i32 i32 i32 i32))) (import "options" "onSourceMappingURL" (func $assembly/options/onSourceMappingURL (param i32 i32))) - (table $0 1 funcref) - (elem (i32.const 0) $null) - (global $src/common/SectionId.Custom (mut i32) (i32.const 0)) - (global $src/common/SectionId.Type (mut i32) (i32.const 1)) - (global $src/common/SectionId.Import (mut i32) (i32.const 2)) - (global $src/common/SectionId.Function (mut i32) (i32.const 3)) - (global $src/common/SectionId.Table (mut i32) (i32.const 4)) - (global $src/common/SectionId.Memory (mut i32) (i32.const 5)) - (global $src/common/SectionId.Global (mut i32) (i32.const 6)) - (global $src/common/SectionId.Export (mut i32) (i32.const 7)) - (global $src/common/SectionId.Start (mut i32) (i32.const 8)) - (global $src/common/SectionId.Element (mut i32) (i32.const 9)) - (global $src/common/SectionId.Code (mut i32) (i32.const 10)) - (global $src/common/SectionId.Data (mut i32) (i32.const 11)) - (global $src/common/ExternalKind.Function (mut i32) (i32.const 0)) - (global $src/common/ExternalKind.Table (mut i32) (i32.const 1)) - (global $src/common/ExternalKind.Memory (mut i32) (i32.const 2)) - (global $src/common/ExternalKind.Global (mut i32) (i32.const 3)) - (global $src/common/NameType.Module (mut i32) (i32.const 0)) - (global $src/common/NameType.Function (mut i32) (i32.const 1)) - (global $src/common/NameType.Local (mut i32) (i32.const 2)) - (global $src/common/Opcode.end (mut i32) (i32.const 11)) - (global $src/common/Opcode.get_global (mut i32) (i32.const 35)) - (global $src/common/Opcode.i32_const (mut i32) (i32.const 65)) - (global $src/common/Opcode.i64_const (mut i32) (i32.const 66)) - (global $src/common/Opcode.f32_const (mut i32) (i32.const 67)) - (global $src/common/Opcode.f64_const (mut i32) (i32.const 68)) (global $assembly/index/off (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "parse" (func $assembly/index/parse)) (func $assembly/index/readVaruint (; 19 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) @@ -103,57 +75,51 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) global.get $assembly/index/off - local.set $2 + local.set $4 loop $continue|0 - local.get $2 - local.tee $4 + local.get $4 + local.tee $3 i32.const 1 i32.add - local.set $2 - local.get $4 + local.set $4 + local.get $3 i32.load8_u - local.tee $5 + local.tee $3 i32.const 127 i32.and local.get $1 i32.shl - local.get $3 + local.get $2 i32.or - local.set $3 + local.set $2 local.get $1 i32.const 7 i32.add local.set $1 - local.get $5 + local.get $3 i32.const 128 i32.and br_if $continue|0 end - local.get $2 + local.get $4 global.set $assembly/index/off i32.const -1 local.get $1 i32.shl - local.get $3 + local.get $2 i32.or - local.set $2 + local.get $2 + local.get $3 + i32.const 64 + i32.and + i32.const 0 + i32.ne + i32.const 0 local.get $1 local.get $0 i32.lt_u - local.tee $4 - if - local.get $5 - i32.const 64 - i32.and - i32.const 0 - i32.ne - local.set $4 - end - local.get $2 - local.get $3 - local.get $4 + select select ) (func $assembly/index/readVarint64 (; 21 ;) (type $FUNCSIG$v) @@ -211,24 +177,24 @@ block $case3|0 block $case2|0 block $case1|0 - global.get $src/common/Opcode.i32_const local.get $0 + i32.const 65 i32.ne if - global.get $src/common/Opcode.i64_const local.get $0 + i32.const 66 i32.eq br_if $case1|0 - global.get $src/common/Opcode.f32_const local.get $0 + i32.const 67 i32.eq br_if $case2|0 - global.get $src/common/Opcode.f64_const local.get $0 + i32.const 68 i32.eq br_if $case3|0 - global.get $src/common/Opcode.get_global local.get $0 + i32.const 35 i32.eq br_if $case4|0 br $case5|0 @@ -275,8 +241,8 @@ i32.const 1 i32.add global.set $assembly/index/off - global.get $src/common/Opcode.end local.get $0 + i32.const 11 i32.ne if unreachable @@ -301,12 +267,12 @@ global.get $assembly/index/off local.tee $0 i32.load - local.set $6 + local.set $2 local.get $0 i32.const 4 i32.add global.set $assembly/index/off - local.get $6 + local.get $2 i32.const 1836278016 i32.ne if @@ -315,17 +281,19 @@ global.get $assembly/index/off local.tee $0 i32.load - local.set $6 + local.set $2 local.get $0 i32.const 4 i32.add global.set $assembly/index/off - local.get $6 + local.get $2 i32.const 1 i32.ne if unreachable end + i32.const 0 + local.set $0 loop $continue|0 global.get $assembly/index/off local.get $1 @@ -334,41 +302,42 @@ call $assembly/index/readVaruint local.set $2 call $assembly/index/readVaruint - local.set $8 + local.set $3 i32.const 0 local.set $4 i32.const 0 - local.set $0 + local.set $5 local.get $2 if local.get $2 - global.get $src/common/SectionId.Data + i32.const 11 i32.gt_u if unreachable end else global.get $assembly/index/off - local.set $5 + local.set $6 call $assembly/index/readVaruint - local.tee $0 + local.set $5 + local.get $5 global.get $assembly/index/off local.tee $4 i32.add global.set $assembly/index/off - local.get $8 + local.get $3 global.get $assembly/index/off - local.get $5 + local.get $6 i32.sub i32.sub - local.set $8 + local.set $3 end local.get $2 global.get $assembly/index/off - local.tee $5 - local.get $8 + local.tee $6 + local.get $3 local.get $4 - local.get $0 + local.get $5 call $assembly/options/onSection if block $break|1 @@ -382,63 +351,27 @@ block $case3|1 block $case2|1 block $case1|1 - global.get $src/common/SectionId.Type local.get $2 + i32.const 1 i32.ne if - global.get $src/common/SectionId.Import local.get $2 + i32.const 2 i32.eq br_if $case1|1 - global.get $src/common/SectionId.Function - local.get $2 - i32.eq - br_if $case2|1 - global.get $src/common/SectionId.Table - local.get $2 - i32.eq - br_if $case3|1 - global.get $src/common/SectionId.Memory - local.get $2 - i32.eq - br_if $case4|1 - global.get $src/common/SectionId.Global - local.get $2 - i32.eq - br_if $case5|1 - global.get $src/common/SectionId.Export - local.get $2 - i32.eq - br_if $case6|1 - global.get $src/common/SectionId.Start - local.get $2 - i32.eq - br_if $case7|1 - global.get $src/common/SectionId.Custom - local.get $2 - i32.eq - br_if $case8|1 - global.get $src/common/SectionId.Element - local.get $2 - i32.eq - br_if $case11|1 - global.get $src/common/SectionId.Code - local.get $2 - i32.eq - br_if $case11|1 - global.get $src/common/SectionId.Data - local.get $2 - i32.eq - br_if $case11|1 + block $tablify|0 + local.get $2 + br_table $case8|1 $tablify|0 $tablify|0 $case2|1 $case3|1 $case4|1 $case5|1 $case6|1 $case7|1 $case11|1 $case11|1 $case11|1 $tablify|0 + end br $case12|1 end call $assembly/index/readVaruint - local.set $2 + local.set $4 i32.const 0 local.set $3 loop $repeat|2 local.get $3 - local.get $2 + local.get $4 i32.lt_u if local.get $3 @@ -450,46 +383,46 @@ call $assembly/index/readVaruint local.set $5 i32.const 0 - local.set $7 + local.set $2 loop $repeat|3 - local.get $7 + local.get $2 local.get $5 i32.lt_u if local.get $3 - local.get $7 + local.get $2 i32.const 7 call $assembly/index/readVarint i32.const 127 i32.and call $assembly/options/onTypeParam - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|3 end end call $assembly/index/readVaruint - local.set $7 + local.set $5 i32.const 0 - local.set $4 + local.set $2 loop $repeat|4 - local.get $4 - local.get $7 + local.get $2 + local.get $5 i32.lt_u if local.get $3 - local.get $4 + local.get $2 i32.const 7 call $assembly/index/readVarint i32.const 127 i32.and call $assembly/options/onTypeReturn - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $repeat|4 end end @@ -503,73 +436,59 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $7 i32.const 0 local.set $3 loop $repeat|5 local.get $3 - local.get $2 + local.get $7 i32.lt_u if call $assembly/index/readVaruint - local.set $7 - local.get $7 + local.tee $4 global.get $assembly/index/off local.tee $5 i32.add global.set $assembly/index/off call $assembly/index/readVaruint - local.set $9 - local.get $9 + local.tee $6 global.get $assembly/index/off - local.tee $4 + local.tee $8 i32.add global.set $assembly/index/off global.get $assembly/index/off - local.tee $6 + local.tee $9 i32.load8_u - local.set $0 - local.get $6 + local.set $2 + local.get $9 i32.const 1 i32.add global.set $assembly/index/off local.get $3 - local.get $0 + local.get $2 local.get $5 - local.get $7 local.get $4 - local.get $9 + local.get $8 + local.get $6 call $assembly/options/onImport block $break|6 block $case4|6 block $case3|6 block $case2|6 block $case1|6 - local.get $0 - local.tee $6 - global.get $src/common/ExternalKind.Function - i32.ne + local.get $2 if - global.get $src/common/ExternalKind.Table - local.get $6 - i32.eq - br_if $case1|6 - global.get $src/common/ExternalKind.Memory - local.get $6 - i32.eq - br_if $case2|6 - global.get $src/common/ExternalKind.Global - local.get $6 - i32.eq - br_if $case3|6 - br $case4|6 + local.get $2 + i32.const 1 + i32.sub + br_table $case1|6 $case2|6 $case3|6 $case4|6 end - local.get $11 - local.tee $10 + local.get $0 + local.tee $2 i32.const 1 i32.add - local.set $11 - local.get $10 + local.set $0 + local.get $2 call $assembly/index/readVaruint call $assembly/options/onFunctionImport br $break|6 @@ -578,18 +497,18 @@ call $assembly/index/readVarint i32.const 127 i32.and - local.set $6 + local.set $4 call $assembly/index/readVaruint - local.set $10 - local.get $12 - local.tee $0 + local.set $5 + local.get $10 + local.tee $2 i32.const 1 i32.add - local.set $12 - local.get $0 - local.get $6 + local.set $10 + local.get $2 + local.get $4 call $assembly/index/readVaruint - local.get $10 + local.get $5 i32.const 1 i32.and if (result i32) @@ -597,20 +516,20 @@ else i32.const -1 end - local.get $10 + local.get $5 call $assembly/options/onTableImport br $break|6 end call $assembly/index/readVaruint - local.set $8 - local.get $13 - local.tee $6 + local.set $4 + local.get $11 + local.tee $2 i32.const 1 i32.add - local.set $13 - local.get $6 + local.set $11 + local.get $2 call $assembly/index/readVaruint - local.get $8 + local.get $4 i32.const 1 i32.and if (result i32) @@ -618,16 +537,16 @@ else i32.const 65535 end - local.get $8 + local.get $4 call $assembly/options/onMemoryImport br $break|6 end - local.get $14 - local.tee $8 + local.get $12 + local.tee $2 i32.const 1 i32.add - local.set $14 - local.get $8 + local.set $12 + local.get $2 i32.const 7 call $assembly/index/readVarint i32.const 127 @@ -648,20 +567,20 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $4 i32.const 0 local.set $3 loop $repeat|7 local.get $3 - local.get $2 + local.get $4 i32.lt_u if - local.get $11 - local.tee $4 + local.get $0 + local.tee $2 i32.const 1 i32.add - local.set $11 - local.get $4 + local.set $0 + local.get $2 call $assembly/index/readVaruint call $assembly/options/onFunction local.get $3 @@ -674,29 +593,29 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $7 i32.const 0 local.set $3 loop $repeat|8 local.get $3 - local.get $2 + local.get $7 i32.lt_u if call $assembly/index/readVaruint i32.const 127 i32.and - local.set $0 - call $assembly/index/readVaruint local.set $4 - local.get $12 - local.tee $7 + call $assembly/index/readVaruint + local.set $5 + local.get $10 + local.tee $2 i32.const 1 i32.add - local.set $12 - local.get $7 - local.get $0 - call $assembly/index/readVaruint + local.set $10 + local.get $2 local.get $4 + call $assembly/index/readVaruint + local.get $5 i32.const 1 i32.and if (result i32) @@ -704,7 +623,7 @@ else i32.const -1 end - local.get $4 + local.get $5 call $assembly/options/onTable local.get $3 i32.const 1 @@ -716,24 +635,24 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $6 i32.const 0 local.set $3 loop $repeat|9 local.get $3 - local.get $2 + local.get $6 i32.lt_u if call $assembly/index/readVaruint - local.set $5 - local.get $13 - local.tee $0 + local.set $4 + local.get $11 + local.tee $2 i32.const 1 i32.add - local.set $13 - local.get $0 + local.set $11 + local.get $2 call $assembly/index/readVaruint - local.get $5 + local.get $4 i32.const 1 i32.and if (result i32) @@ -741,7 +660,7 @@ else i32.const 65535 end - local.get $5 + local.get $4 call $assembly/options/onMemory local.get $3 i32.const 1 @@ -753,30 +672,30 @@ br $break|1 end call $assembly/index/readVaruint - local.set $2 + local.set $4 i32.const 0 local.set $3 loop $repeat|10 local.get $3 - local.get $2 + local.get $4 i32.lt_u if i32.const 7 call $assembly/index/readVarint i32.const 127 i32.and - local.set $4 + local.set $5 call $assembly/index/readVaruint - local.set $9 + local.set $6 call $assembly/index/skipInitExpr - local.get $14 - local.tee $5 + local.get $12 + local.tee $2 i32.const 1 i32.add - local.set $14 + local.set $12 + local.get $2 local.get $5 - local.get $4 - local.get $9 + local.get $6 call $assembly/options/onGlobal local.get $3 i32.const 1 @@ -797,25 +716,24 @@ i32.lt_u if call $assembly/index/readVaruint - local.set $9 - local.get $9 - global.get $assembly/index/off local.tee $4 + global.get $assembly/index/off + local.tee $5 i32.add global.set $assembly/index/off global.get $assembly/index/off - local.tee $0 + local.tee $6 i32.load8_u - local.set $6 - local.get $0 + local.set $7 + local.get $6 i32.const 1 i32.add global.set $assembly/index/off local.get $3 - local.get $6 + local.get $7 call $assembly/index/readVaruint + local.get $5 local.get $4 - local.get $9 call $assembly/options/onExport local.get $3 i32.const 1 @@ -830,126 +748,121 @@ call $assembly/options/onStart br $break|1 end - local.get $0 + local.get $5 i32.const 4 i32.eq - local.tee $2 if (result i32) local.get $4 i32.load i32.const 1701667182 i32.eq else - local.get $2 + i32.const 0 end if call $assembly/index/readVaruint local.set $2 call $assembly/index/readVaruint - local.set $3 + local.set $4 global.get $assembly/index/off - local.set $0 + local.set $5 block $break|12 block $case3|12 block $case2|12 block $case1|12 local.get $2 - local.tee $5 - global.get $src/common/NameType.Module - i32.ne if - global.get $src/common/NameType.Function - local.get $5 + local.get $2 + i32.const 1 i32.eq br_if $case1|12 - global.get $src/common/NameType.Local - local.get $5 + local.get $2 + i32.const 2 i32.eq br_if $case2|12 br $case3|12 end call $assembly/index/readVaruint - local.set $5 + local.set $2 global.get $assembly/index/off - local.get $5 + local.get $2 call $assembly/options/onModuleName br $break|12 end call $assembly/index/readVaruint - local.set $4 + local.set $3 i32.const 0 - local.set $5 + local.set $2 loop $repeat|13 - local.get $5 - local.get $4 + local.get $2 + local.get $3 i32.lt_u if call $assembly/index/readVaruint - local.set $9 + local.set $6 call $assembly/index/readVaruint - local.set $7 - local.get $7 + local.tee $7 global.get $assembly/index/off - local.tee $2 + local.tee $8 i32.add global.set $assembly/index/off - local.get $9 - local.get $2 + local.get $6 + local.get $8 local.get $7 call $assembly/options/onFunctionName - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $repeat|13 end end br $break|12 end call $assembly/index/readVaruint - local.set $4 + local.set $6 i32.const 0 - local.set $5 + local.set $2 loop $repeat|14 - local.get $5 - local.get $4 + local.get $2 + local.get $6 i32.lt_u if - call $assembly/index/readVaruint - local.set $2 call $assembly/index/readVaruint local.set $7 + call $assembly/index/readVaruint + local.set $8 i32.const 0 - local.set $9 + local.set $3 loop $repeat|15 - local.get $9 - local.get $7 + local.get $3 + local.get $8 i32.lt_u if call $assembly/index/readVaruint - local.set $10 + local.set $9 call $assembly/index/readVaruint - local.tee $8 + local.tee $13 global.get $assembly/index/off - local.tee $6 + local.tee $14 i32.add global.set $assembly/index/off - local.get $2 - local.get $10 - local.get $6 - local.get $8 - call $assembly/options/onLocalName + local.get $7 local.get $9 + local.get $14 + local.get $13 + call $assembly/options/onLocalName + local.get $3 i32.const 1 i32.add - local.set $9 + local.set $3 br $repeat|15 end end - local.get $5 + local.get $2 i32.const 1 i32.add - local.set $5 + local.set $2 br $repeat|14 end end @@ -957,25 +870,22 @@ end unreachable end - local.get $0 - local.get $3 + local.get $4 + local.get $5 i32.add global.set $assembly/index/off br $break|1 else - block (result i32) - local.get $0 - i32.const 16 - i32.eq - local.tee $0 - if - local.get $4 - i64.load - i64.const 7011371672682196851 - i64.eq - local.set $0 - end - local.get $0 + local.get $5 + i32.const 16 + i32.eq + if (result i32) + local.get $4 + i64.load + i64.const 7011371672682196851 + i64.eq + else + i32.const 0 end if (result i32) local.get $4 @@ -985,28 +895,28 @@ i64.const 5499551997695193200 i64.eq else - local.get $0 + i32.const 0 end if call $assembly/index/readVaruint - local.tee $0 + local.tee $2 global.get $assembly/index/off - local.tee $3 + local.tee $4 i32.add global.set $assembly/index/off - local.get $3 - local.get $0 + local.get $4 + local.get $2 call $assembly/options/onSourceMappingURL end end - local.get $5 - local.get $8 + local.get $3 + local.get $6 i32.add global.set $assembly/index/off br $break|1 end global.get $assembly/index/off - local.get $8 + local.get $3 i32.add global.set $assembly/index/off br $break|1 @@ -1015,7 +925,7 @@ end else global.get $assembly/index/off - local.get $8 + local.get $3 i32.add global.set $assembly/index/off end diff --git a/package.json b/package.json index 21b0ec2681..0ae80d4365 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,9 @@ "scripts": { "build": "webpack --mode production --display-modules", "clean": "node scripts/clean", - "check": "npm run check:config && npm run check:compiler && npm run check:library", + "check": "npm run check:config && npm run check:compiler", "check:config": "tsc --noEmit -p src --diagnostics --listFiles", "check:compiler": "tslint -c tslint.json --project src --formatters-dir lib/lint/formatters --format as", - "check:library": "tslint -c tslint.json --project std/assembly --formatters-dir lib/lint/formatters --format as", "test": "npm run test:parser && npm run test:compiler", "test:parser": "node tests/parser", "test:compiler": "node tests/compiler", diff --git a/src/ast.ts b/src/ast.ts index b0fdd9db55..ca1840920f 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -687,6 +687,9 @@ export abstract class Node { range.source.normalizedPath ); } else { // absolute + if (!normalizedPath.startsWith(LIBRARY_PREFIX)) { + normalizedPath = LIBRARY_PREFIX + normalizedPath; + } stmt.normalizedPath = normalizedPath; } stmt.internalPath = mangleInternalPath(stmt.normalizedPath); @@ -782,10 +785,18 @@ export abstract class Node { stmt.declarations = null; stmt.namespaceName = identifier; stmt.path = path; - stmt.normalizedPath = resolvePath( - normalizePath(path.value), - range.source.normalizedPath - ); + var normalizedPath = normalizePath(path.value); + if (path.value.startsWith(".")) { + stmt.normalizedPath = resolvePath( + normalizedPath, + range.source.normalizedPath + ); + } else { + if (!normalizedPath.startsWith(LIBRARY_PREFIX)) { + normalizedPath = LIBRARY_PREFIX + normalizedPath; + } + stmt.normalizedPath = normalizedPath; + } stmt.internalPath = mangleInternalPath(stmt.normalizedPath); return stmt; } @@ -1162,7 +1173,8 @@ export enum DecoratorKind { EXTERNAL, BUILTIN, LAZY, - START + START, + UNSAFE } /** Returns the kind of the specified decorator. Defaults to {@link DecoratorKind.CUSTOM}. */ @@ -1203,6 +1215,7 @@ export function decoratorNameToKind(name: Expression): DecoratorKind { } case CharCode.u: { if (nameStr == "unmanaged") return DecoratorKind.UNMANAGED; + if (nameStr == "unsafe") return DecoratorKind.UNSAFE; break; } } diff --git a/src/builtins.ts b/src/builtins.ts index 580bc858ec..d451131d91 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -6,8 +6,7 @@ import { Compiler, ConversionKind, - WrapMode, - Feature + WrapMode } from "./compiler"; import { @@ -53,13 +52,11 @@ import { import { ElementKind, - OperatorKind, FunctionPrototype, - Class, Field, Global, DecoratorFlags, - ClassPrototype + Program } from "./program"; import { @@ -71,7 +68,9 @@ import { } from "./resolver"; import { - CommonFlags + CommonFlags, + Feature, + RTTIFlags } from "./common"; import { @@ -88,6 +87,7 @@ export namespace BuiltinSymbols { // std/builtins.ts export const isInteger = "~lib/builtins/isInteger"; export const isFloat = "~lib/builtins/isFloat"; + export const isBoolean = "~lib/builtins/isBoolean"; export const isSigned = "~lib/builtins/isSigned"; export const isReference = "~lib/builtins/isReference"; export const isString = "~lib/builtins/isString"; @@ -136,6 +136,7 @@ export namespace BuiltinSymbols { export const changetype = "~lib/builtins/changetype"; export const assert = "~lib/builtins/assert"; export const unchecked = "~lib/builtins/unchecked"; + export const call_direct = "~lib/builtins/call_direct"; export const call_indirect = "~lib/builtins/call_indirect"; export const instantiate = "~lib/builtins/instantiate"; @@ -464,14 +465,48 @@ export namespace BuiltinSymbols { export const ERROR = "~lib/diagnostics/ERROR"; export const WARNING = "~lib/diagnostics/WARNING"; export const INFO = "~lib/diagnostics/INFO"; + // std/memory.ts export const HEAP_BASE = "~lib/memory/HEAP_BASE"; export const memory_size = "~lib/memory/memory.size"; export const memory_grow = "~lib/memory/memory.grow"; export const memory_copy = "~lib/memory/memory.copy"; export const memory_fill = "~lib/memory/memory.fill"; - // std/gc.ts - export const iterateRoots = "~lib/gc/iterateRoots"; + export const memory_allocate = "~lib/memory/memory.allocate"; + export const memory_free = "~lib/memory/memory.free"; + export const memory_reset = "~lib/memory/memory.reset"; + + // std/runtime.ts + export const RTTI_BASE = "~lib/runtime/RTTI_BASE"; + export const runtime_id = "~lib/runtime/__runtime_id"; + export const runtime_instanceof = "~lib/runtime/runtime.instanceof"; + export const runtime_flags = "~lib/runtime/runtime.flags"; + export const runtime_allocate = "~lib/util/runtime/allocate"; + export const runtime_reallocate = "~lib/util/runtime/reallocate"; + export const runtime_register = "~lib/util/runtime/register"; + export const runtime_discard = "~lib/util/runtime/discard"; + export const runtime_makeArray = "~lib/util/runtime/makeArray"; + export const gc_mark_roots = "~lib/runtime/__gc_mark_roots"; + export const gc_mark_members = "~lib/runtime/__gc_mark_members"; + + // std/typedarray.ts + export const Int8Array = "~lib/typedarray/Int8Array"; + export const Uint8Array = "~lib/typedarray/Uint8Array"; + export const Int16Array = "~lib/typedarray/Int16Array"; + export const Uint16Array = "~lib/typedarray/Uint16Array"; + export const Int32Array = "~lib/typedarray/Int32Array"; + export const Uint32Array = "~lib/typedarray/Uint32Array"; + export const Int64Array = "~lib/typedarray/Int64Array"; + export const Uint64Array = "~lib/typedarray/Uint64Array"; + export const Uint8ClampedArray = "~lib/typedarray/Uint8ClampedArray"; + export const Float32Array = "~lib/typedarray/Float32Array"; + export const Float64Array = "~lib/typedarray/Float64Array"; + + // compiler generated + export const started = "~lib/started"; + export const argc = "~lib/argc"; + export const setargc = "~lib/setargc"; + export const capabilities = "~lib/capabilities"; } /** Compiles a call to a built-in function. */ @@ -501,6 +536,8 @@ export function compileCall( // below, but rather done to make this file easier to work with. If there was a general rule it'd // most likely be "three or more instructions that only differ in their actual opcode". + var directize = false; + switch (prototype.internalName) { // === Static type evaluation ================================================================= @@ -521,6 +558,14 @@ export function compileCall( ? module.createI32(1) : module.createI32(0); } + case BuiltinSymbols.isBoolean: { // isBoolean() / isBoolean(value: T) -> bool + let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); + compiler.currentType = Type.bool; + if (!type) return module.createUnreachable(); + return type == Type.bool + ? module.createI32(1) + : module.createI32(0); + } case BuiltinSymbols.isSigned: { // isSigned() / isSigned(value: T) -> bool let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.bool; @@ -555,11 +600,7 @@ export function compileCall( let classReference = type.classReference; if (!classReference) return module.createI32(0); let classPrototype = classReference.prototype; - return module.createI32( - (classPrototype).extends(compiler.program.arrayPrototype) - ? 1 - : 0 - ); + return module.createI32(classPrototype.extends(compiler.program.arrayPrototype) ? 1 : 0); } case BuiltinSymbols.isArrayLike: { // isArrayLike() / isArrayLike(value: T) -> bool let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); @@ -567,12 +608,7 @@ export function compileCall( if (!type) return module.createUnreachable(); let classReference = type.classReference; if (!classReference) return module.createI32(0); - return module.createI32( - classReference.lookupInSelf("length") && ( - classReference.lookupOverload(OperatorKind.INDEXED_GET) || - classReference.lookupOverload(OperatorKind.UNCHECKED_INDEXED_GET) - ) ? 1 : 0 - ); + return module.createI32(classReference.isArrayLike ? 1 : 0); } case BuiltinSymbols.isFunction: { // isFunction / isFunction(value: T) -> bool let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); @@ -611,17 +647,10 @@ export function compileCall( return module.createI32(getExpressionId(expr) == ExpressionId.Const ? 1 : 0); } case BuiltinSymbols.isManaged: { // isManaged() -> bool - if (!compiler.program.hasGC) { - compiler.currentType = Type.bool; - return module.createI32(0); - } let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); compiler.currentType = Type.bool; if (!type) return module.createUnreachable(); - let classType = type.classReference; - return classType !== null && !classType.hasDecorator(DecoratorFlags.UNMANAGED) - ? module.createI32(1) - : module.createI32(0); + return module.createI32(type.isManaged(compiler.program) ? 1 : 0); } case BuiltinSymbols.sizeof: { // sizeof() -> usize compiler.currentType = compiler.options.usizeType; @@ -2301,10 +2330,12 @@ export function compileCall( let flow = compiler.currentFlow; let alreadyUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); flow.set(FlowFlags.UNCHECKED_CONTEXT); - let expr = compiler.compileExpressionRetainType(operands[0], contextualType, WrapMode.NONE); + // eliminate unnecessary tees by preferring contextualType(=void): + let expr = compiler.compileExpression(operands[0], contextualType, ConversionKind.NONE, WrapMode.NONE); if (!alreadyUnchecked) flow.unset(FlowFlags.UNCHECKED_CONTEXT); return expr; } + case BuiltinSymbols.call_direct: directize = true; case BuiltinSymbols.call_indirect: { // call_indirect(target: Function | u32, ...args: *[]) -> T if ( checkTypeOptional(typeArguments, reportNode, compiler, true) | @@ -2338,6 +2369,22 @@ export function compileCall( let typeRef = module.getFunctionTypeBySignature(nativeReturnType, nativeParamTypes); if (!typeRef) typeRef = module.addFunctionType(typeName, nativeReturnType, nativeParamTypes); compiler.currentType = returnType; + if (directize) { + // if the index expression is precomputable to a constant value, emit a direct call + if (getExpressionId(arg0 = module.precomputeExpression(arg0)) == ExpressionId.Const) { + assert(getExpressionType(arg0) == NativeType.I32); + let index = getConstValueI32(arg0); + let functionTable = compiler.functionTable; + if (index >= 0 && index < functionTable.length) { + return module.createCall(functionTable[index], operandExprs, nativeReturnType); + } + } + compiler.error( + DiagnosticCode.Operation_not_supported, + operands[0].range + ); + return module.createUnreachable(); + } // of course this can easily result in a 'RuntimeError: function signature mismatch' trap and // thus must be used with care. it exists because it *might* be useful in specific scenarios. return module.createCallIndirect(arg0, operandExprs, typeName); @@ -3581,36 +3628,47 @@ export function compileCall( return module.createUnary(op, arg0); } - // === GC integration ========================================================================= + // === Internal runtime ======================================================================= - case BuiltinSymbols.iterateRoots: { + case BuiltinSymbols.runtime_id: { + let type = evaluateConstantType(compiler, typeArguments, operands, reportNode); + compiler.currentType = Type.u32; + if (!type) return module.createUnreachable(); + let classReference = type.classReference; + if (!classReference || classReference.hasDecorator(DecoratorFlags.UNMANAGED)) { + compiler.error( + DiagnosticCode.Operation_not_supported, + reportNode.range + ); + return module.createUnreachable(); + } + return module.createI32(classReference.id); + } + case BuiltinSymbols.gc_mark_roots: { if ( checkTypeAbsent(typeArguments, reportNode, prototype) | - checkArgsRequired(operands, 1, reportNode, compiler) + checkArgsRequired(operands, 0, reportNode, compiler) ) { compiler.currentType = Type.void; return module.createUnreachable(); } - let expr = compiler.compileExpressionRetainType(operands[0], Type.u32, WrapMode.NONE); - let type = compiler.currentType; - let signatureReference = type.signatureReference; + compiler.needsGcMark = true; + compiler.currentType = Type.void; + return module.createCall(BuiltinSymbols.gc_mark_roots, null, NativeType.None); + } + case BuiltinSymbols.gc_mark_members: { if ( - !type.is(TypeFlags.REFERENCE) || - !signatureReference || - signatureReference.parameterTypes.length != 1 || - signatureReference.parameterTypes[0] != compiler.options.usizeType - ) { - compiler.error( - DiagnosticCode.Type_0_is_not_assignable_to_type_1, - reportNode.range, type.toString(), "(ref: usize) => void" - ); + checkTypeAbsent(typeArguments, reportNode, prototype) | + checkArgsRequired(operands, 2, reportNode, compiler) + ) { compiler.currentType = Type.void; return module.createUnreachable(); } - // just emit a call even if the function doesn't yet exist - compiler.needsIterateRoots = true; + let arg0 = compiler.compileExpression(operands[0], Type.u32, ConversionKind.IMPLICIT, WrapMode.NONE); + let arg1 = compiler.compileExpression(operands[1], compiler.options.usizeType, ConversionKind.IMPLICIT, WrapMode.NONE); + compiler.needsGcMark = true; compiler.currentType = Type.void; - return module.createCall("~iterateRoots", [ expr ], NativeType.None); + return module.createCall(BuiltinSymbols.gc_mark_members, [ arg0, arg1 ], NativeType.None); } } @@ -3993,12 +4051,15 @@ export function compileAbort( ]); } -/** Compiles the iterateRoots function if required. */ -export function compileIterateRoots(compiler: Compiler): void { +/** Compiles the `__gc_mark_roots` function. */ +export function compileMarkRoots(compiler: Compiler): void { var module = compiler.module; var exprs = new Array(); - var typeName = Signature.makeSignatureString([ Type.i32 ], Type.void); - var typeRef = compiler.ensureFunctionType([ Type.i32 ], Type.void); + var typeRef = compiler.ensureFunctionType(null, Type.void); + var nativeSizeType = compiler.options.nativeSizeType; + var markRef = assert(compiler.program.markRef); + + compiler.compileFunction(markRef); for (let element of compiler.program.elementsByName.values()) { if (element.kind != ElementKind.GLOBAL) continue; @@ -4011,159 +4072,201 @@ export function compileIterateRoots(compiler: Compiler): void { ) { if (global.is(CommonFlags.INLINED)) { let value = global.constantIntegerValue; - exprs.push( - module.createCallIndirect( - module.createGetLocal(0, NativeType.I32), - [ + if (i64_low(value) || i64_high(value)) { + exprs.push( + module.createCall(markRef.internalName, [ compiler.options.isWasm64 ? module.createI64(i64_low(value), i64_high(value)) : module.createI32(i64_low(value)) - ], - typeName - ) - ); + ], NativeType.None) + ); + } } else { exprs.push( - module.createCallIndirect( - module.createGetLocal(0, NativeType.I32), - [ - module.createGetGlobal( - global.internalName, - compiler.options.nativeSizeType - ) - ], - typeName + module.createIf( + module.createTeeLocal( + 0, + module.createGetGlobal(global.internalName, nativeSizeType) + ), + module.createCall(markRef.internalName, [ + module.createGetLocal(0, nativeSizeType) + ], NativeType.None) ) ); } } } - module.addFunction("~iterateRoots", typeRef, [], + module.addFunction(BuiltinSymbols.gc_mark_roots, typeRef, [ nativeSizeType ], exprs.length ? module.createBlock(null, exprs) : module.createNop() ); } -/** Ensures that the specified class's GC hook exists and returns its function table index. */ -export function ensureGCHook( - compiler: Compiler, - classInstance: Class -): u32 { +/** Compiles the `__gc_mark_members` function. */ +export function compileMarkMembers(compiler: Compiler): void { var program = compiler.program; - assert(classInstance.type.isManaged(program)); - - // check if the GC hook has already been created - { - let existingIndex = classInstance.gcHookIndex; - if (existingIndex != -1) return existingIndex; - } - - // check if the class implements a custom GC function (only valid for library elements) - var members = classInstance.members; - if (classInstance.isDeclaredInLibrary) { - if (members !== null && members.has("__gc")) { - let gcPrototype = assert(members.get("__gc")); - assert(gcPrototype.kind == ElementKind.FUNCTION_PROTOTYPE); - let gcInstance = assert(program.resolver.resolveFunction(gcPrototype, null)); - assert(gcInstance.is(CommonFlags.PRIVATE | CommonFlags.INSTANCE)); - assert(!gcInstance.isAny(CommonFlags.AMBIENT | CommonFlags.VIRTUAL)); - assert(gcInstance.signature.parameterTypes.length == 0); - assert(gcInstance.signature.returnType == Type.void); - gcInstance.internalName = classInstance.internalName + "~gc"; - assert(compiler.compileFunction(gcInstance)); - let index = compiler.ensureFunctionTableEntry(gcInstance); - classInstance.gcHookIndex = index; - return index; - } - } - var module = compiler.module; - var options = compiler.options; - var nativeSizeType = options.nativeSizeType; - var nativeSizeSize = options.usizeType.byteSize; - var body = new Array(); + var usizeType = program.options.usizeType; + var nativeSizeType = usizeType.toNativeType(); + var nativeSizeSize = usizeType.byteSize; + var ftype = compiler.ensureFunctionType([ Type.i32, usizeType ], Type.void); + var managedClasses = program.managedClasses; + var markRef = assert(program.markRef); + var names: string[] = [ "invalid" ]; // classId=0 is invalid + var blocks = new Array(); + var lastId = 0; - // nothing to mark if 'this' is null - body.push( - module.createIf( - module.createUnary( - options.isWasm64 - ? UnaryOp.EqzI64 - : UnaryOp.EqzI32, - module.createGetLocal(0, nativeSizeType) - ), - module.createReturn() - ) - ); - - // remember the function index so we don't recurse infinitely - var functionTable = compiler.functionTable; - var gcHookIndex = functionTable.length; - functionTable.push(""); - classInstance.gcHookIndex = gcHookIndex; + for (let [id, instance] of managedClasses) { + assert(instance.type.isManaged(program)); + assert(id == ++lastId); + names.push(instance.internalName); - // if the class extends a base class, call its hook first (calls mark) - var baseInstance = classInstance.base; - if (baseInstance) { - assert(baseInstance.type.isManaged(program)); - body.push( - module.createCallIndirect( - module.createI32( - ensureGCHook(compiler, baseInstance.type.classReference) - ), - [ - module.createGetLocal(0, nativeSizeType) - ], - "FUNCSIG$" + (nativeSizeType == NativeType.I64 ? "vj" : "vi") - ) - ); + let traverseImpl = instance.lookupInSelf("__traverse"); - // if this class is the top-most base class, mark the instance - } else { - body.push( - module.createCall(assert(program.gcMarkInstance).internalName, [ - module.createGetLocal(0, nativeSizeType) - ], NativeType.None) - ); - } + // if a library element, check if it implements a custom traversal function + if (instance.isDeclaredInLibrary && traverseImpl) { + assert(traverseImpl.kind == ElementKind.FUNCTION_PROTOTYPE); + let traverseFunc = program.resolver.resolveFunction(traverseImpl, null); + if (!traverseFunc || !compiler.compileFunction(traverseFunc)) { + blocks.push([ + module.createUnreachable() + ]); + continue; + } + blocks.push([ + module.createCall(traverseFunc.internalName, [ + module.createGetLocal(1, nativeSizeType) + ], NativeType.None), + module.createReturn() + ]); - // mark instances assigned to own fields that are again references - if (members) { - for (let member of members.values()) { - if (member.kind == ElementKind.FIELD) { - if ((member).parent === classInstance) { - let type = (member).type; - if (type.isManaged(program)) { - let offset = (member).memoryOffset; - assert(offset >= 0); - body.push( - module.createCall(assert(program.gcMarkInstance).internalName, [ - module.createLoad( - nativeSizeSize, - false, - module.createGetLocal(0, nativeSizeType), - nativeSizeType, - offset - ) - ], NativeType.None) - ); + // otherwise generate one + } else { + // traverse references assigned to own fields + let block = new Array(); + let members = instance.members; + if (members) { + for (let member of members.values()) { + if (member.kind == ElementKind.FIELD) { + if ((member).parent === instance) { + let fieldType = (member).type; + if (fieldType.isManaged(program)) { + let fieldClass = fieldType.classReference!; + let fieldClassId = fieldClass.id; + let fieldOffset = (member).memoryOffset; + assert(fieldOffset >= 0); + block.push( + // if ($2 = value) FIELDCLASS~traverse($2) + module.createIf( + module.createTeeLocal(2, + module.createLoad( + nativeSizeSize, + false, + module.createGetLocal(1, nativeSizeType), + nativeSizeType, + fieldOffset + ) + ), + module.createBlock(null, [ + module.createCall(markRef.internalName, [ + module.createGetLocal(2, nativeSizeType) + ], NativeType.None), + module.createCall(BuiltinSymbols.gc_mark_members, [ + module.createI32(fieldClassId), + module.createGetLocal(2, nativeSizeType) + ], NativeType.None) + ]) + ) + ); + } + } } } } + block.push(module.createReturn()); + blocks.push(block); } } - // add the function to the module and return its table index - var funcName = classInstance.internalName + "~gc"; - module.addFunction( - funcName, - compiler.ensureFunctionType(null, Type.void, options.usizeType), - null, - module.createBlock(null, body) - ); - functionTable[gcHookIndex] = funcName; - return gcHookIndex; + var current: ExpressionRef; + if (blocks.length) { + // create a big switch mapping class ids to traversal logic + current = module.createBlock(names[1], [ + module.createSwitch(names, "invalid", module.createGetLocal(0, NativeType.I32)) + ]); + for (let i = 0, k = blocks.length; i < k; ++i) { + blocks[i].unshift(current); + current = module.createBlock(i == k - 1 ? "invalid" : names[i + 2], blocks[i]); + } + compiler.compileFunction(markRef); + // wrap the function with a terminating unreachable + current = module.createBlock(null, [ + current, + module.createUnreachable() + ]); + } else { + // simplify + current = module.createUnreachable(); + } + module.addFunction(BuiltinSymbols.gc_mark_members, ftype, [ nativeSizeType ], current); +} + +function typeToRuntimeFlags(type: Type, program: Program): RTTIFlags { + var flags = RTTIFlags.VALUE_ALIGN_0 * (1 << type.alignLog2); + if (type.is(TypeFlags.NULLABLE)) flags |= RTTIFlags.VALUE_NULLABLE; + if (type.isManaged(program)) flags |= RTTIFlags.VALUE_MANAGED; + return flags / RTTIFlags.VALUE_ALIGN_0; +} + +/** Compiles runtime type information for use by stdlib. */ +export function compileRTTI(compiler: Compiler): void { + var program = compiler.program; + var module = compiler.module; + var managedClasses = program.managedClasses; + var count = managedClasses.size; + var size = 8 + 8 * count; + var data = new Uint8Array(size); + writeI32(count, data, 0); + var off = 8; + var arrayPrototype = assert(program.arrayPrototype); + var setPrototype = assert(program.setPrototype); + var mapPrototype = assert(program.mapPrototype); + var lastId = 0; + for (let [id, instance] of managedClasses) { + assert(id == ++lastId); + let flags: RTTIFlags = 0; + if (instance.isAcyclic) flags |= RTTIFlags.ACYCLIC; + if (instance.prototype.extends(arrayPrototype)) { + let typeArguments = assert(instance.getTypeArgumentsTo(arrayPrototype)); + assert(typeArguments.length == 1); + flags |= RTTIFlags.ARRAY; + flags |= RTTIFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + } else if (instance.prototype.extends(setPrototype)) { + let typeArguments = assert(instance.getTypeArgumentsTo(setPrototype)); + assert(typeArguments.length == 1); + flags |= RTTIFlags.SET; + flags |= RTTIFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + } else if (instance.prototype.extends(mapPrototype)) { + let typeArguments = assert(instance.getTypeArgumentsTo(mapPrototype)); + assert(typeArguments.length == 2); + flags |= RTTIFlags.MAP; + flags |= RTTIFlags.KEY_ALIGN_0 * typeToRuntimeFlags(typeArguments[0], program); + flags |= RTTIFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(typeArguments[1], program); + } + writeI32(flags, data, off); off += 4; + let base = instance.base; + writeI32(base ? base.id : 0, data, off); off += 4; + } + assert(off == size); + var usizeType = program.options.usizeType; + var segment = compiler.addMemorySegment(data); + if (usizeType.size == 8) { + let offset = segment.offset; + module.addGlobal(BuiltinSymbols.RTTI_BASE, NativeType.I64, false, module.createI64(i64_low(offset), i64_high(offset))); + } else { + module.addGlobal(BuiltinSymbols.RTTI_BASE, NativeType.I32, false, module.createI32(i64_low(segment.offset))); + } } // Helpers diff --git a/src/common.ts b/src/common.ts index e2518b28a3..78d5840067 100644 --- a/src/common.ts +++ b/src/common.ts @@ -75,6 +75,7 @@ export enum CommonFlags { // Other + /** Is quoted. */ QUOTED = 1 << 28 } @@ -141,10 +142,6 @@ export namespace CommonSymbols { export const this_ = "this"; export const super_ = "super"; export const constructor = "constructor"; -} - -/** Common standard library symbols. */ -export namespace LibrarySymbols { // constants export const ASC_TARGET = "ASC_TARGET"; export const ASC_NO_TREESHAKING = "ASC_NO_TREESHAKING"; @@ -174,17 +171,28 @@ export namespace LibrarySymbols { export const V128 = "V128"; export const String = "String"; export const Array = "Array"; + export const FixedArray = "FixedArray"; + export const Set = "Set"; + export const Map = "Map"; + export const ArrayBufferView = "ArrayBufferView"; export const ArrayBuffer = "ArrayBuffer"; export const Math = "Math"; export const Mathf = "Mathf"; // runtime - export const memory = "memory"; - export const allocate = "allocate"; export const abort = "abort"; - export const main = "main"; - // other - export const length = "length"; - export const byteLength = "byteLength"; export const pow = "pow"; export const mod = "mod"; + export const allocate = "allocate"; + export const reallocate = "reallocate"; + export const register = "register"; + export const discard = "discard"; + export const newString = "newString"; + export const newArrayBuffer = "newArrayBuffer"; + export const newArray = "newArray"; } + +// shared +import { Feature } from "../std/assembly/common/feature"; +import { RTTIData, RTTIFlags } from "../std/assembly/common/rtti"; +import { Target } from "../std/assembly/common/target"; +export { Feature, RTTIData, RTTIFlags, Target }; diff --git a/src/compiler.ts b/src/compiler.ts index 534d08ca33..81a74e7738 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -4,11 +4,12 @@ *//***/ import { + BuiltinSymbols, compileCall as compileBuiltinCall, compileAbort, - compileIterateRoots, - ensureGCHook, - BuiltinSymbols + compileMarkRoots, + compileMarkMembers, + compileRTTI, } from "./builtins"; import { @@ -37,7 +38,8 @@ import { getBlockChildCount, getBlockChild, getBlockName, - needsExplicitUnreachable + needsExplicitUnreachable, + getGetLocalIndex } from "./module"; import { @@ -46,9 +48,10 @@ import { STATIC_DELIMITER, GETTER_PREFIX, SETTER_PREFIX, - LibrarySymbols, CommonSymbols, - INDEX_SUFFIX + INDEX_SUFFIX, + Feature, + Target } from "./common"; import { @@ -72,12 +75,14 @@ import { DecoratorFlags, PropertyPrototype, File, - mangleInternalName + mangleInternalName, + CollectorKind } from "./program"; import { FlowFlags, - Flow + Flow, + LocalFlags } from "./flow"; import { @@ -170,14 +175,6 @@ import { makeMap } from "./util"; -/** Compilation target. */ -export enum Target { - /** WebAssembly with 32-bit pointers. */ - WASM32, - /** WebAssembly with 64-bit pointers. Experimental and not supported by any runtime yet. */ - WASM64 -} - /** Compiler options. */ export class Options { @@ -231,22 +228,6 @@ export class Options { } } -/** Indicates specific features to activate. */ -export const enum Feature { - /** No additional features. */ - NONE = 0, - /** Sign extension operations. */ - SIGN_EXTENSION = 1 << 0, // see: https://github.com/WebAssembly/sign-extension-ops - /** Mutable global imports and exports. */ - MUTABLE_GLOBAL = 1 << 1, // see: https://github.com/WebAssembly/mutable-global - /** Bulk memory operations. */ - BULK_MEMORY = 1 << 2, // see: https://github.com/WebAssembly/bulk-memory-operations - /** SIMD types and operations. */ - SIMD = 1 << 3, // see: https://github.com/WebAssembly/simd - /** Threading and atomic operations. */ - THREADS = 1 << 4 // see: https://github.com/WebAssembly/threads -} - /** Indicates the desired kind of a conversion. */ export const enum ConversionKind { /** No conversion. */ @@ -298,8 +279,12 @@ export class Compiler extends DiagnosticEmitter { argcVar: GlobalRef = 0; /** Argument count helper setter. */ argcSet: FunctionRef = 0; - /** Indicates whether the iterateRoots function must be generated. */ - needsIterateRoots: bool = false; + /** Whether HEAP_BASE is required. */ + needsHeap: bool = false; + /** Indicates whether the __gc_mark_* functions must be generated. */ + needsGcMark: bool = false; + /** Whether RTTI is required. */ + needsRTTI: bool = false; /** Compiles a {@link Program} to a {@link Module} using the specified options. */ static compile(program: Program, options: Options | null = null): Module { @@ -339,19 +324,11 @@ export class Compiler extends DiagnosticEmitter { // add a mutable heap base dummy if (options.isWasm64) { - module.addGlobal( - BuiltinSymbols.HEAP_BASE, - NativeType.I64, - true, - module.createI64(0, 0) - ); + module.addGlobal(BuiltinSymbols.HEAP_BASE, NativeType.I64, true, module.createI64(0)); + module.addGlobal(BuiltinSymbols.RTTI_BASE, NativeType.I64, true, module.createI64(0)); } else { - module.addGlobal( - BuiltinSymbols.HEAP_BASE, - NativeType.I32, - false, - module.createI32(0) - ); + module.addGlobal(BuiltinSymbols.HEAP_BASE, NativeType.I32, true, module.createI32(0)); + module.addGlobal(BuiltinSymbols.RTTI_BASE, NativeType.I32, true, module.createI32(0)); } // compile entry file(s) while traversing reachable elements @@ -381,25 +358,39 @@ export class Compiler extends DiagnosticEmitter { if (!explicitStartFunction) module.setStart(funcRef); } + // compile gc features if utilized + if (this.needsGcMark) { + compileMarkRoots(this); + compileMarkMembers(this); + } + + // compile runtime type information + module.removeGlobal(BuiltinSymbols.RTTI_BASE); + if (this.needsRTTI) { + compileRTTI(this); + } + // update the heap base pointer var memoryOffset = this.memoryOffset; memoryOffset = i64_align(memoryOffset, options.usizeType.byteSize); this.memoryOffset = memoryOffset; module.removeGlobal(BuiltinSymbols.HEAP_BASE); - if (options.isWasm64) { - module.addGlobal( - BuiltinSymbols.HEAP_BASE, - NativeType.I64, - false, - module.createI64(i64_low(memoryOffset), i64_high(memoryOffset)) - ); - } else { - module.addGlobal( - BuiltinSymbols.HEAP_BASE, - NativeType.I32, - false, - module.createI32(i64_low(memoryOffset)) - ); + if (this.needsHeap) { + if (options.isWasm64) { + module.addGlobal( + BuiltinSymbols.HEAP_BASE, + NativeType.I64, + false, + module.createI64(i64_low(memoryOffset), i64_high(memoryOffset)) + ); + } else { + module.addGlobal( + BuiltinSymbols.HEAP_BASE, + NativeType.I32, + false, + module.createI32(i64_low(memoryOffset)) + ); + } } // set up memory @@ -421,7 +412,6 @@ export class Compiler extends DiagnosticEmitter { // set up function table var functionTable = this.functionTable; module.setFunctionTable(functionTable.length, 0xffffffff, functionTable); - module.addTableExport("0", "table"); module.addFunction("null", this.ensureFunctionType(null, Type.void), null, module.createBlock(null, [])); // import table if requested (default table is named '0' by Binaryen) @@ -429,27 +419,23 @@ export class Compiler extends DiagnosticEmitter { // set up module exports for (let file of this.program.filesByName.values()) { - if (file.source.isEntry) this.makeModuleExports(file); + if (file.source.isEntry) this.ensureModuleExports(file); } - - // set up gc - if (this.needsIterateRoots) compileIterateRoots(this); - return module; } /** Applies the respective module exports for the specified file. */ - private makeModuleExports(file: File): void { + private ensureModuleExports(file: File): void { var members = file.exports; - if (members) for (let [name, member] of members) this.makeModuleExport(name, member); + if (members) for (let [name, member] of members) this.ensureModuleExport(name, member); var exportsStar = file.exportsStar; if (exportsStar) { - for (let i = 0, k = exportsStar.length; i < k; ++i) this.makeModuleExports(exportsStar[i]); + for (let i = 0, k = exportsStar.length; i < k; ++i) this.ensureModuleExports(exportsStar[i]); } } /** Applies the respective module export(s) for the specified element. */ - private makeModuleExport(name: string, element: Element, prefix: string = ""): void { + private ensureModuleExport(name: string, element: Element, prefix: string = ""): void { switch (element.kind) { // traverse instances @@ -462,7 +448,7 @@ export class Compiler extends DiagnosticEmitter { let fullName = instance.internalName; instanceName += fullName.substring(fullName.lastIndexOf("<")); } - this.makeModuleExport(instanceName, instance, prefix); + this.ensureModuleExport(instanceName, instance, prefix); } } break; @@ -476,7 +462,7 @@ export class Compiler extends DiagnosticEmitter { let fullName = instance.internalName; instanceName += fullName.substring(fullName.lastIndexOf("<")); } - this.makeModuleExport(instanceName, instance, prefix); + this.ensureModuleExport(instanceName, instance, prefix); } } break; @@ -484,8 +470,8 @@ export class Compiler extends DiagnosticEmitter { case ElementKind.PROPERTY_PROTOTYPE: { let getter = (element).getterPrototype; let setter = (element).setterPrototype; - if (getter) this.makeModuleExport(GETTER_PREFIX + name, getter, prefix); - if (setter) this.makeModuleExport(SETTER_PREFIX + name, setter, prefix); + if (getter) this.ensureModuleExport(GETTER_PREFIX + name, getter, prefix); + if (setter) this.ensureModuleExport(SETTER_PREFIX + name, setter, prefix); break; } @@ -526,58 +512,31 @@ export class Compiler extends DiagnosticEmitter { } case ElementKind.PROPERTY: { let getter = (element).getterInstance; - if (getter) this.makeModuleExport(GETTER_PREFIX + name, getter, prefix); + if (getter) this.ensureModuleExport(GETTER_PREFIX + name, getter, prefix); let setter = (element).setterInstance; - if (setter) this.makeModuleExport(SETTER_PREFIX + name, setter, prefix); + if (setter) this.ensureModuleExport(SETTER_PREFIX + name, setter, prefix); break; } case ElementKind.FIELD: { - let module = this.module; - let type = (element).type; - let nativeType = type.toNativeType(); - let offset = (element).memoryOffset; - let usizeType = this.options.usizeType; - let nativeSizeType = this.options.nativeSizeType; - - // make a getter - let getterName = prefix + GETTER_PREFIX + name; - module.addFunction( - getterName, - this.ensureFunctionType(null, type, usizeType), - null, - module.createLoad( - type.byteSize, - type.is(TypeFlags.SIGNED), - module.createGetLocal(0, nativeSizeType), - nativeType, - offset - ) - ); - module.addFunctionExport(getterName, getterName); - - // make a setter + this.ensureModuleFieldGetter(prefix + GETTER_PREFIX + name, element); if (!element.is(CommonFlags.READONLY)) { - let setterName = prefix + SETTER_PREFIX + name; - module.addFunction( - setterName, - this.ensureFunctionType([ type ], Type.void, usizeType), - null, - module.createStore( - type.byteSize, - module.createGetLocal(0, nativeSizeType), - module.createGetLocal(1, nativeType), - nativeType, - offset - ) - ); - module.addFunctionExport(setterName, setterName); + this.ensureModuleFieldSetter(prefix + SETTER_PREFIX + name, element); + } + break; + } + case ElementKind.CLASS: { + // make the class name itself represent its runtime id + if (!(element).type.isUnmanaged) { + let module = this.module; + let internalName = (element).internalName; + module.addGlobal(internalName, NativeType.I32, false, module.createI32((element).id)); + module.addGlobalExport(internalName, prefix + name); } break; } // just traverse members below case ElementKind.ENUM: - case ElementKind.CLASS: case ElementKind.NAMESPACE: case ElementKind.FILE: case ElementKind.TYPEDEFINITION: break; @@ -598,18 +557,111 @@ export class Compiler extends DiagnosticEmitter { ) { for (let member of members.values()) { if (!member.is(CommonFlags.EXPORT)) continue; - this.makeModuleExport(member.name, member, subPrefix); + this.ensureModuleExport(member.name, member, subPrefix); } } else { for (let member of members.values()) { if (member.is(CommonFlags.PRIVATE)) continue; - this.makeModuleExport(member.name, member, subPrefix); + this.ensureModuleExport(member.name, member, subPrefix); + } + } + } + } + + /** Makes a function to get the value of a field of an exported class. */ + private ensureModuleFieldGetter(name: string, field: Field): void { + var module = this.module; + var type = field.type; + var usizeType = this.options.usizeType; + module.addFunction( + name, + this.ensureFunctionType(null, type, usizeType), + null, + module.createLoad(type.byteSize, type.is(TypeFlags.SIGNED), + module.createGetLocal(0, usizeType.toNativeType()), + type.toNativeType(), field.memoryOffset + ) + ); + module.addFunctionExport(name, name); + } + + /** Makes a function to set the value of a field of an exported class. */ + private ensureModuleFieldSetter(name: string, field: Field): void { + var module = this.module; + var program = this.program; + var type = field.type; + var nativeType = type.toNativeType(); + var usizeType = this.options.usizeType; + var nativeSizeType = usizeType.toNativeType(); + if (type.isManaged(program)) { + let fn1: Function | null, fn2: Function | null; + let body: ExpressionRef[] = []; + if (fn1 = program.linkRef) { // tracing + if (fn2 = program.unlinkRef) { + body.push( + module.createCall(fn2.internalName, [ + module.createGetLocal(2, nativeType), + module.createGetLocal(0, nativeSizeType) + ], NativeType.None) + ); } + body.push( + module.createCall(fn1.internalName, [ + module.createGetLocal(1, nativeSizeType), + module.createGetLocal(0, nativeSizeType) + ], NativeType.None) + ); + } else if (fn1 = program.retainRef) { // arc + fn2 = assert(program.releaseRef); + body.push( + module.createCall(fn2.internalName, [ + module.createGetLocal(2, nativeType) + ], NativeType.None) + ); + body.push( + module.createCall(fn1.internalName, [ + module.createGetLocal(1, nativeSizeType) + ], NativeType.None) + ); } + module.addFunction( + name, + this.ensureFunctionType([ type ], Type.void, usizeType), + [ nativeType ], + module.createIf( // if (value != oldValue) release/retain .. + module.createBinary( + nativeSizeType == NativeType.I64 + ? BinaryOp.NeI64 + : BinaryOp.NeI32, + module.createGetLocal(1, nativeType), + module.createTeeLocal(2, + module.createLoad(type.byteSize, false, + module.createGetLocal(0, nativeSizeType), + nativeType, field.memoryOffset + ) + ) + ), + module.createBlock(null, body) + ) + ); + } else { + module.addFunction( + name, + this.ensureFunctionType([ type ], Type.void, usizeType), + null, + module.createStore( + type.byteSize, + module.createGetLocal(0, nativeSizeType), + module.createGetLocal(1, nativeType), + nativeType, + field.memoryOffset + ) + ); } + module.addFunctionExport(name, name); } - // general + // === Elements ================================================================================= /** Compiles any element. */ compileElement(element: Element, compileMembers: bool = true): void { @@ -664,7 +716,12 @@ export class Compiler extends DiagnosticEmitter { var exports = file.exports; if (exports) for (let element of exports.values()) this.compileElement(element); var exportsStar = file.exportsStar; - if (exportsStar) for (let exportStar of exportsStar) this.compileFile(exportStar); + if (exportsStar) { + for (let exportStar of exportsStar) { + this.compileFile(exportStar); + this.compileExports(exportStar); + } + } } // files @@ -729,7 +786,7 @@ export class Compiler extends DiagnosticEmitter { } } - // globals + // === Globals ================================================================================== compileGlobal(global: Global): bool { if (global.is(CommonFlags.COMPILED)) return true; @@ -787,9 +844,14 @@ export class Compiler extends DiagnosticEmitter { } // ambient builtins like 'HEAP_BASE' need to be resolved but are added explicitly - if (global.is(CommonFlags.AMBIENT) && global.hasDecorator(DecoratorFlags.BUILTIN)) return true; + if (global.is(CommonFlags.AMBIENT) && global.hasDecorator(DecoratorFlags.BUILTIN)) { + if (global.internalName == BuiltinSymbols.HEAP_BASE) this.needsHeap = true; + else if (global.internalName == BuiltinSymbols.RTTI_BASE) this.needsRTTI = true; + return true; + } - var nativeType = global.type.toNativeType(); + var type = global.type; + var nativeType = type.toNativeType(); var isDeclaredConstant = global.is(CommonFlags.CONST) || global.is(CommonFlags.STATIC | CommonFlags.READONLY); // handle imports @@ -831,9 +893,10 @@ export class Compiler extends DiagnosticEmitter { } initExpr = this.compileExpression( initializerNode, - global.type, + type, ConversionKind.IMPLICIT, - WrapMode.WRAP + WrapMode.WRAP, + global ); this.currentFlow = previousFlow; } @@ -893,7 +956,7 @@ export class Compiler extends DiagnosticEmitter { // initialize to zero if there's no initializer } else { - initExpr = global.type.toNativeZero(module); + initExpr = type.toNativeZero(module); } var internalName = global.internalName; @@ -902,19 +965,23 @@ export class Compiler extends DiagnosticEmitter { if (global.hasDecorator(DecoratorFlags.INLINE)) { this.error( DiagnosticCode.Decorator_0_is_not_valid_here, - global.identifierNode.range, "inline" + assert(findDecorator(DecoratorKind.INLINE, global.decoratorNodes)).range, "inline" ); } - module.addGlobal(internalName, nativeType, true, global.type.toNativeZero(module)); - this.currentBody.push(module.createSetGlobal(internalName, initExpr)); - + module.addGlobal(internalName, nativeType, true, type.toNativeZero(module)); + if (type.isManaged(this.program) && this.program.retainRef) { + initExpr = this.makeInsertRef(initExpr, null, type.is(TypeFlags.NULLABLE)); + } + this.currentBody.push( + module.createSetGlobal(internalName, initExpr) + ); } else if (!global.hasDecorator(DecoratorFlags.INLINE)) { // compile normally module.addGlobal(internalName, nativeType, !isDeclaredConstant, initExpr); } return true; } - // enums + // === Enums ==================================================================================== compileEnum(element: Enum): bool { if (element.is(CommonFlags.COMPILED)) return true; @@ -985,7 +1052,7 @@ export class Compiler extends DiagnosticEmitter { if (initInStart) { module.addGlobal(val.internalName, NativeType.I32, true, module.createI32(0)); this.currentBody.push( - module.createSetGlobal(val.internalName, initExpr) + this.makeGlobalAssignment(val, initExpr, false) ); previousValueIsMut = true; } else { @@ -1007,7 +1074,7 @@ export class Compiler extends DiagnosticEmitter { return true; } - // functions + // === Functions ================================================================================ /** Resolves the specified type arguments prior to compiling the resulting function instance. */ compileFunctionUsingTypeArguments( @@ -1061,16 +1128,15 @@ export class Compiler extends DiagnosticEmitter { } /** Compiles the body of a function within the specified flow. */ - private compileFunctionBody(instance: Function): ExpressionRef[] { + compileFunctionBody(instance: Function, stmts: ExpressionRef[] | null = null): ExpressionRef[] { var module = this.module; var bodyNode = assert(instance.prototype.bodyNode); var returnType = instance.signature.returnType; var flow = this.currentFlow; // compile statements - var stmts: BinaryenExportRef[]; if (bodyNode.kind == NodeKind.BLOCK) { - stmts = this.compileStatements((bodyNode).statements, true); + stmts = this.compileStatements((bodyNode).statements, true, stmts); } else { // must be an expression statement if not a block assert(bodyNode.kind == NodeKind.EXPRESSION); @@ -1089,21 +1155,22 @@ export class Compiler extends DiagnosticEmitter { ); flow.set(FlowFlags.RETURNS); if (!flow.canOverflow(stmt, returnType)) flow.set(FlowFlags.RETURNS_WRAPPED); - stmts = [ stmt ]; + if (!stmts) stmts = [ stmt ]; + else stmts.push(stmt); } // make the main function call `start` implicitly, but only once if (instance.prototype == this.program.explicitStartFunction) { - module.addGlobal(CompilerSymbols.started, NativeType.I32, true, module.createI32(0)); + module.addGlobal(BuiltinSymbols.started, NativeType.I32, true, module.createI32(0)); stmts.unshift( module.createIf( module.createUnary( UnaryOp.EqzI32, - module.createGetGlobal(CompilerSymbols.started, NativeType.I32) + module.createGetGlobal(BuiltinSymbols.started, NativeType.I32) ), module.createBlock(null, [ module.createCall("start", null, NativeType.None), - module.createSetGlobal(CompilerSymbols.started, module.createI32(1)) + module.createSetGlobal(BuiltinSymbols.started, module.createI32(1)) ]) ) ); @@ -1133,7 +1200,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(thisLocalIndex, nativeSizeType) ), module.createSetLocal(thisLocalIndex, - this.makeAllocation(classInstance) + this.makeAllocation(classInstance, instance.identifierNode) ) ) ); @@ -1242,7 +1309,7 @@ export class Compiler extends DiagnosticEmitter { return true; } - // classes + // === Classes ================================================================================== compileClassUsingTypeArguments( prototype: ClassPrototype, @@ -1361,7 +1428,7 @@ export class Compiler extends DiagnosticEmitter { ); } - // memory + // === Memory =================================================================================== /** Adds a static memory segment with the specified data. */ addMemorySegment(buffer: Uint8Array, alignment: i32 = 8): MemorySegment { @@ -1372,7 +1439,144 @@ export class Compiler extends DiagnosticEmitter { return segment; } - // function table + /** Ensures that the specified string exists in static memory and returns a pointer to it. */ + ensureStaticString(stringValue: string): ExpressionRef { + var program = this.program; + var rtHeaderSize = program.runtimeHeaderSize; + var stringInstance = assert(program.stringInstance); + var stringSegment: MemorySegment; + var segments = this.stringSegments; + if (segments.has(stringValue)) { + stringSegment = segments.get(stringValue)!; // reuse + } else { + let length = stringValue.length; + let buffer = new Uint8Array(rtHeaderSize + (length << 1)); + program.writeRuntimeHeader(buffer, 0, stringInstance.id, length << 1); + for (let i = 0; i < length; ++i) { + writeI16(stringValue.charCodeAt(i), buffer, rtHeaderSize + (i << 1)); + } + stringSegment = this.addMemorySegment(buffer); + segments.set(stringValue, stringSegment); + } + var ref = i64_add(stringSegment.offset, i64_new(rtHeaderSize)); + this.currentType = stringInstance.type; + if (this.options.isWasm64) { + return this.module.createI64(i64_low(ref), i64_high(ref)); + } else { + assert(i64_is_u32(ref)); + return this.module.createI32(i64_low(ref)); + } + } + + ensureStaticArrayBuffer(elementType: Type, values: ExpressionRef[]): MemorySegment { + var program = this.program; + var length = values.length; + var byteSize = elementType.byteSize; + var byteLength = length * byteSize; + var bufferInstance = assert(program.arrayBufferInstance); + var runtimeHeaderSize = program.runtimeHeaderSize; + + var buf = new Uint8Array(runtimeHeaderSize + byteLength); + program.writeRuntimeHeader(buf, 0, bufferInstance.id, byteLength); + var pos = runtimeHeaderSize; + var nativeType = elementType.toNativeType(); + switch (nativeType) { + case NativeType.I32: { + switch (byteSize) { + case 1: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeI8(getConstValueI32(value), buf, pos); + pos += 1; + } + break; + } + case 2: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeI16(getConstValueI32(value), buf, pos); + pos += 2; + } + break; + } + case 4: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeI32(getConstValueI32(value), buf, pos); + pos += 4; + } + break; + } + default: assert(false); + } + break; + } + case NativeType.I64: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeI64(i64_new(getConstValueI64Low(value), getConstValueI64High(value)), buf, pos); + pos += 8; + } + break; + } + case NativeType.F32: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeF32(getConstValueF32(value), buf, pos); + pos += 4; + } + break; + } + case NativeType.F64: { + for (let i = 0; i < length; ++i) { + let value = values[i]; + assert(getExpressionType(value) == nativeType); + assert(getExpressionId(value) == ExpressionId.Const); + writeF64(getConstValueF64(value), buf, pos); + pos += 8; + } + break; + } + default: assert(false); + } + assert(pos == buf.length); + + return this.addMemorySegment(buf); + } + + ensureStaticArrayHeader(elementType: Type, bufferSegment: MemorySegment): MemorySegment { + var program = this.program; + var runtimeHeaderSize = program.runtimeHeaderSize; + var arrayPrototype = assert(program.arrayPrototype); + var arrayInstance = assert(this.resolver.resolveClass(arrayPrototype, [ elementType ])); + var arrayInstanceSize = arrayInstance.currentMemoryOffset; + var bufferLength = bufferSegment.buffer.length - runtimeHeaderSize; + var arrayLength = i32(bufferLength / elementType.byteSize); + + var buf = new Uint8Array(runtimeHeaderSize + arrayInstanceSize); + program.writeRuntimeHeader(buf, 0, arrayInstance.id, arrayInstanceSize); + + var bufferAddress32 = i64_low(bufferSegment.offset) + runtimeHeaderSize; + assert(!program.options.isWasm64); // TODO + assert(arrayInstance.writeField("data", bufferAddress32, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("dataStart", bufferAddress32, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("dataLength", bufferLength, buf, runtimeHeaderSize)); + assert(arrayInstance.writeField("length_", arrayLength, buf, runtimeHeaderSize)); + + return this.addMemorySegment(buf); + } + + // === Table ==================================================================================== /** Ensures that a table entry exists for the specified function and returns its index. */ ensureFunctionTableEntry(func: Function): i32 { @@ -1391,7 +1595,7 @@ export class Compiler extends DiagnosticEmitter { return index; } - // statements + // === Statements =============================================================================== compileTopLevelStatement(statement: Statement, body: ExpressionRef[]): void { switch (statement.kind) { @@ -1463,7 +1667,10 @@ export class Compiler extends DiagnosticEmitter { } } - compileStatement(statement: Statement, isLastStatementInBody: bool = false): ExpressionRef { + compileStatement( + statement: Statement, + isLastStatementInBody: bool = false + ): ExpressionRef { var module = this.module; var stmt: ExpressionRef; switch (statement.kind) { @@ -1488,7 +1695,7 @@ export class Compiler extends DiagnosticEmitter { break; } case NodeKind.EXPRESSION: { - stmt = this.compileExpressionStatement(statement); + stmt = this.compileExpressionStatement(statement, isLastStatementInBody); break; } case NodeKind.FOR: { @@ -1546,10 +1753,16 @@ export class Compiler extends DiagnosticEmitter { return stmt; } - compileStatements(statements: Statement[], isBody: bool = false): ExpressionRef[] { + compileStatements( + statements: Statement[], + isBody: bool = false, + stmts: ExpressionRef[] | null = null + ): ExpressionRef[] { var numStatements = statements.length; - var stmts = new Array(numStatements); - stmts.length = 0; + if (!stmts) { + stmts = new Array(numStatements); + stmts.length = 0; + } var flow = this.currentFlow; for (let i = 0; i < numStatements; ++i) { let stmt = this.compileStatement(statements[i], isBody && i == numStatements - 1); @@ -1687,8 +1900,15 @@ export class Compiler extends DiagnosticEmitter { return this.module.createNop(); } - compileExpressionStatement(statement: ExpressionStatement): ExpressionRef { - var expr = this.compileExpression(statement.expression, Type.void, ConversionKind.NONE, WrapMode.NONE); + compileExpressionStatement(statement: ExpressionStatement, isLastStatementInBody: bool = false): ExpressionRef { + var expr = this.compileExpression( + statement.expression, + Type.void, + ConversionKind.NONE, + WrapMode.NONE, + null, + isLastStatementInBody + ); if (this.currentType != Type.void) { expr = this.module.createDrop(expr); this.currentType = Type.void; @@ -1739,6 +1959,7 @@ export class Compiler extends DiagnosticEmitter { condExpr = module.createI32(1); alwaysTrue = true; } + innerFlow.inheritNonnullIfTrue(condExpr); var incrExpr = statement.incrementor ? this.compileExpression(statement.incrementor, Type.void, ConversionKind.IMPLICIT, WrapMode.NONE) : 0; @@ -1795,7 +2016,6 @@ export class Compiler extends DiagnosticEmitter { var ifTrue = statement.ifTrue; var ifFalse = statement.ifFalse; var outerFlow = this.currentFlow; - var actualFunction = outerFlow.actualFunction; // The condition doesn't initiate a branch yet var condExpr = this.makeIsTrueish( @@ -1826,6 +2046,7 @@ export class Compiler extends DiagnosticEmitter { // Each arm initiates a branch var ifTrueFlow = outerFlow.fork(); this.currentFlow = ifTrueFlow; + ifTrueFlow.inheritNonnullIfTrue(condExpr); var ifTrueExpr = this.compileStatement(ifTrue); ifTrueFlow.freeScopedLocals(); this.currentFlow = outerFlow; @@ -1834,12 +2055,16 @@ export class Compiler extends DiagnosticEmitter { if (ifFalse) { let ifFalseFlow = outerFlow.fork(); this.currentFlow = ifFalseFlow; + ifFalseFlow.inheritNonnullIfFalse(condExpr); ifFalseExpr = this.compileStatement(ifFalse); ifFalseFlow.freeScopedLocals(); this.currentFlow = outerFlow; outerFlow.inheritMutual(ifTrueFlow, ifFalseFlow); } else { outerFlow.inheritConditional(ifTrueFlow); + if (ifTrueFlow.isAny(FlowFlags.ANY_TERMINATING)) { + outerFlow.inheritNonnullIfFalse(condExpr); + } } return module.createIf(condExpr, ifTrueExpr, ifFalseExpr); } @@ -2159,13 +2384,14 @@ export class Compiler extends DiagnosticEmitter { } if (initExpr) { initializers.push( - this.compileAssignmentWithValue(declaration.name, initExpr) + this.module.createSetLocal(local.index, initExpr) ); if (local.type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - flow.setLocalWrapped(local.index, !flow.canOverflow(initExpr, type)); + if (!flow.canOverflow(initExpr, type)) flow.setLocalFlag(local.index, LocalFlags.WRAPPED); + else flow.unsetLocalFlag(local.index, LocalFlags.WRAPPED); } } else if (local.type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - flow.setLocalWrapped(local.index, true); // zero + flow.setLocalFlag(local.index, LocalFlags.WRAPPED); } } } @@ -2215,6 +2441,7 @@ export class Compiler extends DiagnosticEmitter { var continueLabel = "continue|" + label; innerFlow.continueLabel = continueLabel; + innerFlow.inheritNonnullIfTrue(condExpr); var body = this.compileStatement(statement.statement); var alwaysTrue = false; // TODO var terminated = innerFlow.isAny(FlowFlags.ANY_TERMINATING); @@ -2246,7 +2473,7 @@ export class Compiler extends DiagnosticEmitter { ]); } - // expressions + // === Expressions ============================================================================== /** * Compiles the value of an inlined constant element. @@ -2337,7 +2564,9 @@ export class Compiler extends DiagnosticEmitter { expression: Expression, contextualType: Type, conversionKind: ConversionKind, - wrapMode: WrapMode + wrapMode: WrapMode, + context: Element | null = null, + isLastStatementInBody: bool = false ): ExpressionRef { this.currentType = contextualType; var expr: ExpressionRef; @@ -2351,7 +2580,7 @@ export class Compiler extends DiagnosticEmitter { break; } case NodeKind.CALL: { - expr = this.compileCallExpression(expression, contextualType); + expr = this.compileCallExpression(expression, contextualType, isLastStatementInBody); break; } case NodeKind.COMMA: { @@ -2384,7 +2613,7 @@ export class Compiler extends DiagnosticEmitter { break; } case NodeKind.LITERAL: { - expr = this.compileLiteralExpression(expression, contextualType); + expr = this.compileLiteralExpression(expression, contextualType, false, context); break; } case NodeKind.NEW: { @@ -2487,10 +2716,17 @@ export class Compiler extends DiagnosticEmitter { if (!fromType.isAssignableTo(toType)) { if (conversionKind == ConversionKind.IMPLICIT) { - this.error( - DiagnosticCode.Conversion_from_type_0_to_1_requires_an_explicit_cast, - reportNode.range, fromType.toString(), toType.toString() - ); // recoverable + if (fromType.nonNullableType == toType) { + this.error( + DiagnosticCode.Object_is_possibly_null, + reportNode.range + ); // recoverable + } else { + this.error( + DiagnosticCode.Conversion_from_type_0_to_1_requires_an_explicit_cast, + reportNode.range, fromType.toString(), toType.toString() + ); // recoverable + } } } @@ -2646,10 +2882,11 @@ export class Compiler extends DiagnosticEmitter { switch (expression.assertionKind) { case AssertionKind.PREFIX: case AssertionKind.AS: { + let flow = this.currentFlow; let toType = this.resolver.resolveType( // reports assert(expression.toType), - this.currentFlow.actualFunction, - this.currentFlow.contextualTypeArguments + flow.actualFunction, + flow.contextualTypeArguments ); if (!toType) return this.module.createUnreachable(); return this.compileExpression(expression.expression, toType, ConversionKind.EXPLICIT, WrapMode.NONE); @@ -2657,6 +2894,22 @@ export class Compiler extends DiagnosticEmitter { case AssertionKind.NONNULL: { assert(!expression.toType); let expr = this.compileExpressionRetainType(expression.expression, contextualType, WrapMode.NONE); + let type = this.currentType; + if (!type.is(TypeFlags.NULLABLE | TypeFlags.REFERENCE) || this.currentFlow.isNonnull(type, expr)) { + this.info( + DiagnosticCode.Expression_is_never_null, + expression.expression.range + ); + } else if (!this.options.noAssert) { + let module = this.module; + let flow = this.currentFlow; + let tempIndex = flow.getAndFreeTempLocal(type, !flow.canOverflow(expr, type)).index; + expr = module.createIf( + module.createTeeLocal(tempIndex, expr), + module.createGetLocal(tempIndex, type.toNativeType()), + module.createUnreachable() + ); + } this.currentType = this.currentType.nonNullableType; return expr; } @@ -3626,7 +3879,7 @@ export class Compiler extends DiagnosticEmitter { rightExpr = this.compileExpression(right, Type.f32, ConversionKind.IMPLICIT, WrapMode.NONE); rightType = this.currentType; if (!(instance = this.f32PowInstance)) { - let namespace = this.program.lookupGlobal(LibrarySymbols.Mathf); + let namespace = this.program.lookupGlobal(CommonSymbols.Mathf); if (!namespace) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3635,7 +3888,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createUnreachable(); break; } - let prototype = namespace.members ? namespace.members.get(LibrarySymbols.pow) : null; + let prototype = namespace.members ? namespace.members.get(CommonSymbols.pow) : null; if (!prototype) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3668,7 +3921,7 @@ export class Compiler extends DiagnosticEmitter { ); rightType = this.currentType; if (!(instance = this.f64PowInstance)) { - let namespace = this.program.lookupGlobal(LibrarySymbols.Math); + let namespace = this.program.lookupGlobal(CommonSymbols.Math); if (!namespace) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3677,7 +3930,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createUnreachable(); break; } - let prototype = namespace.members ? namespace.members.get(LibrarySymbols.pow) : null; + let prototype = namespace.members ? namespace.members.get(CommonSymbols.pow) : null; if (!prototype) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3693,7 +3946,7 @@ export class Compiler extends DiagnosticEmitter { if (!(instance && this.compileFunction(instance))) { expr = module.createUnreachable(); } else { - expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ]); + expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ], expression); } break; } @@ -3918,7 +4171,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.F32: { let instance = this.f32ModInstance; if (!instance) { - let namespace = this.program.lookupGlobal(LibrarySymbols.Mathf); + let namespace = this.program.lookupGlobal(CommonSymbols.Mathf); if (!namespace) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3927,7 +4180,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createUnreachable(); break; } - let prototype = namespace.members ? namespace.members.get(LibrarySymbols.mod) : null; + let prototype = namespace.members ? namespace.members.get(CommonSymbols.mod) : null; if (!prototype) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3942,14 +4195,14 @@ export class Compiler extends DiagnosticEmitter { if (!(instance && this.compileFunction(instance))) { expr = module.createUnreachable(); } else { - expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ]); + expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ], expression); } break; } case TypeKind.F64: { let instance = this.f64ModInstance; if (!instance) { - let namespace = this.program.lookupGlobal(LibrarySymbols.Math); + let namespace = this.program.lookupGlobal(CommonSymbols.Math); if (!namespace) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3958,7 +4211,7 @@ export class Compiler extends DiagnosticEmitter { expr = module.createUnreachable(); break; } - let prototype = namespace.members ? namespace.members.get(LibrarySymbols.mod) : null; + let prototype = namespace.members ? namespace.members.get(CommonSymbols.mod) : null; if (!prototype) { this.error( DiagnosticCode.Cannot_find_name_0, @@ -3973,7 +4226,7 @@ export class Compiler extends DiagnosticEmitter { if (!(instance && this.compileFunction(instance))) { expr = module.createUnreachable(); } else { - expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ]); + expr = this.makeCallDirect(instance, [ leftExpr, rightExpr ], expression); } break; } @@ -4507,11 +4760,26 @@ export class Compiler extends DiagnosticEmitter { case Token.AMPERSAND_AMPERSAND: { // left && right leftExpr = this.compileExpressionRetainType(left, contextualType, WrapMode.NONE); leftType = this.currentType; + + let previousFlow = this.currentFlow; + let rightFlow = previousFlow.fork(); + this.currentFlow = rightFlow; + rightFlow.inheritNonnullIfTrue(leftExpr); rightExpr = this.compileExpression(right, leftType, ConversionKind.IMPLICIT, WrapMode.NONE); - rightType = this.currentType; + rightType = leftType; + this.currentFlow = previousFlow; + + // simplify if only interested in true or false + if (contextualType == Type.bool || contextualType == Type.void) { + this.currentType = Type.bool; + expr = module.createIf( + this.makeIsTrueish(leftExpr, leftType), + this.makeIsTrueish(rightExpr, rightType), + module.createI32(0) + ); // simplify if cloning left without side effects is possible - if (expr = module.cloneExpression(leftExpr, true, 0)) { + } else if (expr = module.cloneExpression(leftExpr, true, 0)) { expr = module.createIf( this.makeIsTrueish(leftExpr, this.currentType), rightExpr, @@ -4542,12 +4810,27 @@ export class Compiler extends DiagnosticEmitter { case Token.BAR_BAR: { // left || right leftExpr = this.compileExpressionRetainType(left, contextualType, WrapMode.NONE); leftType = this.currentType; + + let previousFlow = this.currentFlow; + let rightFlow = previousFlow.fork(); + this.currentFlow = rightFlow; + rightFlow.inheritNonnullIfFalse(leftExpr); rightExpr = this.compileExpression(right, leftType, ConversionKind.IMPLICIT, WrapMode.NONE); - rightType = this.currentType; + rightType = leftType; + this.currentFlow = previousFlow; + + // simplify if only interested in true or false + if (contextualType == Type.bool || contextualType == Type.void) { + this.currentType = Type.bool; + expr = module.createIf( + this.makeIsTrueish(leftExpr, leftType), + module.createI32(1), + this.makeIsTrueish(rightExpr, rightType) + ); // simplify if cloning left without side effects is possible - if (expr = this.module.cloneExpression(leftExpr, true, 0)) { - expr = this.module.createIf( + } else if (expr = module.cloneExpression(leftExpr, true, 0)) { + expr = module.createIf( this.makeIsTrueish(leftExpr, this.currentType), expr, rightExpr @@ -4580,7 +4863,11 @@ export class Compiler extends DiagnosticEmitter { } } return compound - ? this.compileAssignmentWithValue(left, expr, contextualType != Type.void) + ? this.compileAssignmentWithValue( + left, + expr, + contextualType != Type.void + ) : expr; } @@ -4598,6 +4885,7 @@ export class Compiler extends DiagnosticEmitter { } else { argumentExpressions = [ value ]; // annotated type might differ -> recompile } + this.currentType = operatorInstance.signature.returnType; return this.compileCallDirect( operatorInstance, argumentExpressions, @@ -4622,13 +4910,13 @@ export class Compiler extends DiagnosticEmitter { } else { argumentExpressions = [ left, right ]; // annotated type of LHS might differ -> recompile } - var ret = this.compileCallDirect( + this.currentType = operatorInstance.signature.returnType; + return this.compileCallDirect( operatorInstance, argumentExpressions, reportNode, thisArg ); - return ret; } compileAssignment(expression: Expression, valueExpression: Expression, contextualType: Type): ExpressionRef { @@ -4682,8 +4970,22 @@ export class Compiler extends DiagnosticEmitter { break; } case ElementKind.CLASS: { - if (resolver.currentElementExpression) { // indexed access + let elementExpression = resolver.currentElementExpression; + if (elementExpression) { // indexed access let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); + // if (isUnchecked) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (arrayType) { + // return compileBuiltinArraySet( + // this, + // target, + // assert(this.resolver.currentThisExpression), + // elementExpression, + // valueExpression, + // contextualType + // ); + // } + // } let indexedSet = (target).lookupOverload(OperatorKind.INDEXED_SET, isUnchecked); if (!indexedSet) { let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); @@ -4701,7 +5003,7 @@ export class Compiler extends DiagnosticEmitter { return this.module.createUnreachable(); } assert(indexedSet.signature.parameterTypes.length == 2); // parser must guarantee this - targetType = indexedSet.signature.parameterTypes[1]; // 2nd parameter is the element + targetType = indexedSet.signature.parameterTypes[1]; // 2nd parameter is the element break; } // fall-through @@ -4727,8 +5029,8 @@ export class Compiler extends DiagnosticEmitter { compileAssignmentWithValue( expression: Expression, - valueWithCorrectType: ExpressionRef, - tee: bool = false + valueExpr: ExpressionRef, + tee: bool ): ExpressionRef { var module = this.module; var flow = this.currentFlow; @@ -4737,47 +5039,28 @@ export class Compiler extends DiagnosticEmitter { switch (target.kind) { case ElementKind.LOCAL: { - let type = (target).type; - assert(type != Type.void); - this.currentType = tee ? type : Type.void; - if ((target).is(CommonFlags.CONST)) { + if (target.is(CommonFlags.CONST)) { this.error( DiagnosticCode.Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property, expression.range, target.internalName ); + this.currentType = tee ? (target).type : Type.void; return module.createUnreachable(); } - if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - flow.setLocalWrapped((target).index, !flow.canOverflow(valueWithCorrectType, type)); - } - return tee - ? module.createTeeLocal((target).index, valueWithCorrectType) - : module.createSetLocal((target).index, valueWithCorrectType); + return this.makeLocalAssignment(target, valueExpr, tee, !flow.isNonnull(this.currentType, valueExpr)); } case ElementKind.GLOBAL: { if (!this.compileGlobal(target)) return module.createUnreachable(); - let type = (target).type; - assert(type != Type.void); - this.currentType = tee ? type : Type.void; - if ((target).is(CommonFlags.CONST)) { + if (target.is(CommonFlags.CONST)) { this.error( DiagnosticCode.Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property, expression.range, target.internalName ); + this.currentType = tee ? (target).type : Type.void; return module.createUnreachable(); } - valueWithCorrectType = this.ensureSmallIntegerWrap(valueWithCorrectType, type); // guaranteed - if (tee) { - let nativeType = type.toNativeType(); - let internalName = target.internalName; - return module.createBlock(null, [ // emulated teeGlobal - module.createSetGlobal(internalName, valueWithCorrectType), - module.createGetGlobal(internalName, nativeType) - ], nativeType); - } else { - return module.createSetGlobal(target.internalName, valueWithCorrectType); - } + return this.makeGlobalAssignment(target, valueExpr, tee); } case ElementKind.FIELD: { let initializerNode = (target).initializerNode; @@ -4794,49 +5077,15 @@ export class Compiler extends DiagnosticEmitter { ); return module.createUnreachable(); } - let thisExpression = assert(this.resolver.currentThisExpression); - let thisExpr = this.compileExpressionRetainType( - thisExpression, - this.options.usizeType, - WrapMode.NONE + return this.makeFieldAssignment(target, + valueExpr, + this.compileExpressionRetainType( + assert(this.resolver.currentThisExpression), + // FIXME: explicit type (currently fails due to missing null checking) + this.options.usizeType, WrapMode.NONE + ), + tee ); - let type = (target).type; - this.currentType = tee ? type : Type.void; - let nativeType = type.toNativeType(); - if (type.kind == TypeKind.BOOL) { - // make sure bools are wrapped (usually are) when storing as 8 bits - valueWithCorrectType = this.ensureSmallIntegerWrap(valueWithCorrectType, type); - } - if (tee) { - let flow = this.currentFlow; - let tempLocal = flow.getAndFreeTempLocal( - type, - !flow.canOverflow(valueWithCorrectType, type) - ); - let tempLocalIndex = tempLocal.index; - // TODO: simplify if valueWithCorrectType has no side effects - // TODO: call __gc_link here if a GC is present - return module.createBlock(null, [ - module.createSetLocal(tempLocalIndex, valueWithCorrectType), - module.createStore( - type.byteSize, - thisExpr, - module.createGetLocal(tempLocalIndex, nativeType), - nativeType, - (target).memoryOffset - ), - module.createGetLocal(tempLocalIndex, nativeType) - ], nativeType); - } else { - // TODO: call __gc_link here if a GC is present - return module.createStore( - type.byteSize, - thisExpr, - valueWithCorrectType, - nativeType, - (target).memoryOffset - ); - } } case ElementKind.PROPERTY_PROTOTYPE: { // static property let setterPrototype = (target).setterPrototype; @@ -4850,7 +5099,7 @@ export class Compiler extends DiagnosticEmitter { let setterInstance = this.resolver.resolveFunction(setterPrototype, null, makeMap(), ReportMode.REPORT); if (!setterInstance) return module.createUnreachable(); // call just the setter if the return value isn't of interest - if (!tee) return this.makeCallDirect(setterInstance, [ valueWithCorrectType ]); + if (!tee) return this.makeCallDirect(setterInstance, [ valueExpr ], expression); // otherwise call the setter first, then the getter let getterPrototype = assert((target).getterPrototype); // must be present let getterInstance = this.resolver.resolveFunction(getterPrototype, null, makeMap(), ReportMode.REPORT); @@ -4858,8 +5107,8 @@ export class Compiler extends DiagnosticEmitter { let returnType = getterInstance.signature.returnType; let nativeReturnType = returnType.toNativeType(); return module.createBlock(null, [ - this.makeCallDirect(setterInstance, [ valueWithCorrectType ]), - this.makeCallDirect(getterInstance) // sets currentType + this.makeCallDirect(setterInstance, [ valueExpr ], expression), + this.makeCallDirect(getterInstance, null, expression) // sets currentType ], nativeReturnType); } case ElementKind.PROPERTY: { // instance property @@ -4875,10 +5124,9 @@ export class Compiler extends DiagnosticEmitter { if (!tee) { let thisExpr = this.compileExpressionRetainType( assert(this.resolver.currentThisExpression), - this.options.usizeType, - WrapMode.NONE + this.options.usizeType, WrapMode.NONE ); - return this.makeCallDirect(setterInstance, [ thisExpr, valueWithCorrectType ]); + return this.makeCallDirect(setterInstance, [ thisExpr, valueExpr ], expression); } // otherwise call the setter first, then the getter let getterInstance = assert((target).getterInstance); // must be present @@ -4894,17 +5142,30 @@ export class Compiler extends DiagnosticEmitter { return module.createBlock(null, [ this.makeCallDirect(setterInstance, [ // set and remember the target module.createTeeLocal(tempLocalIndex, thisExpr), - valueWithCorrectType - ]), + valueExpr + ], expression), this.makeCallDirect(getterInstance, [ // get from remembered target module.createGetLocal(tempLocalIndex, nativeReturnType) - ]) + ], expression) ], nativeReturnType); } case ElementKind.CLASS: { let elementExpression = this.resolver.currentElementExpression; if (elementExpression) { let isUnchecked = flow.is(FlowFlags.UNCHECKED_CONTEXT); + // if (isUnchecked) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (arrayType) { + // return compileBuiltinArraySetWithValue( + // this, + // target, + // assert(this.resolver.currentThisExpression), + // elementExpression, + // valueExpr, + // tee + // ); + // } + // } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( @@ -4944,19 +5205,19 @@ export class Compiler extends DiagnosticEmitter { this.makeCallDirect(indexedSet, [ module.createTeeLocal(tempLocalTarget.index, thisExpr), module.createTeeLocal(tempLocalElement.index, elementExpr), - valueWithCorrectType - ]), + valueExpr + ], expression), this.makeCallDirect(indexedGet, [ module.createGetLocal(tempLocalTarget.index, tempLocalTarget.type.toNativeType()), module.createGetLocal(tempLocalElement.index, tempLocalElement.type.toNativeType()) - ]) + ], expression) ], returnType.toNativeType()); } else { return this.makeCallDirect(indexedSet, [ thisExpr, elementExpr, - valueWithCorrectType - ]); + valueExpr + ], expression); } } // fall-through @@ -4969,18 +5230,164 @@ export class Compiler extends DiagnosticEmitter { return module.createUnreachable(); } - compileCallExpression(expression: CallExpression, contextualType: Type): ExpressionRef { - var module = this.module; + makeLocalAssignment( + local: Local, + valueExpr: ExpressionRef, + tee: bool, + possiblyNull: bool + ): ExpressionRef { + // TBD: use REPLACE macro to keep track of managed refcounts? or can the compiler evaluate + // this statically in closed contexts like functions in order to safe the extra work? + var type = local.type; + assert(type != Type.void); var flow = this.currentFlow; + var localIndex = local.index; + if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { + if (!flow.canOverflow(valueExpr, type)) flow.setLocalFlag(localIndex, LocalFlags.WRAPPED); + else flow.unsetLocalFlag(localIndex, LocalFlags.WRAPPED); + } + if (type.is(TypeFlags.NULLABLE)) { + if (possiblyNull) flow.unsetLocalFlag(localIndex, LocalFlags.NONNULL); + else flow.setLocalFlag(localIndex, LocalFlags.NONNULL); + } + if (tee) { + this.currentType = type; + return this.module.createTeeLocal(localIndex, valueExpr); + } else { + this.currentType = Type.void; + return this.module.createSetLocal(localIndex, valueExpr); + } + } - // handle call to super - if (expression.expression.kind == NodeKind.SUPER) { - let flow = this.currentFlow; - let actualFunction = flow.actualFunction; - if (!actualFunction.is(CommonFlags.CONSTRUCTOR)) { - this.error( - DiagnosticCode.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors, - expression.range + makeGlobalAssignment(global: Global, valueExpr: ExpressionRef, tee: bool): ExpressionRef { + var module = this.module; + var type = global.type; + assert(type != Type.void); + var nativeType = type.toNativeType(); + + // MANAGED (reference counting) + if (type.isManaged(this.program)) { + if (this.program.retainRef) { + valueExpr = this.makeReplaceRef( + valueExpr, + module.createGetGlobal(global.internalName, nativeType), + null, + type.is(TypeFlags.NULLABLE) + ); + } + + // UNMANAGED + } else { + valueExpr = this.ensureSmallIntegerWrap(valueExpr, type); // global values must be wrapped + } + + if (tee) { + let tempValue = this.currentFlow.getAndFreeTempLocal(type, true); + this.currentType = type; + return module.createBlock(null, [ + module.createSetGlobal(global.internalName, + module.createTeeLocal(tempValue.index, valueExpr) + ), + module.createGetLocal(tempValue.index, nativeType) + ], nativeType); + } else { + this.currentType = Type.void; + return this.module.createSetGlobal(global.internalName, valueExpr); + } + } + + makeFieldAssignment(field: Field, valueExpr: ExpressionRef, thisExpr: ExpressionRef, tee: bool): ExpressionRef { + var program = this.program; + var module = this.module; + var flow = this.currentFlow; + var fieldType = field.type; + var nativeFieldType = fieldType.toNativeType(); + assert(field.parent.kind == ElementKind.CLASS); + var thisType = (field.parent).type; + var nativeThisType = thisType.toNativeType(); + + // MANAGED: this.field = replace(value, this.field) + if (fieldType.isManaged(program)) { + let tempThis = flow.getTempLocal(thisType, false); + let expr: ExpressionRef; + if (tee) { // tee value to a temp local and make it the block's result + let tempValue = flow.getTempLocal(fieldType, !flow.canOverflow(valueExpr, fieldType)); + expr = module.createBlock(null, [ + module.createStore(fieldType.byteSize, + module.createTeeLocal(tempThis.index, thisExpr), + this.makeReplaceRef( + module.createTeeLocal(tempValue.index, valueExpr), + module.createLoad(fieldType.byteSize, fieldType.is(TypeFlags.SIGNED), + module.createGetLocal(tempThis.index, nativeThisType), + nativeFieldType, field.memoryOffset + ), + tempThis, + fieldType.is(TypeFlags.NULLABLE) + ), + nativeFieldType, field.memoryOffset + ), + module.createGetLocal(tempValue.index, nativeFieldType) + ], nativeFieldType); + flow.freeTempLocal(tempValue); + this.currentType = fieldType; + } else { // no need for a temp local + expr = module.createStore(fieldType.byteSize, + module.createTeeLocal(tempThis.index, thisExpr), + this.makeReplaceRef( + valueExpr, + module.createLoad(fieldType.byteSize, fieldType.is(TypeFlags.SIGNED), + module.createGetLocal(tempThis.index, nativeThisType), + nativeFieldType, field.memoryOffset + ), + tempThis, + fieldType.is(TypeFlags.NULLABLE) + ), + nativeFieldType, field.memoryOffset + ); + this.currentType = Type.void; + } + flow.freeTempLocal(tempThis); + return expr; + } + + // UNMANAGED: this.field = value + if (tee) { + this.currentType = fieldType; + let tempValue = flow.getAndFreeTempLocal(fieldType, !flow.canOverflow(valueExpr, fieldType)); + return module.createBlock(null, [ + module.createStore(fieldType.byteSize, + thisExpr, + module.createTeeLocal(tempValue.index, valueExpr), + nativeFieldType, field.memoryOffset + ), + module.createGetLocal(tempValue.index, nativeFieldType) + ], nativeFieldType); + } else { + this.currentType = Type.void; + return module.createStore(fieldType.byteSize, + thisExpr, + valueExpr, + nativeFieldType, field.memoryOffset + ); + } + } + + compileCallExpression( + expression: CallExpression, + contextualType: Type, + isLastStatementInBody: bool = false + ): ExpressionRef { + var module = this.module; + var flow = this.currentFlow; + + // handle call to super + if (expression.expression.kind == NodeKind.SUPER) { + let flow = this.currentFlow; + let actualFunction = flow.actualFunction; + if (!actualFunction.is(CommonFlags.CONSTRUCTOR)) { + this.error( + DiagnosticCode.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors, + expression.range ); return module.createUnreachable(); } @@ -5004,7 +5411,7 @@ export class Compiler extends DiagnosticEmitter { module.createIf( module.createGetLocal(thisLocal.index, nativeSizeType), module.createGetLocal(thisLocal.index, nativeSizeType), - this.makeAllocation(classInstance) + this.makeAllocation(classInstance, expression) ) ) ) @@ -5140,7 +5547,7 @@ export class Compiler extends DiagnosticEmitter { makeMap(flow.contextualTypeArguments) ); if (!instance) return this.module.createUnreachable(); - return this.makeCallDirect(instance, argumentExprs); + return this.makeCallDirect(instance, argumentExprs, expression); // TODO: this skips inlining because inlining requires compiling its temporary locals in // the scope of the inlined flow. might need another mechanism to lock temp. locals early, // so inlining can be performed in `makeCallDirect` instead? @@ -5165,7 +5572,8 @@ export class Compiler extends DiagnosticEmitter { instance, expression.arguments, expression, - thisExpr + thisExpr, + isLastStatementInBody ); } @@ -5394,17 +5802,18 @@ export class Compiler extends DiagnosticEmitter { instance: Function, argumentExpressions: Expression[], reportNode: Node, - thisArg: ExpressionRef = 0 + thisArg: ExpressionRef = 0, + inlineCanAlias: bool = false ): ExpressionRef { var numArguments = argumentExpressions.length; var signature = instance.signature; - if (!this.checkCallSignature( // reports signature, numArguments, thisArg != 0, reportNode )) { + this.currentType = signature.returnType; return this.module.createUnreachable(); } @@ -5418,7 +5827,7 @@ export class Compiler extends DiagnosticEmitter { ); } else { this.currentInlineFunctions.push(instance); - let expr = this.compileCallInlinePrechecked(instance, argumentExpressions, thisArg); + let expr = this.compileCallInlinePrechecked(instance, argumentExpressions, thisArg, inlineCanAlias); this.currentInlineFunctions.pop(); return expr; } @@ -5442,54 +5851,115 @@ export class Compiler extends DiagnosticEmitter { ); } assert(index == numArgumentsInclThis); - return this.makeCallDirect(instance, operands); + return this.makeCallDirect(instance, operands, reportNode); + } + + compileCallInline( + instance: Function, + argumentExpressions: Expression[], + thisArg: ExpressionRef, + reportNode: Node, + canAlias: bool = false + ): ExpressionRef { + var numArguments = argumentExpressions.length; + var signature = instance.signature; + if (!this.checkCallSignature( // reports + signature, + numArguments, + thisArg != 0, + reportNode + )) { + this.currentType = instance.signature.returnType; + return this.module.createUnreachable(); + } + return this.compileCallInlinePrechecked(instance, argumentExpressions, thisArg, canAlias); } - // Depends on being pre-checked in compileCallDirect private compileCallInlinePrechecked( instance: Function, argumentExpressions: Expression[], - thisArg: ExpressionRef = 0 + thisArg: ExpressionRef = 0, + canAlias: bool = false ): ExpressionRef { + var numArguments = argumentExpressions.length; + var signature = instance.signature; + var parameterTypes = signature.parameterTypes; + assert(numArguments <= parameterTypes.length); + var args = new Array(numArguments); + var flow = this.currentFlow; + + // compile arguments possibly using their own temp locals + var temps = flow.blockLocalsBeforeInlining(instance); + for (let i = 0; i < numArguments; ++i) { + args[i] = this.compileExpression( + argumentExpressions[i], + parameterTypes[i], + ConversionKind.IMPLICIT, + WrapMode.NONE + ); + } + flow.unblockLocals(temps); + + return this.makeCallInlinePrechecked(instance, args, thisArg, canAlias); + } + + makeCallInlinePrechecked( + instance: Function, + args: ExpressionRef[], + thisArg: ExpressionRef = 0, + canAlias: bool = false + ): ExpressionRef { + + // CAUTION: Imagine a call like `theCall(a, b)`. Unless canAlias, inlining needs a temporary local for + // each argument, looking something like `BLOCK { t1 = a, t2 = b, inlinedTheCall }`. Now, if argument b, + // which is compiled beforehand, itself required a temporary local, it is likely that it did pick `t1` + // for this, making it something like `BLOCK { t1 = a, t2 = (t1 = c, t1), inlinedTheCall }`, which is + // overwriting t1. Hence, whenever makeCallInline is used, this condition must be taken into account. + // Flows provide the helpers Flow#blockLocalsBeforeInlining and Flow#unblockLocals for this. + var module = this.module; // Create a new inline flow and use it to compile the function as a block var previousFlow = this.currentFlow; var flow = Flow.createInline(previousFlow.parentFunction, instance); - - // Convert provided call arguments to temporary locals. It is important that these are compiled - // here, with their respective locals being blocked. There is no 'makeCallInline'. var body = []; + // Convert provided call arguments to temporary locals if (thisArg) { let classInstance = assert(instance.parent); assert(classInstance.kind == ElementKind.CLASS); let thisType = assert(instance.signature.thisType); - let thisLocal = flow.addScopedLocal(CommonSymbols.this_, thisType, false); - body.push( - module.createSetLocal(thisLocal.index, thisArg) - ); - let baseInstance = (classInstance).base; - if (baseInstance) flow.addScopedAlias(CommonSymbols.super_, baseInstance.type, thisLocal.index); + if (canAlias && getExpressionId(thisArg) == ExpressionId.GetLocal) { + flow.addScopedAlias(CommonSymbols.this_, thisType, getGetLocalIndex(thisArg)); + let baseInstance = (classInstance).base; + if (baseInstance) flow.addScopedAlias(CommonSymbols.super_, baseInstance.type, getGetLocalIndex(thisArg)); + } else { + let thisLocal = flow.addScopedLocal(CommonSymbols.this_, thisType, false); + body.push( + module.createSetLocal(thisLocal.index, thisArg) + ); + let baseInstance = (classInstance).base; + if (baseInstance) flow.addScopedAlias(CommonSymbols.super_, baseInstance.type, thisLocal.index); + } + } else { + assert(!instance.signature.thisType); } - - var numArguments = argumentExpressions.length; + var numArguments = args.length; var signature = instance.signature; var parameterTypes = signature.parameterTypes; for (let i = 0; i < numArguments; ++i) { - let paramExpr = this.compileExpression( - argumentExpressions[i], - parameterTypes[i], - ConversionKind.IMPLICIT, - WrapMode.NONE - ); - let argumentLocal = flow.addScopedLocal( - signature.getParameterName(i), - parameterTypes[i], - !previousFlow.canOverflow(paramExpr, parameterTypes[i]) - ); - body.push( - module.createSetLocal(argumentLocal.index, paramExpr) - ); + let paramExpr = args[i]; + if (canAlias && getExpressionId(paramExpr) == ExpressionId.GetLocal) { + flow.addScopedAlias(signature.getParameterName(i), parameterTypes[i], getGetLocalIndex(paramExpr)); + } else { + let argumentLocal = flow.addScopedLocal( + signature.getParameterName(i), + parameterTypes[i], + !previousFlow.canOverflow(paramExpr, parameterTypes[i]) + ); + body.push( + module.createSetLocal(argumentLocal.index, paramExpr) + ); + } } // Compile optional parameter initializers in the scope of the inlined flow @@ -5502,21 +5972,22 @@ export class Compiler extends DiagnosticEmitter { ConversionKind.IMPLICIT, WrapMode.WRAP ); - let argumentLocal = flow.addScopedLocal( - signature.getParameterName(i), - parameterTypes[i], - !flow.canOverflow(initExpr, parameterTypes[i]) - ); - body.push( - module.createSetLocal(argumentLocal.index, initExpr) - ); + if (canAlias && getExpressionId(initExpr) == ExpressionId.GetLocal) { + flow.addScopedAlias(signature.getParameterName(i), parameterTypes[i], getGetLocalIndex(initExpr)); + } else { + let argumentLocal = flow.addScopedLocal( + signature.getParameterName(i), + parameterTypes[i], + !flow.canOverflow(initExpr, parameterTypes[i]) + ); + body.push( + module.createSetLocal(argumentLocal.index, initExpr) + ); + } } // Compile the called function's body in the scope of the inlined flow - { - let stmts = this.compileFunctionBody(instance); - for (let i = 0, k = stmts.length; i < k; ++i) body.push(stmts[i]); - } + this.compileFunctionBody(instance, body); // Free any new scoped locals and reset to the original flow flow.freeScopedLocals(); @@ -5578,6 +6049,7 @@ export class Compiler extends DiagnosticEmitter { // create the trampoline element var trampolineSignature = new Signature(originalParameterTypes, commonReturnType, commonThisType); trampolineSignature.requiredParameters = maxArguments; + trampolineSignature.parameterNames = originalSignature.parameterNames; trampoline = new Function( original.name + "|trampoline", original.prototype, @@ -5607,10 +6079,10 @@ export class Compiler extends DiagnosticEmitter { minArguments ? module.createBinary( BinaryOp.SubI32, - module.createGetGlobal(CompilerSymbols.argc, NativeType.I32), + module.createGetGlobal(BuiltinSymbols.argc, NativeType.I32), module.createI32(minArguments) ) - : module.createGetGlobal(CompilerSymbols.argc, NativeType.I32) + : module.createGetGlobal(BuiltinSymbols.argc, NativeType.I32) ) ]), module.createUnreachable() @@ -5671,37 +6143,43 @@ export class Compiler extends DiagnosticEmitter { if (!this.argcVar) { let module = this.module; this.argcVar = module.addGlobal( - CompilerSymbols.argc, + BuiltinSymbols.argc, NativeType.I32, true, module.createI32(0) ); } - return CompilerSymbols.argc; + return BuiltinSymbols.argc; } /** Makes sure that the argument count helper setter is present and returns its name. */ private ensureArgcSet(): string { - var internalName = CompilerSymbols.setargc; if (!this.argcSet) { let module = this.module; - this.argcSet = module.addFunction(internalName, + this.argcSet = module.addFunction(BuiltinSymbols.setargc, this.ensureFunctionType([ Type.u32 ], Type.void), null, module.createSetGlobal(this.ensureArgcVar(), module.createGetLocal(0, NativeType.I32) ) ); - module.addFunctionExport(internalName, "_setargc"); + module.addFunctionExport(BuiltinSymbols.setargc, "$.setArgc"); } - return internalName; + return BuiltinSymbols.setargc; } /** Creates a direct call to the specified function. */ makeCallDirect( instance: Function, - operands: ExpressionRef[] | null = null + operands: ExpressionRef[] | null, + reportNode: Node ): ExpressionRef { + if (instance.hasDecorator(DecoratorFlags.INLINE)) { + this.warning( + DiagnosticCode.TODO_Cannot_inline_inferred_calls_and_specific_internals_yet, + reportNode.range, instance.internalName + ); + } var numOperands = operands ? operands.length : 0; var numArguments = numOperands; var minArguments = instance.signature.requiredParameters; @@ -5732,26 +6210,34 @@ export class Compiler extends DiagnosticEmitter { let allOptionalsAreConstant = true; for (let i = numArguments; i < maxArguments; ++i) { let initializer = parameterNodes[i].initializer; - if (!(initializer && nodeIsConstantValue(initializer.kind))) { - allOptionalsAreConstant = false; - break; - } - } - if (allOptionalsAreConstant) { // inline into the call - for (let i = numArguments; i < maxArguments; ++i) { - operands.push( - this.compileExpression( + if (initializer) { + let resolved: Element | null; + if ( + nodeIsConstantValue(initializer.kind) || + ( + (resolved = this.resolver.resolveExpression(initializer, instance.flow, parameterTypes[i])) && + ( + resolved.kind == ElementKind.GLOBAL + // resolved.kind == ElementKind.FUNCTION_TARGET + ) + ) + ) { // inline into the call + let previousFlow = this.currentFlow; + this.currentFlow = instance.flow; + operands.push(this.compileExpression( parameterNodes[i].initializer, parameterTypes[i], ConversionKind.IMPLICIT, WrapMode.NONE - ) - ); - } - } else { // otherwise fill up with zeroes and call the trampoline - for (let i = numArguments; i < maxArguments; ++i) { - operands.push(parameterTypes[i].toNativeZero(module)); + )); + this.currentFlow = previousFlow; + continue; + } } + operands.push(parameterTypes[i].toNativeZero(module)); + allOptionalsAreConstant = false; + } + if (!allOptionalsAreConstant) { if (!isCallImport) { let original = instance; instance = this.ensureTrampoline(instance); @@ -5886,6 +6372,18 @@ export class Compiler extends DiagnosticEmitter { switch (target.kind) { case ElementKind.CLASS: { let isUnchecked = this.currentFlow.is(FlowFlags.UNCHECKED_CONTEXT); + // if (isUnchecked) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (arrayType) { + // return compileBuiltinArrayGet( + // this, + // target, + // expression.expression, + // expression.elementExpression, + // contextualType + // ); + // } + // } let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET, isUnchecked); if (!indexedGet) { this.error( @@ -6113,7 +6611,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(thisLocal.index, nativeSizeType) ), module.createSetLocal(thisLocal.index, - this.makeAllocation(classInstance) + this.makeAllocation(classInstance, expression) ) ) ]; @@ -6197,6 +6695,9 @@ export class Compiler extends DiagnosticEmitter { } let localIndex = (target).index; assert(localIndex >= 0); + if (localType.is(TypeFlags.NULLABLE) && flow.isLocalFlag(localIndex, LocalFlags.NONNULL, false)) { + localType = localType.nonNullableType; + } this.currentType = localType; return this.module.createGetLocal(localIndex, localType.toNativeType()); } @@ -6254,56 +6755,147 @@ export class Compiler extends DiagnosticEmitter { var module = this.module; // NOTE that this differs from TypeScript in that the rhs is a type, not an expression. at the // time of implementation, this seemed more useful because dynamic rhs expressions are not - // possible in AS anyway. + // possible in AS anyway. also note that the code generated below must preserve side-effects of + // the LHS expression even when the result is a constant, i.e. return a block dropping `expr`. var expr = this.compileExpressionRetainType(expression.expression, this.options.usizeType, WrapMode.NONE); var actualType = this.currentType; - var expectedType = this.resolver.resolveType( - expression.isType, - this.currentFlow.actualFunction - ); + var expectedType = this.resolver.resolveType(expression.isType, this.currentFlow.actualFunction); this.currentType = Type.bool; if (!expectedType) return module.createUnreachable(); - // instanceof must be exact + // instanceof - must be exact if (!expectedType.is(TypeFlags.REFERENCE)) { - return module.createI32(actualType == expectedType ? 1 : 0); + return module.createBlock(null, [ + this.convertExpression(expr, actualType, Type.void, ConversionKind.EXPLICIT, WrapMode.NONE, expression.expression), + module.createI32(actualType == expectedType ? 1 : 0) + ], NativeType.I32); } - // instanceof must be != 0 - if ( - actualType.is(TypeFlags.NULLABLE) && !expectedType.is(TypeFlags.NULLABLE) && - actualType.nonNullableType.isAssignableTo(expectedType) - ) { - return module.createBinary( - actualType.is(TypeFlags.LONG) - ? BinaryOp.NeI64 - : BinaryOp.NeI32, - expr, - actualType.toNativeZero(module) - ); + + // instanceof - always false + if (!actualType.is(TypeFlags.REFERENCE)) { + return module.createBlock(null, [ + this.convertExpression(expr, actualType, Type.void, ConversionKind.EXPLICIT, WrapMode.NONE, expression.expression), + module.createI32(0) + ], NativeType.I32); + } + + // both LHS and RHS are references now + var nativeSizeType = actualType.toNativeType(); + + // instanceof - LHS must be != 0 + if (actualType.is(TypeFlags.NULLABLE) && !expectedType.is(TypeFlags.NULLABLE)) { + + // downcast - check statically + if (actualType.nonNullableType.isAssignableTo(expectedType)) { + return module.createBinary( + nativeSizeType == NativeType.I64 + ? BinaryOp.NeI64 + : BinaryOp.NeI32, + expr, + actualType.toNativeZero(module) + ); + } + + // upcast - check dynamically + if (expectedType.isAssignableTo(actualType)) { + let program = this.program; + if (!(actualType.isUnmanaged || expectedType.isUnmanaged)) { + let flow = this.currentFlow; + let tempLocal = flow.getAndFreeTempLocal(actualType, false); + let instanceofInstance = assert(program.instanceofInstance); + this.compileFunction(instanceofInstance); + return module.createIf( + module.createUnary( + nativeSizeType == NativeType.I64 + ? UnaryOp.EqzI64 + : UnaryOp.EqzI32, + module.createTeeLocal(tempLocal.index, expr), + ), + module.createI32(0), + this.makeCallDirect(instanceofInstance, [ + module.createGetLocal(tempLocal.index, nativeSizeType), + module.createI32(expectedType.classReference!.id) + ], expression) + ); + } else { + this.error( + DiagnosticCode.Operation_not_supported, + expression.range + ); + } + } + + // either none or both nullable + } else { + + // downcast - check statically + if (actualType.isAssignableTo(expectedType)) { + return module.createBlock(null, [ + this.convertExpression(expr, actualType, Type.void, ConversionKind.EXPLICIT, WrapMode.NONE, expression.expression), + module.createI32(1) + ], NativeType.I32); + + // upcast - check dynamically + } else if (expectedType.isAssignableTo(actualType)) { + let program = this.program; + if (!(actualType.isUnmanaged || expectedType.isUnmanaged)) { + // FIXME: the temp local and the if can be removed here once flows + // perform null checking, which would error earlier when checking + // uninitialized (thus zero) `var a: A` to be an instance of something. + let flow = this.currentFlow; + let tempLocal = flow.getAndFreeTempLocal(actualType, false); + let instanceofInstance = assert(program.instanceofInstance); + this.compileFunction(instanceofInstance); + return module.createIf( + module.createUnary( + nativeSizeType == NativeType.I64 + ? UnaryOp.EqzI64 + : UnaryOp.EqzI32, + module.createTeeLocal(tempLocal.index, expr), + ), + module.createI32(0), + this.makeCallDirect(instanceofInstance, [ + module.createGetLocal(tempLocal.index, nativeSizeType), + module.createI32(expectedType.classReference!.id) + ], expression) + ); + } else { + this.error( + DiagnosticCode.Operation_not_supported, + expression.range + ); + } + } } - return module.createI32(actualType.isAssignableTo(expectedType) ? 1 : 0); + + // false + return module.createBlock(null, [ + this.convertExpression(expr, actualType, Type.void, ConversionKind.EXPLICIT, WrapMode.NONE, expression.expression), + module.createI32(0) + ], NativeType.I32); } compileLiteralExpression( expression: LiteralExpression, contextualType: Type, - implicitNegate: bool = false + implicitNegate: bool = false, + context: Element | null = null ): ExpressionRef { var module = this.module; switch (expression.literalKind) { case LiteralKind.ARRAY: { assert(!implicitNegate); let classType = contextualType.classReference; - if ( - classType && - classType.prototype == this.program.arrayPrototype - ) { - return this.compileArrayLiteral( - assert(classType.typeArguments)[0], - (expression).elementExpressions, - false, // TODO: isConst? - expression - ); + if (classType) { + if (classType.prototype == this.program.arrayPrototype) { + return this.compileArrayLiteral( + assert(classType.typeArguments)[0], + (expression).elementExpressions, + false, // TODO: isConst? + expression, + context + ); + } } this.error( DiagnosticCode.Operation_not_supported, @@ -6360,278 +6952,157 @@ export class Compiler extends DiagnosticEmitter { return module.createUnreachable(); } - /** Ensures that the specified string exists in static memory and returns a pointer to it. */ - ensureStaticString(stringValue: string): ExpressionRef { - var program = this.program; - var hasGC = program.hasGC; - var gcHeaderSize = program.gcHeaderSize; - - var stringInstance = assert(program.stringInstance); - var stringSegment: MemorySegment; - - // if the string already exists, reuse it - var segments = this.stringSegments; - if (segments.has(stringValue)) { - stringSegment = segments.get(stringValue); - - // otherwise create it - } else { - let length = stringValue.length; - let headerSize = (stringInstance.currentMemoryOffset + 1) & ~1; - let totalSize = headerSize + length * 2; - - let buf: Uint8Array; - let pos: u32; - - if (hasGC) { - buf = new Uint8Array(gcHeaderSize + totalSize); - pos = gcHeaderSize; - writeI32(ensureGCHook(this, stringInstance), buf, program.gcHookOffset); - } else { - buf = new Uint8Array(totalSize); - pos = 0; - } - writeI32(length, buf, pos + stringInstance.offsetof(LibrarySymbols.length)); - pos += headerSize; - for (let i = 0; i < length; ++i) { - writeI16(stringValue.charCodeAt(i), buf, pos + (i << 1)); - } - stringSegment = this.addMemorySegment(buf); - segments.set(stringValue, stringSegment); - } - var stringOffset = stringSegment.offset; - if (hasGC) stringOffset = i64_add(stringOffset, i64_new(gcHeaderSize)); - - this.currentType = stringInstance.type; - if (this.options.isWasm64) { - return this.module.createI64(i64_low(stringOffset), i64_high(stringOffset)); - } else { - assert(i64_is_u32(stringOffset)); - return this.module.createI32(i64_low(stringOffset)); - } - } - compileStringLiteral(expression: StringLiteralExpression): ExpressionRef { return this.ensureStaticString(expression.value); } - /** Ensures that the specified array exists in static memory and returns a pointer to it. */ - ensureStaticArray(elementType: Type, values: ExpressionRef[]): ExpressionRef { - var program = this.program; - var hasGC = program.hasGC; - var gcHeaderSize = program.gcHeaderSize; - - var length = values.length; - var byteSize = elementType.byteSize; - var byteLength = length * byteSize; - var usizeTypeSize = this.options.usizeType.byteSize; - - var buf: Uint8Array; - var pos: u32; - - // create the backing ArrayBuffer segment - var bufferInstance = assert(program.arrayBufferInstance); - var bufferHeaderSize = (bufferInstance.currentMemoryOffset + 7) & ~7; - var bufferTotalSize = 1 << (32 - clz(bufferHeaderSize + byteLength - 1)); - if (hasGC) { - buf = new Uint8Array(gcHeaderSize + bufferTotalSize); - pos = gcHeaderSize; - writeI32(ensureGCHook(this, bufferInstance), buf, program.gcHookOffset); - } else { - buf = new Uint8Array(bufferTotalSize); - pos = 0; - } - writeI32(byteLength, buf, pos + bufferInstance.offsetof(LibrarySymbols.byteLength)); - pos += bufferHeaderSize; - var nativeType = elementType.toNativeType(); - switch (nativeType) { - case NativeType.I32: { - switch (byteSize) { - case 1: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeI8(getConstValueI32(value), buf, pos); - pos += 1; - } - break; - } - case 2: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeI16(getConstValueI32(value), buf, pos); - pos += 2; - } - break; - } - case 4: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeI32(getConstValueI32(value), buf, pos); - pos += 4; - } - break; - } - default: assert(false); - } - break; - } - case NativeType.I64: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeI64(i64_new(getConstValueI64Low(value), getConstValueI64High(value)), buf, pos); - pos += 8; - } - break; - } - case NativeType.F32: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeF32(getConstValueF32(value), buf, pos); - pos += 4; - } - break; - } - case NativeType.F64: { - for (let i = 0; i < length; ++i) { - let value = values[i]; - assert(getExpressionType(value) == nativeType); - assert(getExpressionId(value) == ExpressionId.Const); - writeF64(getConstValueF64(value), buf, pos); - pos += 8; - } - break; - } - default: assert(false); - } - var bufferSegment = this.addMemorySegment(buf); - var bufferOffset = bufferSegment.offset; - if (hasGC) bufferOffset = i64_add(bufferOffset, i64_new(gcHeaderSize)); - - // create the Array segment and return a pointer to it - var arrayPrototype = assert(program.arrayPrototype); - var arrayInstance = assert(this.resolver.resolveClass( - arrayPrototype, - [ elementType ], - makeMap() - )); - var arrayHeaderSize = (arrayInstance.currentMemoryOffset + 7) & ~7; - if (hasGC) { - buf = new Uint8Array(gcHeaderSize + arrayHeaderSize); - pos = gcHeaderSize; - writeI32(ensureGCHook(this, arrayInstance), buf, program.gcHookOffset); - } else { - buf = new Uint8Array(arrayHeaderSize); - pos = 0; - } - var arraySegment = this.addMemorySegment(buf); - var arrayOffset = arraySegment.offset; - if (hasGC) arrayOffset = i64_add(arrayOffset, i64_new(gcHeaderSize)); - this.currentType = arrayInstance.type; - var buffer_offset = pos + arrayInstance.offsetof("buffer_"); - var length_offset = pos + arrayInstance.offsetof("length_"); - if (usizeTypeSize == 8) { - writeI64(bufferOffset, buf, buffer_offset); - writeI32(length, buf, length_offset); - return this.module.createI64(i64_low(arrayOffset), i64_high(arrayOffset)); - } else { - assert(i64_is_u32(bufferOffset)); - writeI32(i64_low(bufferOffset), buf, buffer_offset); - writeI32(length, buf, length_offset); - assert(i64_is_u32(arrayOffset)); - return this.module.createI32(i64_low(arrayOffset)); - } - } - compileArrayLiteral( elementType: Type, expressions: (Expression | null)[], isConst: bool, - reportNode: Node + reportNode: Node, + context: Element | null = null ): ExpressionRef { var module = this.module; // find out whether all elements are constant (array is static) var length = expressions.length; - var compiledValues = new Array(length); - var constantValues = new Array(length); + var constantValues: ExpressionRef[] | null = new Array(length); var nativeElementType = elementType.toNativeType(); - var isStatic = true; for (let i = 0; i < length; ++i) { let expression = expressions[i]; let expr = expression ? this.compileExpression(expression, elementType, ConversionKind.IMPLICIT, WrapMode.NONE) : elementType.toNativeZero(module); - compiledValues[i] = expr; - if (isStatic) { - expr = module.precomputeExpression(expr); - if (getExpressionId(expr) == ExpressionId.Const) { - assert(getExpressionType(expr) == nativeElementType); - constantValues[i] = expr; - } else { - if (isConst) { - this.warning( - DiagnosticCode.Compiling_constant_with_non_constant_initializer_as_mutable, - reportNode.range - ); - } - isStatic = false; + expr = module.precomputeExpression(expr); + if (getExpressionId(expr) == ExpressionId.Const) { + assert(getExpressionType(expr) == nativeElementType); + constantValues![i] = expr; + } else { + if (isConst) { + this.warning( + DiagnosticCode.Compiling_constant_with_non_constant_initializer_as_mutable, + reportNode.range + ); } + constantValues = null; + break; } } - // make a static array if possible - if (isStatic) return this.ensureStaticArray(elementType, constantValues); - - // otherwise obtain the array type - var arrayPrototype = assert(this.program.arrayPrototype); - var arrayInstance = assert(this.resolver.resolveClass( - arrayPrototype, - [ elementType ], - makeMap() - )); + var program = this.program; + var arrayPrototype = assert(program.arrayPrototype); + var arrayInstance = assert(this.resolver.resolveClass(arrayPrototype, [ elementType ])); + var arrayBufferInstance = assert(program.arrayBufferInstance); var arrayType = arrayInstance.type; - // and compile an explicit instantiation - this.currentType = arrayType; + // if the array is static, make a static arraybuffer segment + if (constantValues) { + let runtimeHeaderSize = program.runtimeHeaderSize; + let bufferSegment = this.ensureStaticArrayBuffer(elementType, constantValues); + let bufferAddress = i64_add(bufferSegment.offset, i64_new(runtimeHeaderSize)); + + // make both the buffer and array header static if assigned to a global. this can't be done + // if inside of a function because each invocation must create a new array reference then. + if (context && context.kind == ElementKind.GLOBAL) { + let arraySegment = this.ensureStaticArrayHeader(elementType, bufferSegment); + let arrayAddress = i64_add(arraySegment.offset, i64_new(runtimeHeaderSize)); + this.currentType = arrayType; + return program.options.isWasm64 + ? this.module.createI64(i64_low(arrayAddress), i64_high(arrayAddress)) + : this.module.createI32(i64_low(arrayAddress)); + + // otherwise allocate a new array header and make it wrap a copy of the static buffer + } else { + // makeArray(length, alignLog2, classId, staticBuffer) + let expr = this.makeCallDirect(assert(program.makeArrayInstance), [ + module.createI32(length), + program.options.isWasm64 + ? module.createI64(elementType.alignLog2) + : module.createI32(elementType.alignLog2), + module.createI32(arrayInstance.id), + program.options.isWasm64 + ? module.createI64(i64_low(bufferAddress), i64_high(bufferAddress)) + : module.createI32(i64_low(bufferAddress)) + ], reportNode); + this.currentType = arrayType; + return expr; + } + } + + // otherwise compile an explicit instantiation with indexed sets var setter = arrayInstance.lookupOverload(OperatorKind.INDEXED_SET, true); if (!setter) { this.error( DiagnosticCode.Index_signature_in_type_0_only_permits_reading, reportNode.range, arrayInstance.internalName ); + this.currentType = arrayType; return module.createUnreachable(); } var nativeArrayType = arrayType.toNativeType(); var flow = this.currentFlow; - var tempLocal = flow.parentFunction.addLocal(arrayType); // can't reuse a temp (used in compiledValues) - var stmts = new Array(2 + length); - var index = 0; - stmts[index++] = module.createSetLocal(tempLocal.index, - this.makeCallDirect(assert(arrayInstance.constructorInstance), [ - module.createI32(0), // this - module.createI32(length) - ]) + var tempThis = flow.getTempLocal(arrayType, false); + var tempDataStart = flow.getTempLocal(arrayBufferInstance.type); + var newArrayInstance = assert(program.makeArrayInstance); + var stmts = new Array(); + // tempThis = makeArray(length, alignLog2, classId, source = 0) + stmts.push( + module.createSetLocal(tempThis.index, + this.makeCallDirect(newArrayInstance, [ + module.createI32(length), + program.options.isWasm64 + ? module.createI64(elementType.alignLog2) + : module.createI32(elementType.alignLog2), + module.createI32(arrayInstance.id), + program.options.isWasm64 + ? module.createI64(0) + : module.createI32(0) + ], reportNode), + ) ); - for (let i = 0; i < length; ++i) { - stmts[index++] = this.makeCallDirect(setter, [ - module.createGetLocal(tempLocal.index, nativeArrayType), // this - module.createI32(i), - compiledValues[i] - ]); + // tempData = tempThis.dataStart + var dataStart = assert(arrayInstance.lookupInSelf("dataStart")); + assert(dataStart.kind == ElementKind.FIELD); + stmts.push( + module.createSetLocal(tempDataStart.index, + module.createLoad(arrayType.byteSize, false, + module.createGetLocal(tempThis.index, nativeArrayType), + nativeArrayType, + (dataStart).memoryOffset + ) + ) + ); + var isManaged = elementType.isManaged(program); + for (let i = 0, alignLog2 = elementType.alignLog2; i < length; ++i) { + let valueExpression = expressions[i]; + let valueExpr = valueExpression + ? this.compileExpression(valueExpression, elementType, ConversionKind.IMPLICIT, WrapMode.NONE) + : elementType.toNativeZero(module); + if (isManaged) { + // value = link/retain(value[, tempThis]) + valueExpr = this.makeInsertRef( + valueExpr, + tempThis, + elementType.is(TypeFlags.NULLABLE) + ); + } + // store(tempData, value, immOffset) + stmts.push( + module.createStore(elementType.byteSize, + module.createGetLocal(tempDataStart.index, nativeArrayType), + valueExpr, + nativeElementType, + i << alignLog2 + ) + ); } - assert(index + 1 == stmts.length); - stmts[index] = module.createGetLocal(tempLocal.index, nativeArrayType); - flow.freeTempLocal(tempLocal); // but can be reused now + // -> tempThis + stmts.push( + module.createGetLocal(tempThis.index, nativeArrayType) + ); + flow.freeTempLocal(tempThis); + flow.freeTempLocal(tempDataStart); this.currentType = arrayType; return module.createBlock(null, stmts, nativeArrayType); } @@ -6712,12 +7183,13 @@ export class Compiler extends DiagnosticEmitter { // allocate a new instance first and assign 'this' to the temp. local exprs[0] = module.createSetLocal( tempLocal.index, - this.makeAllocation(classReference) + this.makeAllocation(classReference, expression) ); // once all field values have been set, return 'this' exprs[exprs.length - 1] = module.createGetLocal(tempLocal.index, this.options.nativeSizeType); + this.currentType = classReference.type; return module.createBlock(null, exprs, this.options.nativeSizeType); } @@ -6832,7 +7304,7 @@ export class Compiler extends DiagnosticEmitter { module.createGetLocal(0, nativeSizeType) ), module.createSetLocal(0, - this.makeAllocation(classInstance) + this.makeAllocation(classInstance, reportNode) ) ) ); @@ -6847,7 +7319,7 @@ export class Compiler extends DiagnosticEmitter { // TODO: base constructor might be inlined, but makeCallDirect can't do this stmts.push( module.createSetLocal(0, - this.makeCallDirect(assert(baseClass.constructorInstance), operands) + this.makeCallDirect(assert(baseClass.constructorInstance), operands, reportNode) ) ); } @@ -6993,43 +7465,6 @@ export class Compiler extends DiagnosticEmitter { return module.createUnreachable(); } - private compileGetter(target: PropertyPrototype, reportNode: Node): ExpressionRef { - var prototype = target.getterPrototype; - if (prototype) { - let instance = this.resolver.resolveFunction(prototype, null); - if (!instance) return this.module.createUnreachable(); - let signature = instance.signature; - if (!this.checkCallSignature( // reports - signature, - 0, - instance.is(CommonFlags.INSTANCE), - reportNode - )) { - return this.module.createUnreachable(); - } - if (instance.is(CommonFlags.INSTANCE)) { - let classInstance = assert(instance.parent); assert(classInstance.kind == ElementKind.CLASS); - let thisExpression = assert(this.resolver.currentThisExpression); //!!! - let thisExpr = this.compileExpressionRetainType( - thisExpression, - this.options.usizeType, - WrapMode.NONE - ); - this.currentType = signature.returnType; - return this.compileCallDirect(instance, [], reportNode, thisExpr); - } else { - this.currentType = signature.returnType; - return this.compileCallDirect(instance, [], reportNode, 0); - } - } else { - this.error( - DiagnosticCode.Property_0_does_not_exist_on_type_1, - reportNode.range, (target).name, (target).parent.toString() - ); - return this.module.createUnreachable(); - } - } - compileTernaryExpression(expression: TernaryExpression, contextualType: Type): ExpressionRef { var ifThen = expression.ifThen; var ifElse = expression.ifElse; @@ -7119,23 +7554,21 @@ export class Compiler extends DiagnosticEmitter { // shortcut if compiling the getter already failed if (getExpressionId(getValue) == ExpressionId.Unreachable) return getValue; - var currentType = this.currentType; - // if the value isn't dropped, a temp. local is required to remember the original value var tempLocal: Local | null = null; if (contextualType != Type.void) { - tempLocal = flow.getTempLocal(currentType, false); + tempLocal = flow.getTempLocal(this.currentType, false); getValue = module.createTeeLocal( tempLocal.index, getValue ); } - var calcValue: ExpressionRef; + var expr: ExpressionRef; switch (expression.operator) { case Token.PLUS_PLUS: { - switch (currentType.kind) { + switch (this.currentType.kind) { case TypeKind.I8: case TypeKind.I16: case TypeKind.I32: @@ -7143,7 +7576,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.U16: case TypeKind.U32: case TypeKind.BOOL: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.AddI32, getValue, module.createI32(1) @@ -7157,7 +7590,7 @@ export class Compiler extends DiagnosticEmitter { if (classReference) { let overload = classReference.lookupOverload(OperatorKind.POSTFIX_INC); if (overload) { - calcValue = this.compileUnaryOverload(overload, expression.operand, getValue, expression); + expr = this.compileUnaryOverload(overload, expression.operand, getValue, expression); break; } } @@ -7170,18 +7603,18 @@ export class Compiler extends DiagnosticEmitter { } case TypeKind.ISIZE: { let options = this.options; - calcValue = module.createBinary( + expr = module.createBinary( options.isWasm64 ? BinaryOp.AddI64 : BinaryOp.AddI32, getValue, - currentType.toNativeOne(module) + this.currentType.toNativeOne(module) ); break; } case TypeKind.I64: case TypeKind.U64: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.AddI64, getValue, module.createI64(1) @@ -7189,7 +7622,7 @@ export class Compiler extends DiagnosticEmitter { break; } case TypeKind.F32: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.AddF32, getValue, module.createF32(1) @@ -7197,7 +7630,7 @@ export class Compiler extends DiagnosticEmitter { break; } case TypeKind.F64: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.AddF64, getValue, module.createF64(1) @@ -7212,7 +7645,7 @@ export class Compiler extends DiagnosticEmitter { break; } case Token.MINUS_MINUS: { - switch (currentType.kind) { + switch (this.currentType.kind) { case TypeKind.I8: case TypeKind.I16: case TypeKind.I32: @@ -7220,7 +7653,7 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.U16: case TypeKind.U32: case TypeKind.BOOL: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.SubI32, getValue, module.createI32(1) @@ -7234,7 +7667,7 @@ export class Compiler extends DiagnosticEmitter { if (classReference) { let overload = classReference.lookupOverload(OperatorKind.POSTFIX_DEC); if (overload) { - calcValue = this.compileUnaryOverload(overload, expression.operand, getValue, expression); + expr = this.compileUnaryOverload(overload, expression.operand, getValue, expression); break; } } @@ -7247,18 +7680,18 @@ export class Compiler extends DiagnosticEmitter { } case TypeKind.ISIZE: { let options = this.options; - calcValue = module.createBinary( + expr = module.createBinary( options.isWasm64 ? BinaryOp.SubI64 : BinaryOp.SubI32, getValue, - currentType.toNativeOne(module) + this.currentType.toNativeOne(module) ); break; } case TypeKind.I64: case TypeKind.U64: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.SubI64, getValue, module.createI64(1) @@ -7266,7 +7699,7 @@ export class Compiler extends DiagnosticEmitter { break; } case TypeKind.F32: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.SubF32, getValue, module.createF32(1) @@ -7274,7 +7707,7 @@ export class Compiler extends DiagnosticEmitter { break; } case TypeKind.F64: { - calcValue = module.createBinary( + expr = module.createBinary( BinaryOp.SubF64, getValue, module.createF64(1) @@ -7297,15 +7730,17 @@ export class Compiler extends DiagnosticEmitter { // simplify if dropped anyway if (!tempLocal) { this.currentType = Type.void; - return this.compileAssignmentWithValue(expression.operand, - calcValue, + return this.compileAssignmentWithValue( + expression.operand, + expr, false ); } // otherwise use the temp. local for the intermediate value (always possibly overflows) - var setValue = this.compileAssignmentWithValue(expression.operand, - calcValue, // also tees getValue to tempLocal + var setValue = this.compileAssignmentWithValue( + expression.operand, + expr, // also tees getValue to tempLocal false ); @@ -7688,7 +8123,11 @@ export class Compiler extends DiagnosticEmitter { } } return compound - ? this.compileAssignmentWithValue(expression.operand, expr, contextualType != Type.void) + ? this.compileAssignmentWithValue( + expression.operand, + expr, + contextualType != Type.void + ) : expr; } @@ -7757,6 +8196,17 @@ export class Compiler extends DiagnosticEmitter { return expr; } + /** Adds the debug location of the specified expression at the specified range to the source map. */ + addDebugLocation(expr: ExpressionRef, range: Range): void { + var parentFunction = this.currentFlow.parentFunction; + var source = range.source; + if (source.debugInfoIndex < 0) source.debugInfoIndex = this.module.addDebugInfoFile(source.normalizedPath); + range.debugInfoRef = expr; + parentFunction.debugLocations.push(range); + } + + // === Specialized code generation ============================================================== + /** Creates a comparison whether an expression is 'false' in a broader sense. */ makeIsFalseish(expr: ExpressionRef, type: Type): ExpressionRef { var module = this.module; @@ -7801,11 +8251,11 @@ export class Compiler extends DiagnosticEmitter { case TypeKind.I8: case TypeKind.I16: case TypeKind.U8: - case TypeKind.U16: - case TypeKind.BOOL: { + case TypeKind.U16: { expr = this.ensureSmallIntegerWrap(expr, type); // fall-through } + case TypeKind.BOOL: // not a mask, just != 0 case TypeKind.I32: case TypeKind.U32: { return expr; @@ -7834,47 +8284,48 @@ export class Compiler extends DiagnosticEmitter { } /** Makes an allocation suitable to hold the data of an instance of the given class. */ - makeAllocation(classInstance: Class): ExpressionRef { + makeAllocation(classInstance: Class, reportNode: Node): ExpressionRef { var program = this.program; assert(classInstance.program == program); var module = this.module; var options = this.options; + var classType = classInstance.type; - // __gc_allocate(size, markFn) - if (program.hasGC && classInstance.type.isManaged(program)) { - let allocateInstance = assert(program.gcAllocateInstance); - if (!this.compileFunction(allocateInstance)) return module.createUnreachable(); - this.currentType = classInstance.type; - return module.createCall( - allocateInstance.internalName, [ - options.isWasm64 - ? module.createI64(classInstance.currentMemoryOffset) - : module.createI32(classInstance.currentMemoryOffset), - module.createI32( - ensureGCHook(this, classInstance) - ) - ], - options.nativeSizeType + if (!program.allocateMem) { + this.error( + DiagnosticCode.An_allocator_must_be_present_to_use_0, + reportNode.range, "new" ); + } + + if (classInstance.hasDecorator(DecoratorFlags.UNMANAGED)) { + // memory.allocate(sizeof()) + this.currentType = classType; + return this.makeCallDirect(assert(program.memoryAllocateInstance), [ + options.isWasm64 + ? module.createI64(classInstance.currentMemoryOffset) + : module.createI32(classInstance.currentMemoryOffset) + ], reportNode); - // memory.allocate(size) } else { - let allocateInstance = program.memoryAllocateInstance; - if (!allocateInstance || !this.compileFunction(allocateInstance)) return module.createUnreachable(); - this.currentType = classInstance.type; - return module.createCall( - allocateInstance.internalName, [ + // register(allocate(sizeof()), classId) + this.currentType = classType; + return this.makeCallDirect(assert(program.registerInstance), [ + this.makeCallDirect(assert(program.allocateInstance), [ options.isWasm64 ? module.createI64(classInstance.currentMemoryOffset) : module.createI32(classInstance.currentMemoryOffset) - ], - options.nativeSizeType - ); + ], reportNode), + module.createI32(classInstance.id) + ], reportNode); } } /** Makes the initializers for a class's fields. */ - makeFieldInitialization(classInstance: Class, stmts: ExpressionRef[] = []): ExpressionRef[] { + makeFieldInitialization( + classInstance: Class, + stmts: ExpressionRef[] = [] + ): ExpressionRef[] { var members = classInstance.members; if (!members) return []; @@ -7932,13 +8383,218 @@ export class Compiler extends DiagnosticEmitter { return stmts; } - /** Adds the debug location of the specified expression at the specified range to the source map. */ - addDebugLocation(expr: ExpressionRef, range: Range): void { - var parentFunction = this.currentFlow.parentFunction; - var source = range.source; - if (source.debugInfoIndex < 0) source.debugInfoIndex = this.module.addDebugInfoFile(source.normalizedPath); - range.debugInfoRef = expr; - parentFunction.debugLocations.push(range); + /** Wraps a reference in a `retain` call. Returns the reference if `tempLocal` is specified. */ + makeRetain(valueExpr: ExpressionRef, tempIndex: i32 = -1): ExpressionRef { + var module = this.module; + var program = this.program; + var retainFn = assert(program.retainRef); + this.compileFunction(retainFn); + if (tempIndex >= 0) { + let nativeSizeType = this.options.nativeSizeType; + return module.createBlock(null, [ + module.createCall(retainFn.internalName, [ + module.createTeeLocal(tempIndex, valueExpr) + ], NativeType.None), + module.createGetLocal(tempIndex, nativeSizeType) + ], nativeSizeType); + } else { + return module.createCall(retainFn.internalName, [ valueExpr ], NativeType.None); + } + } + + /** Wraps a reference in `release` call. Returns the reference if `tempLocal` is specified. */ + makeRelease(valueExpr: ExpressionRef, tempIndex: i32 = -1): ExpressionRef { + var module = this.module; + var program = this.program; + var releaseFn = assert(program.releaseRef); + this.compileFunction(releaseFn); + if (tempIndex >= 0) { + let nativeSizeType = this.options.nativeSizeType; + return module.createBlock(null, [ + module.createCall(releaseFn.internalName, [ + module.createTeeLocal(tempIndex, valueExpr) + ], NativeType.None), + module.createGetLocal(tempIndex, nativeSizeType) + ], nativeSizeType); + } else { + return module.createCall(releaseFn.internalName, [ valueExpr ], NativeType.None); + } + } + + /** Wraps a new and an old reference in a sequence of `retain` and `release` calls. */ + makeRetainRelease(newValueExpr: ExpressionRef, oldValueExpr: ExpressionRef, tempIndex: i32 = -1): ExpressionRef { + // TODO: checking `newValue != oldValue` significantly reduces strain on the roots buffer + // when cyclic structures may be immediately released but also requires a tempIndex. might + // be worth to require a temp here. furthermore it might be worth to require it for retain + // and release as well so we can emit != null checks where necessary only? + var module = this.module; + if (tempIndex >= 0) { + let nativeSizeType = this.options.nativeSizeType; + return module.createBlock(null, [ + this.makeRetain(module.createTeeLocal(tempIndex, newValueExpr)), + this.makeRelease(oldValueExpr), + module.createGetLocal(tempIndex, nativeSizeType) + ], nativeSizeType); + } else { + return module.createBlock(null, [ + this.makeRetain(newValueExpr), + this.makeRelease(oldValueExpr) + ]); + } + } + + /** Prepares the insertion of a reference into an _uninitialized_ parent using the GC interface. */ + makeInsertRef( + valueExpr: ExpressionRef, + tempParent: Local | null, + nullable: bool + ): ExpressionRef { + var module = this.module; + var program = this.program; + var usizeType = this.options.usizeType; + var nativeSizeType = this.options.nativeSizeType; + var flow = this.currentFlow; + var tempValue = flow.getTempLocal(usizeType, false); + var handle: ExpressionRef; + var fn: Function | null; + if (fn = program.linkRef) { // tracing + handle = module.createCall(fn.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType), + module.createGetLocal(assert(tempParent).index, nativeSizeType) + ], NativeType.None); + } else if (fn = program.retainRef) { // arc + handle = module.createCall(fn.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType) + ], NativeType.None); + } else { + assert(false); + return module.createUnreachable(); + } + flow.freeTempLocal(tempValue); + if (!this.compileFunction(fn)) return module.createUnreachable(); + // { + // [if (value !== null)] link/retain(value[, parent]) + // } -> value + return module.createBlock(null, [ + module.createSetLocal(tempValue.index, valueExpr), + nullable + ? module.createIf( + module.createGetLocal(tempValue.index, nativeSizeType), + handle + ) + : handle, + module.createGetLocal(tempValue.index, nativeSizeType) + ], nativeSizeType); + } + + /** Prepares the replaces a reference hold by an _initialized_ parent using the GC interface. */ + makeReplaceRef( + valueExpr: ExpressionRef, + oldValueExpr: ExpressionRef, + tempParent: Local | null, + nullable: bool + ): ExpressionRef { + var module = this.module; + var program = this.program; + var usizeType = this.options.usizeType; + var nativeSizeType = this.options.nativeSizeType; + var flow = this.currentFlow; + var tempValue = flow.getTempLocal(usizeType, false); + var tempOldValue = flow.getTempLocal(usizeType, false); + var handleOld: ExpressionRef = 0; + var handleNew: ExpressionRef; + var fn1: Function | null, fn2: Function | null; + if (fn1 = program.linkRef) { // tracing + tempParent = assert(tempParent); + if (fn2 = program.unlinkRef) { + handleOld = module.createCall(fn2.internalName, [ + module.createGetLocal(tempOldValue.index, nativeSizeType), + module.createGetLocal(tempParent.index, nativeSizeType) + ], NativeType.None); + } + handleNew = module.createCall(fn1.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType), + module.createGetLocal(tempParent.index, nativeSizeType) + ], NativeType.None); + } else if (fn1 = program.retainRef) { // arc + fn2 = assert(program.releaseRef); + handleOld = module.createCall(fn2.internalName, [ + module.createGetLocal(tempOldValue.index, nativeSizeType) + ], NativeType.None); + handleNew = module.createCall(fn1.internalName, [ + module.createGetLocal(tempValue.index, nativeSizeType) + ], NativeType.None); + } else { + assert(false); + return module.createUnreachable(); + } + flow.freeTempLocal(tempValue); + flow.freeTempLocal(tempOldValue); + if (!this.compileFunction(fn1)) return module.createUnreachable(); + if (fn2 && !this.compileFunction(fn2)) return module.createUnreachable(); + // if (value != oldValue) { + // if (oldValue !== null) unlink/release(oldValue[, parent]) + // [if (value !== null)] link/retain(value[, parent]) + // } -> value + return module.createIf( + module.createBinary(nativeSizeType == NativeType.I32 ? BinaryOp.NeI32 : BinaryOp.NeI64, + module.createTeeLocal(tempValue.index, valueExpr), + module.createTeeLocal(tempOldValue.index, oldValueExpr) + ), + module.createBlock(null, [ + handleOld + ? module.createIf( + module.createGetLocal(tempOldValue.index, nativeSizeType), + handleOld + ) + : module.createNop(), + nullable + ? module.createIf( + module.createGetLocal(tempValue.index, nativeSizeType), + handleNew + ) + : handleNew, + module.createGetLocal(tempValue.index, nativeSizeType) + ], nativeSizeType), + module.createGetLocal(tempValue.index, nativeSizeType) + ); + } + + makeInstanceOfClass( + expr: ExpressionRef, + classInstance: Class + ): ExpressionRef { + var module = this.module; + var flow = this.currentFlow; + var idTemp = flow.getTempLocal(Type.i32, false); + var idExpr = module.createLoad(4, false, + module.createBinary(BinaryOp.SubI32, + expr, + module.createI32(this.program.runtimeHeaderSize) + ), + NativeType.I32 + ); + var label = "instanceof_" + classInstance.name + "|" + flow.pushBreakLabel(); + var conditions: ExpressionRef[] = []; + conditions.push( + module.createDrop( // br_if returns the value too + module.createBreak(label, + module.createBinary(BinaryOp.EqI32, // classId == class.id + module.createTeeLocal(idTemp.index, idExpr), + module.createI32(classInstance.id) + ), + module.createI32(1) // ? true + ) + ) + ); + // TODO: insert conditions for all possible subclasses (i.e. cat is also animal) + // TODO: simplify if there are none + conditions.push( + module.createI32(0) // : false + ); + flow.freeTempLocal(idTemp); + flow.popBreakLabel(); + return module.createBlock(label, conditions, NativeType.I32); } } @@ -7999,13 +8655,3 @@ function mangleImportName( var mangleImportName_moduleName: string; var mangleImportName_elementName: string; - -/** Special compiler symbols. */ -namespace CompilerSymbols { - /** Module started global. Used if an explicit start function is present. */ - export const started = "~lib/started"; - /** Argument count global. Used to call trampolines for varargs functions. */ - export const argc = "~lib/argc"; - /** Argument count setter. Exported for use by host calls. */ - export const setargc = "~lib/setargc"; -} diff --git a/src/diagnosticMessages.generated.ts b/src/diagnosticMessages.generated.ts index dd8d451261..933c3456f4 100644 --- a/src/diagnosticMessages.generated.ts +++ b/src/diagnosticMessages.generated.ts @@ -24,7 +24,7 @@ export enum DiagnosticCode { Class_0_is_sealed_and_cannot_be_extended = 211, Decorator_0_is_not_valid_here = 212, Duplicate_decorator = 213, - An_allocator_must_be_declared_to_allocate_memory_Try_importing_allocator_arena_or_allocator_tlsf = 214, + An_allocator_must_be_present_to_use_0 = 214, Optional_parameter_must_have_an_initializer = 215, Constructor_of_class_0_must_not_require_any_arguments = 216, Function_0_cannot_be_inlined_into_itself = 217, @@ -34,6 +34,8 @@ export enum DiagnosticCode { Module_cannot_have_multiple_start_functions = 221, _0_must_be_a_value_between_1_and_2_inclusive = 222, _0_must_be_a_power_of_two = 223, + TODO_Cannot_inline_inferred_calls_and_specific_internals_yet = 224, + Expression_is_never_null = 225, Unterminated_string_literal = 1002, Identifier_expected = 1003, _0_expected = 1005, @@ -120,6 +122,7 @@ export enum DiagnosticCode { The_0_operator_cannot_be_applied_to_type_1 = 2469, In_const_enum_declarations_member_initializer_must_be_constant_expression = 2474, Export_declaration_conflicts_with_exported_declaration_of_0 = 2484, + Object_is_possibly_null = 2531, Cannot_assign_to_0_because_it_is_a_constant_or_a_read_only_property = 2540, The_target_of_an_assignment_must_be_a_variable_or_a_property_access = 2541, Index_signature_in_type_0_only_permits_reading = 2542, @@ -159,7 +162,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string { case 211: return "Class '{0}' is sealed and cannot be extended."; case 212: return "Decorator '{0}' is not valid here."; case 213: return "Duplicate decorator."; - case 214: return "An allocator must be declared to allocate memory. Try importing allocator/arena or allocator/tlsf."; + case 214: return "An allocator must be present to use '{0}'."; case 215: return "Optional parameter must have an initializer."; case 216: return "Constructor of class '{0}' must not require any arguments."; case 217: return "Function '{0}' cannot be inlined into itself."; @@ -169,6 +172,8 @@ export function diagnosticCodeToString(code: DiagnosticCode): string { case 221: return "Module cannot have multiple start functions."; case 222: return "'{0}' must be a value between '{1}' and '{2}' inclusive."; case 223: return "'{0}' must be a power of two."; + case 224: return "TODO: Cannot inline inferred calls and specific internals yet."; + case 225: return "Expression is never 'null'."; case 1002: return "Unterminated string literal."; case 1003: return "Identifier expected."; case 1005: return "'{0}' expected."; @@ -255,6 +260,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string { case 2469: return "The '{0}' operator cannot be applied to type '{1}'."; case 2474: return "In 'const' enum declarations member initializer must be constant expression."; case 2484: return "Export declaration conflicts with exported declaration of '{0}'."; + case 2531: return "Object is possibly 'null'."; case 2540: return "Cannot assign to '{0}' because it is a constant or a read-only property."; case 2541: return "The target of an assignment must be a variable or a property access."; case 2542: return "Index signature in type '{0}' only permits reading."; diff --git a/src/diagnosticMessages.json b/src/diagnosticMessages.json index 128062772e..86731c5b59 100644 --- a/src/diagnosticMessages.json +++ b/src/diagnosticMessages.json @@ -16,7 +16,7 @@ "Class '{0}' is sealed and cannot be extended.": 211, "Decorator '{0}' is not valid here.": 212, "Duplicate decorator.": 213, - "An allocator must be declared to allocate memory. Try importing allocator/arena or allocator/tlsf.": 214, + "An allocator must be present to use '{0}'.": 214, "Optional parameter must have an initializer.": 215, "Constructor of class '{0}' must not require any arguments.": 216, "Function '{0}' cannot be inlined into itself.": 217, @@ -26,6 +26,8 @@ "Module cannot have multiple start functions.": 221, "'{0}' must be a value between '{1}' and '{2}' inclusive.": 222, "'{0}' must be a power of two.": 223, + "TODO: Cannot inline inferred calls and specific internals yet.": 224, + "Expression is never 'null'.": 225, "Unterminated string literal.": 1002, "Identifier expected.": 1003, @@ -114,6 +116,7 @@ "The '{0}' operator cannot be applied to type '{1}'.": 2469, "In 'const' enum declarations member initializer must be constant expression.": 2474, "Export declaration conflicts with exported declaration of '{0}'.": 2484, + "Object is possibly 'null'.": 2531, "Cannot assign to '{0}' because it is a constant or a read-only property.": 2540, "The target of an assignment must be a variable or a property access.": 2541, "Index signature in type '{0}' only permits reading.": 2542, diff --git a/src/diagnostics.ts b/src/diagnostics.ts index b7f3f4061f..9368bf9484 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -14,7 +14,7 @@ import { } from "./diagnosticMessages.generated"; import { - isLineBreak + isLineBreak, CharCode } from "./util"; export { @@ -244,7 +244,13 @@ export function formatDiagnosticContext(range: Range, useColors: bool = false): if (range.start == range.end) { sb.push("^"); } else { - while (start++ < range.end) sb.push("~"); + while (start++ < range.end) { + if (isLineBreak(text.charCodeAt(start))) { + sb.push(start == range.start + 1 ? "^" : "~"); + break; + } + sb.push("~"); + } } if (useColors) sb.push(COLOR_RESET); return sb.join(""); diff --git a/src/flow.ts b/src/flow.ts index ceae0a1b70..4a7227d172 100644 --- a/src/flow.ts +++ b/src/flow.ts @@ -47,7 +47,11 @@ import { getIfFalse, getSelectThen, getSelectElse, - getCallTarget + getCallTarget, + getSetLocalIndex, + getIfCondition, + getConstValueI64High, + getUnaryValue } from "./module"; import { @@ -62,11 +66,6 @@ import { Node } from "./ast"; -import { - bitsetIs, - bitsetSet -} from "./util"; - /** Control flow flags indicating specific conditions. */ export const enum FlowFlags { /** No specific conditions. */ @@ -134,6 +133,60 @@ export const enum FlowFlags { | FlowFlags.CONDITIONALLY_ALLOCATES } +/** Flags indicating the current state of a local. */ +export enum LocalFlags { + /** No specific conditions. */ + NONE = 0, + + /** Local is properly wrapped. Relevant for small integers. */ + WRAPPED = 1 << 0, + /** Local is non-null. */ + NONNULL = 1 << 1, + /** Local is read from. */ + READFROM = 1 << 2, + /** Local is written to. */ + WRITTENTO = 1 << 3, + + /** Local is conditionally read from. */ + CONDITIONALLY_READFROM = 1 << 4, + /** Local is conditionally written to. */ + CONDITIONALLY_WRITTENTO = 1 << 5, + + /** Any categorical flag. */ + ANY_CATEGORICAL = WRAPPED | NONNULL | READFROM | WRITTENTO, + /** Any conditional flag. */ + ANY_CONDITIONAL = CONDITIONALLY_READFROM | CONDITIONALLY_WRITTENTO +} +export namespace LocalFlags { + export function join(left: LocalFlags, right: LocalFlags): LocalFlags { + return ((left & LocalFlags.ANY_CATEGORICAL) & (right & LocalFlags.ANY_CATEGORICAL)) + | (left & LocalFlags.ANY_CONDITIONAL) | (right & LocalFlags.ANY_CONDITIONAL); + } +} + +/** Flags indicating the current state of a field. */ +export enum FieldFlags { + /** No specific conditions. */ + NONE = 0, + + /** Field is initialized. Relevant in constructors. */ + INITIALIZED = 1 << 0, + /** Field is conditionally initialized. Relevant in constructors. */ + CONDITIONALLY_INITIALIZED = 1 << 1, + + /** Any categorical flag. */ + ANY_CATEGORICAL = INITIALIZED, + + /** Any conditional flag. */ + ANY_CONDITIONAL = CONDITIONALLY_INITIALIZED +} +export namespace FieldFlags { + export function join(left: FieldFlags, right: FieldFlags): FieldFlags { + return ((left & FieldFlags.ANY_CATEGORICAL) & (right & FieldFlags.ANY_CATEGORICAL)) + | (left & FieldFlags.ANY_CONDITIONAL) | (right & FieldFlags.ANY_CONDITIONAL); + } +} + /** A control flow evaluator. */ export class Flow { @@ -153,10 +206,10 @@ export class Flow { contextualTypeArguments: Map | null; /** Scoped local variables. */ scopedLocals: Map | null = null; - /** Local variable wrap states for the first 64 locals. */ - wrappedLocals: I64; - /** Local variable wrap states for locals with index >= 64. */ - wrappedLocalsExt: I64[] | null; + /** Local flags. */ + localFlags: LocalFlags[]; + /** Field flags. Relevant in constructors. */ + fieldFlags: Map | null = null; /** Function being inlined, when inlining. */ inlineFunction: Function | null; /** The label we break to when encountering a return statement, when inlining. */ @@ -172,14 +225,13 @@ export class Flow { flow.breakLabel = null; flow.returnType = parentFunction.signature.returnType; flow.contextualTypeArguments = parentFunction.contextualTypeArguments; - flow.wrappedLocals = i64_new(0); - flow.wrappedLocalsExt = null; + flow.localFlags = []; flow.inlineFunction = null; flow.inlineReturnLabel = null; return flow; } - /** Creates an inline flow within `currentFunction`. */ + /** Creates an inline flow within `parentFunction`. */ static createInline(parentFunction: Function, inlineFunction: Function): Flow { var flow = Flow.create(parentFunction); flow.set(FlowFlags.INLINE_CONTEXT); @@ -216,8 +268,7 @@ export class Flow { branch.breakLabel = this.breakLabel; branch.returnType = this.returnType; branch.contextualTypeArguments = this.contextualTypeArguments; - branch.wrappedLocals = this.wrappedLocals; - branch.wrappedLocalsExt = this.wrappedLocalsExt ? this.wrappedLocalsExt.slice() : null; + branch.localFlags = this.localFlags.slice(); branch.inlineFunction = this.inlineFunction; branch.inlineReturnLabel = this.inlineReturnLabel; return branch; @@ -243,7 +294,10 @@ export class Flow { } else { local = parentFunction.addLocal(type); } - if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) this.setLocalWrapped(local.index, wrapped); + if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { + if (wrapped) this.setLocalFlag(local.index, LocalFlags.WRAPPED); + else this.unsetLocalFlag(local.index, LocalFlags.WRAPPED); + } return local; } @@ -316,7 +370,10 @@ export class Flow { local = parentFunction.addLocal(type); temps.push(local); } - if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) this.setLocalWrapped(local.index, wrapped); + if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { + if (wrapped) this.setLocalFlag(local.index, LocalFlags.WRAPPED); + else this.unsetLocalFlag(local.index, LocalFlags.WRAPPED); + } return local; } @@ -339,7 +396,8 @@ export class Flow { scopedLocal.set(CommonFlags.SCOPED); this.scopedLocals.set(name, scopedLocal); if (type.is(TypeFlags.SHORT | TypeFlags.INTEGER)) { - this.setLocalWrapped(scopedLocal.index, wrapped); + if (wrapped) this.setLocalFlag(scopedLocal.index, LocalFlags.WRAPPED); + else this.unsetLocalFlag(scopedLocal.index, LocalFlags.WRAPPED); } return scopedLocal; } @@ -371,6 +429,27 @@ export class Flow { return scopedAlias; } + /** Blocks any locals that might be used in an inlining operation. */ + blockLocalsBeforeInlining(instance: Function): Local[] { + var signature = instance.signature; + var parameterTypes = signature.parameterTypes; + var numParameters = parameterTypes.length; + var temps = new Array(numParameters); + for (let i = 0; i < numParameters; ++i) { + temps[i] = this.getTempLocal(parameterTypes[i], false); + } + var thisType = signature.thisType; + if (thisType) temps.push(this.getTempLocal(thisType, false)); + return temps; + } + + /** Unblocks the specified locals. */ + unblockLocals(temps: Local[]): void { + for (let i = 0, k = temps.length; i < k; ++i) { + this.freeTempLocal(temps[i]); + } + } + /** Frees this flow's scoped variables and returns its parent flow. */ freeScopedLocals(): void { if (this.scopedLocals) { @@ -399,32 +478,27 @@ export class Flow { return this.actualFunction.lookup(name); } - /** Tests if the value of the local at the specified index is considered wrapped. */ - isLocalWrapped(index: i32): bool { - if (index < 0) return true; // inlined constant - if (index < 64) return bitsetIs(this.wrappedLocals, index); - var ext = this.wrappedLocalsExt; - var i = ((index - 64) / 64) | 0; - if (!(ext && i < ext.length)) return false; - return bitsetIs(ext[i], index - (i + 1) * 64); + /** Tests if the local at the specified index has the specified flag. */ + isLocalFlag(index: i32, flag: LocalFlags, defaultIfInlined: bool = true): bool { + if (index < 0) return defaultIfInlined; + var localFlags = this.localFlags; + return index < localFlags.length && (unchecked(this.localFlags[index]) & flag) != 0; } - /** Sets if the value of the local at the specified index is considered wrapped. */ - setLocalWrapped(index: i32, wrapped: bool): void { - if (index < 0) return; // inlined constant - if (index < 64) { - this.wrappedLocals = bitsetSet(this.wrappedLocals, index, wrapped); - return; - } - var ext = this.wrappedLocalsExt; - var i = ((index - 64) / 64) | 0; - if (!ext) { - this.wrappedLocalsExt = ext = new Array(i + 1); - for (let j = 0; j <= i; ++j) ext[j] = i64_new(0); - } else { - while (ext.length <= i) ext.push(i64_new(0)); - } - ext[i] = bitsetSet(ext[i], index - (i + 1) * 64, wrapped); + /** Sets the specified flag on the local at the specified index. */ + setLocalFlag(index: i32, flag: LocalFlags): void { + if (index < 0) return; + var localFlags = this.localFlags; + var flags = index < localFlags.length ? unchecked(localFlags[index]) : 0; + this.localFlags[index] = flags | flag; + } + + /** Unsets the specified flag on the local at the specified index. */ + unsetLocalFlag(index: i32, flag: LocalFlags): void { + if (index < 0) return; + var localFlags = this.localFlags; + var flags = index < localFlags.length ? unchecked(localFlags[index]) : 0; + this.localFlags[index] = flags & ~flag; } /** Pushes a new break label to the stack, for example when entering a loop that one can `break` from. */ @@ -454,8 +528,7 @@ export class Flow { /** Inherits flags and local wrap states from the specified flow (e.g. blocks). */ inherit(other: Flow): void { this.flags |= other.flags & (FlowFlags.ANY_CATEGORICAL | FlowFlags.ANY_CONDITIONAL); - this.wrappedLocals = other.wrappedLocals; - this.wrappedLocalsExt = other.wrappedLocalsExt; // no need to slice because other flow is finished + this.localFlags = other.localFlags; // no need to slice because other flow is finished } /** Inherits categorical flags as conditional flags from the specified flow (e.g. then without else). */ @@ -486,22 +559,215 @@ export class Flow { this.flags |= left.flags & FlowFlags.ANY_CONDITIONAL; this.flags |= right.flags & FlowFlags.ANY_CONDITIONAL; - // locals wrapped in both arms - this.wrappedLocals = i64_and(left.wrappedLocals, right.wrappedLocals); - var leftExt = left.wrappedLocalsExt; - var rightExt = right.wrappedLocalsExt; - if (leftExt != null && rightExt != null) { - let thisExt = this.wrappedLocalsExt; - let minLength = min(leftExt.length, rightExt.length); - if (minLength) { - if (!thisExt) thisExt = new Array(minLength); - else while (thisExt.length < minLength) thisExt.push(i64_new(0)); - for (let i = 0; i < minLength; ++i) { - thisExt[i] = i64_and( - leftExt[i], - rightExt[i] - ); + // categorical local flags set in both arms / conditional local flags set in at least one arm + var leftLocalFlags = left.localFlags; + var numLeftLocalFlags = leftLocalFlags.length; + var rightLocalFlags = right.localFlags; + var numRightLocalFlags = rightLocalFlags.length; + var combinedFlags = new Array(max(numLeftLocalFlags, numRightLocalFlags)); + for (let i = 0; i < numLeftLocalFlags; ++i) { + combinedFlags[i] = LocalFlags.join( + unchecked(leftLocalFlags[i]), + i < numRightLocalFlags + ? unchecked(rightLocalFlags[i]) + : 0 + ); + } + for (let i = numLeftLocalFlags; i < numRightLocalFlags; ++i) { + combinedFlags[i] = LocalFlags.join( + 0, + unchecked(rightLocalFlags[i]) + ); + } + this.localFlags = combinedFlags; + } + + /** Checks if an expression of the specified type is known to be non-null, even if the type might be nullable. */ + isNonnull(type: Type, expr: ExpressionRef): bool { + if (!type.is(TypeFlags.NULLABLE)) return true; + // below, only teeLocal/getLocal are relevant because these are the only expressions that + // depend on a dynamic nullable state (flag = LocalFlags.NONNULL), while everything else + // has already been handled by the nullable type check above. + switch (getExpressionId(expr)) { + case ExpressionId.SetLocal: { + if (!isTeeLocal(expr)) break; + let local = this.parentFunction.localsByIndex[getSetLocalIndex(expr)]; + return !local.type.is(TypeFlags.NULLABLE) || this.isLocalFlag(local.index, LocalFlags.NONNULL, false); + } + case ExpressionId.GetLocal: { + let local = this.parentFunction.localsByIndex[getGetLocalIndex(expr)]; + return !local.type.is(TypeFlags.NULLABLE) || this.isLocalFlag(local.index, LocalFlags.NONNULL, false); + } + } + return false; + } + + /** Updates local states to reflect that this branch is only taken when `expr` is true-ish. */ + inheritNonnullIfTrue(expr: ExpressionRef): void { + // A: `expr` is true-ish -> Q: how did that happen? + switch (getExpressionId(expr)) { + case ExpressionId.SetLocal: { + if (!isTeeLocal(expr)) break; + let local = this.parentFunction.localsByIndex[getSetLocalIndex(expr)]; + this.setLocalFlag(local.index, LocalFlags.NONNULL); + break; + } + case ExpressionId.GetLocal: { + let local = this.parentFunction.localsByIndex[getGetLocalIndex(expr)]; + this.setLocalFlag(local.index, LocalFlags.NONNULL); + break; + } + case ExpressionId.If: { + let ifFalse = getIfFalse(expr); + if (!ifFalse) break; + if (getExpressionId(ifFalse) == ExpressionId.Const) { + // Logical AND: (if (condition ifTrue 0)) + // the only way this had become true is if condition and ifTrue are true + if ( + (getExpressionType(ifFalse) == NativeType.I32 && getConstValueI32(ifFalse) == 0) || + (getExpressionType(ifFalse) == NativeType.I64 && getConstValueI64Low(ifFalse) == 0 && getConstValueI64High(ifFalse) == 0) + ) { + this.inheritNonnullIfTrue(getIfCondition(expr)); + this.inheritNonnullIfTrue(getIfTrue(expr)); + } + } + break; + } + case ExpressionId.Unary: { + switch (getUnaryOp(expr)) { + case UnaryOp.EqzI32: + case UnaryOp.EqzI64: { + this.inheritNonnullIfFalse(getUnaryValue(expr)); // !value -> value must have been false + break; + } + } + break; + } + case ExpressionId.Binary: { + switch (getBinaryOp(expr)) { + case BinaryOp.EqI32: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { + this.inheritNonnullIfTrue(right); // TRUE == right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { + this.inheritNonnullIfTrue(left); // left == TRUE -> left must have been true + } + break; + } + case BinaryOp.EqI64: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { + this.inheritNonnullIfTrue(right); // TRUE == right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 && getConstValueI64High(right) != 0)) { + this.inheritNonnullIfTrue(left); // left == TRUE -> left must have been true + } + break; + } + case BinaryOp.NeI32: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { + this.inheritNonnullIfTrue(right); // FALSE != right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { + this.inheritNonnullIfTrue(left); // left != FALSE -> left must have been true + } + break; + } + case BinaryOp.NeI64: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { + this.inheritNonnullIfTrue(right); // FALSE != right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { + this.inheritNonnullIfTrue(left); // left != FALSE -> left must have been true + } + break; + } + } + break; + } + } + } + + /** Updates local states to reflect that this branch is only taken when `expr` is false-ish. */ + inheritNonnullIfFalse(expr: ExpressionRef): void { + // A: `expr` is false-ish -> Q: how did that happen? + switch (getExpressionId(expr)) { + case ExpressionId.Unary: { + switch (getUnaryOp(expr)) { + case UnaryOp.EqzI32: + case UnaryOp.EqzI64: { + this.inheritNonnullIfTrue(getUnaryValue(expr)); // !value -> value must have been true + break; + } + } + break; + } + case ExpressionId.If: { + let ifTrue = getIfTrue(expr); + if (getExpressionId(ifTrue) == ExpressionId.Const) { + let ifFalse = getIfFalse(expr); + if (!ifFalse) break; + // Logical OR: (if (condition 1 ifFalse)) + // the only way this had become false is if condition and ifFalse are false + if ( + (getExpressionType(ifTrue) == NativeType.I32 && getConstValueI32(ifTrue) != 0) || + (getExpressionType(ifTrue) == NativeType.I64 && (getConstValueI64Low(ifTrue) != 0 || getConstValueI64High(ifTrue) != 0)) + ) { + this.inheritNonnullIfFalse(getIfCondition(expr)); + this.inheritNonnullIfFalse(getIfFalse(expr)); + } + } + break; + } + case ExpressionId.Binary: { + switch (getBinaryOp(expr)) { + // remember: we want to know how the _entire_ expression became FALSE (!) + case BinaryOp.EqI32: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) == 0) { + this.inheritNonnullIfTrue(right); // FALSE == right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) == 0) { + this.inheritNonnullIfTrue(left); // left == FALSE -> left must have been true + } + break; + } + case BinaryOp.EqI64: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI64Low(left) == 0 && getConstValueI64High(left) == 0) { + this.inheritNonnullIfTrue(right); // FALSE == right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI64Low(right) == 0 && getConstValueI64High(right) == 0) { + this.inheritNonnullIfTrue(left); // left == FALSE -> left must have been true + } + break; + } + case BinaryOp.NeI32: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && getConstValueI32(left) != 0) { + this.inheritNonnullIfTrue(right); // TRUE != right -> right must have been true + } else if (getExpressionId(right) == ExpressionId.Const && getConstValueI32(right) != 0) { + this.inheritNonnullIfTrue(left); // left != TRUE -> left must have been true + } + break; + } + case BinaryOp.NeI64: { + let left = getBinaryLeft(expr); + let right = getBinaryRight(expr); + if (getExpressionId(left) == ExpressionId.Const && (getConstValueI64Low(left) != 0 || getConstValueI64High(left) != 0)) { + this.inheritNonnullIfTrue(right); // TRUE != right -> right must have been true for this to become false + } else if (getExpressionId(right) == ExpressionId.Const && (getConstValueI64Low(right) != 0 || getConstValueI64High(right) != 0)) { + this.inheritNonnullIfTrue(left); // left != TRUE -> left must have been true for this to become false + } + break; + } + } + break; } } } @@ -525,7 +791,7 @@ export class Flow { // overflows if the local isn't wrapped or the conversion does case ExpressionId.GetLocal: { let local = this.parentFunction.localsByIndex[getGetLocalIndex(expr)]; - return !this.isLocalWrapped(local.index) + return !this.isLocalFlag(local.index, LocalFlags.WRAPPED, true) || canConversionOverflow(local.type, type); } @@ -740,11 +1006,16 @@ export class Flow { // overflows if the call does not return a wrapped value or the conversion does case ExpressionId.Call: { let program = this.parentFunction.program; - let instance = assert(program.instancesByName.get(assert(getCallTarget(expr)))); - assert(instance.kind == ElementKind.FUNCTION); - let returnType = (instance).signature.returnType; - return !(instance).flow.is(FlowFlags.RETURNS_WRAPPED) - || canConversionOverflow(returnType, type); + let instancesByName = program.instancesByName; + let instanceName = assert(getCallTarget(expr)); + if (instancesByName.has(instanceName)) { + let instance = instancesByName.get(instanceName)!; + assert(instance.kind == ElementKind.FUNCTION); + let returnType = (instance).signature.returnType; + return !(instance).flow.is(FlowFlags.RETURNS_WRAPPED) + || canConversionOverflow(returnType, type); + } + return false; // assume no overflow for builtins } // doesn't technically overflow diff --git a/src/index.ts b/src/index.ts index 9de7375109..4aa1559b16 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,39 +3,14 @@ * @module index *//***/ -import { - Compiler, - Options, - Target, - Feature -} from "./compiler"; - -import { - Decompiler -} from "./decompiler"; - -import { - IDLBuilder, - TSDBuilder -} from "./definitions"; - -import { - DiagnosticMessage, - DiagnosticCategory, - formatDiagnosticMessage -} from "./diagnostics"; - -import { - Module -} from "./module"; - -import { - Parser -} from "./parser"; - -import { - Program -} from "./program"; +import { Target, Feature } from "./common"; +import { Compiler, Options } from "./compiler"; +import { Decompiler } from "./decompiler"; +import { IDLBuilder, TSDBuilder } from "./definitions"; +import { DiagnosticMessage, DiagnosticCategory, formatDiagnosticMessage } from "./diagnostics"; +import { Module } from "./module"; +import { Parser } from "./parser"; +import { Program } from "./program"; /** Parses a source file. If `parser` has been omitted a new one is created. */ export function parseFile(text: string, path: string, isEntry: bool = false, diff --git a/src/module.ts b/src/module.ts index 7193516bb3..7fcb992cb6 100644 --- a/src/module.ts +++ b/src/module.ts @@ -3,9 +3,7 @@ * @module module *//***/ -import { - Target -} from "./compiler"; +import { Target } from "./common"; export type ModuleRef = usize; export type FunctionTypeRef = usize; diff --git a/src/program.ts b/src/program.ts index e10467f04b..4a4e90a438 100644 --- a/src/program.ts +++ b/src/program.ts @@ -14,12 +14,12 @@ import { LIBRARY_SUBST, INDEX_SUFFIX, CommonSymbols, - LibrarySymbols + Feature, + Target } from "./common"; import { - Options, - Feature + Options } from "./compiler"; import { @@ -84,7 +84,12 @@ import { } from "./module"; import { - CharCode + CharCode, + writeI8, + writeI16, + writeI32, + writeF32, + writeF64 } from "./util"; import { @@ -95,6 +100,10 @@ import { Flow } from "./flow"; +import { + BuiltinSymbols +} from "./builtins"; + /** Represents a yet unresolved `import`. */ class QueuedImport { constructor( @@ -300,6 +309,13 @@ function operatorKindFromDecorator(decoratorKind: DecoratorKind, arg: string): O return OperatorKind.INVALID; } +/** Garbage collector kind present. */ +export enum CollectorKind { + NONE, + TRACING, + COUNTING +} + /** Represents an AssemblyScript program. */ export class Program extends DiagnosticEmitter { @@ -330,34 +346,64 @@ export class Program extends DiagnosticEmitter { instancesByName: Map = new Map(); /** Classes backing basic types like `i32`. */ typeClasses: Map = new Map(); + /** Managed classes contained in the program, by id. */ + managedClasses: Map = new Map(); // runtime references + /** ArrayBufferView reference. */ + arrayBufferViewInstance: Class | null = null; /** ArrayBuffer instance reference. */ arrayBufferInstance: Class | null = null; /** Array prototype reference. */ arrayPrototype: ClassPrototype | null = null; + /** Set prototype reference. */ + setPrototype: ClassPrototype | null = null; + /** Map prototype reference. */ + mapPrototype: ClassPrototype | null = null; + /** Fixed array prototype reference. */ + fixedArrayPrototype: ClassPrototype | null = null; /** String instance reference. */ stringInstance: Class | null = null; /** Abort function reference, if present. */ abortInstance: Function | null = null; - /** Memory allocation function. */ - memoryAllocateInstance: Function | null = null; - // gc integration - - /** Whether a garbage collector is present or not. */ - hasGC: bool = false; - /** Garbage collector allocation function. */ - gcAllocateInstance: Function | null = null; - /** Garbage collector link function called when a managed object is referenced from a parent. */ - gcLinkInstance: Function | null = null; - /** Garbage collector mark function called to on reachable managed objects. */ - gcMarkInstance: Function | null = null; - /** Size of a managed object header. */ - gcHeaderSize: u32 = 0; - /** Offset of the GC hook. */ - gcHookOffset: u32 = 0; + /** Runtime allocation function. `allocate(payloadSize: usize): usize` */ + allocateInstance: Function | null = null; + /** Memory allocation function. `memory.allocate(size)` */ + memoryAllocateInstance: Function | null = null; + /** Runtime reallocation function. `reallocate(ref: usize, newPayloadSize: usize): usize` */ + reallocateInstance: Function | null = null; + /** Runtime discard function. `discard(ref: usize): void` */ + discardInstance: Function | null = null; + /** Runtime register function. `register(ref: usize, cid: u32): usize` */ + registerInstance: Function | null = null; + /** Runtime make array function. `newArray(length: i32, alignLog2: usize, id: u32, source: usize = 0): usize` */ + makeArrayInstance: Function | null = null; + /** Runtime instanceof function. */ + instanceofInstance: Function | null = null; + /** Runtime flags function. */ + flagsInstance: Function | null = null; + + /** The kind of garbage collector being present. */ + collectorKind: CollectorKind = CollectorKind.NONE; + /** Memory allocation implementation, if present: `__mem_allocate(size: usize): usize` */ + allocateMem: Function | null = null; + /** Memory free implementation, if present: `__mem_free(ref: usize): void` */ + freeMem: Function | null = null; + /** Reference link implementation, if present: `__ref_link(ref: usize, parentRef: usize): void` */ + linkRef: Function | null = null; + /** Reference unlink implementation, if present: `__ref_unlink(ref: usize, parentRef: usize): void` */ + unlinkRef: Function | null = null; + /** Reference retain implementation, if present: `__ref_retain(ref: usize): void` */ + retainRef: Function | null = null; + /** Reference release implementation, if present: `__ref_release(ref: usize): void` */ + releaseRef: Function | null = null; + /** Reference mark implementation, if present: `__ref_mark(ref: usize): void` */ + markRef: Function | null = null; + + /** Next class id. */ + nextClassId: u32 = 1; /** Constructs a new program, optionally inheriting parser diagnostics. */ constructor( @@ -373,6 +419,17 @@ export class Program extends DiagnosticEmitter { this.resolver = new Resolver(this); } + /** Gets the size of a runtime header. */ + get runtimeHeaderSize(): i32 { + return 16; + } + + /** Writes a common runtime header to the specified buffer. */ + writeRuntimeHeader(buffer: Uint8Array, offset: i32, classId: i32, payloadSize: u32): void { + writeI32(classId, buffer, offset); + writeI32(payloadSize, buffer, offset + 4); + } + /** Creates a native variable declaration. */ makeNativeVariableDeclaration( /** The simple name of the variable */ @@ -505,25 +562,25 @@ export class Program extends DiagnosticEmitter { if (options.hasFeature(Feature.SIMD)) this.registerNativeType(CommonSymbols.v128, Type.v128); // register compiler hints - this.registerConstantInteger(LibrarySymbols.ASC_TARGET, Type.i32, - i64_new(options.isWasm64 ? 2 : 1)); - this.registerConstantInteger(LibrarySymbols.ASC_NO_ASSERT, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_TARGET, Type.i32, + i64_new(options.isWasm64 ? Target.WASM64 : Target.WASM32)); + this.registerConstantInteger(CommonSymbols.ASC_NO_ASSERT, Type.bool, i64_new(options.noAssert ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_MEMORY_BASE, Type.i32, + this.registerConstantInteger(CommonSymbols.ASC_MEMORY_BASE, Type.i32, i64_new(options.memoryBase, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_OPTIMIZE_LEVEL, Type.i32, + this.registerConstantInteger(CommonSymbols.ASC_OPTIMIZE_LEVEL, Type.i32, i64_new(options.optimizeLevelHint, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_SHRINK_LEVEL, Type.i32, + this.registerConstantInteger(CommonSymbols.ASC_SHRINK_LEVEL, Type.i32, i64_new(options.shrinkLevelHint, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_MUTABLE_GLOBAL, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_MUTABLE_GLOBAL, Type.bool, i64_new(options.hasFeature(Feature.MUTABLE_GLOBAL) ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_SIGN_EXTENSION, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_SIGN_EXTENSION, Type.bool, i64_new(options.hasFeature(Feature.SIGN_EXTENSION) ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_BULK_MEMORY, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_BULK_MEMORY, Type.bool, i64_new(options.hasFeature(Feature.BULK_MEMORY) ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_SIMD, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_SIMD, Type.bool, i64_new(options.hasFeature(Feature.SIMD) ? 1 : 0, 0)); - this.registerConstantInteger(LibrarySymbols.ASC_FEATURE_THREADS, Type.bool, + this.registerConstantInteger(CommonSymbols.ASC_FEATURE_THREADS, Type.bool, i64_new(options.hasFeature(Feature.THREADS) ? 1 : 0, 0)); // remember deferred elements @@ -616,11 +673,10 @@ export class Program extends DiagnosticEmitter { true // isImport ); } else { + // FIXME: file not found is not reported if this happens? this.error( DiagnosticCode.Module_0_has_no_exported_member_1, - foreignIdentifier.range, - queuedImport.foreignPath, - foreignIdentifier.text + foreignIdentifier.range, queuedImport.foreignPath, foreignIdentifier.text ); } } else { // i.e. import * as bar from "./bar" @@ -684,20 +740,20 @@ export class Program extends DiagnosticEmitter { } // register classes backing basic types - this.registerNativeTypeClass(TypeKind.I8, LibrarySymbols.I8); - this.registerNativeTypeClass(TypeKind.I16, LibrarySymbols.I16); - this.registerNativeTypeClass(TypeKind.I32, LibrarySymbols.I32); - this.registerNativeTypeClass(TypeKind.I64, LibrarySymbols.I64); - this.registerNativeTypeClass(TypeKind.ISIZE, LibrarySymbols.Isize); - this.registerNativeTypeClass(TypeKind.U8, LibrarySymbols.U8); - this.registerNativeTypeClass(TypeKind.U16, LibrarySymbols.U16); - this.registerNativeTypeClass(TypeKind.U32, LibrarySymbols.U32); - this.registerNativeTypeClass(TypeKind.U64, LibrarySymbols.U64); - this.registerNativeTypeClass(TypeKind.USIZE, LibrarySymbols.Usize); - this.registerNativeTypeClass(TypeKind.BOOL, LibrarySymbols.Bool); - this.registerNativeTypeClass(TypeKind.F32, LibrarySymbols.F32); - this.registerNativeTypeClass(TypeKind.F64, LibrarySymbols.F64); - if (options.hasFeature(Feature.SIMD)) this.registerNativeTypeClass(TypeKind.V128, LibrarySymbols.V128); + this.registerNativeTypeClass(TypeKind.I8, CommonSymbols.I8); + this.registerNativeTypeClass(TypeKind.I16, CommonSymbols.I16); + this.registerNativeTypeClass(TypeKind.I32, CommonSymbols.I32); + this.registerNativeTypeClass(TypeKind.I64, CommonSymbols.I64); + this.registerNativeTypeClass(TypeKind.ISIZE, CommonSymbols.Isize); + this.registerNativeTypeClass(TypeKind.U8, CommonSymbols.U8); + this.registerNativeTypeClass(TypeKind.U16, CommonSymbols.U16); + this.registerNativeTypeClass(TypeKind.U32, CommonSymbols.U32); + this.registerNativeTypeClass(TypeKind.U64, CommonSymbols.U64); + this.registerNativeTypeClass(TypeKind.USIZE, CommonSymbols.Usize); + this.registerNativeTypeClass(TypeKind.BOOL, CommonSymbols.Bool); + this.registerNativeTypeClass(TypeKind.F32, CommonSymbols.F32); + this.registerNativeTypeClass(TypeKind.F64, CommonSymbols.F64); + if (options.hasFeature(Feature.SIMD)) this.registerNativeTypeClass(TypeKind.V128, CommonSymbols.V128); // resolve base prototypes of derived classes var resolver = this.resolver; @@ -749,78 +805,103 @@ export class Program extends DiagnosticEmitter { } } - // register global library elements + // register library elements { let element: Element | null; - if (element = this.lookupGlobal(LibrarySymbols.String)) { + if (element = this.lookupGlobal(CommonSymbols.ArrayBufferView)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); - this.stringInstance = resolver.resolveClass(element, null); + this.arrayBufferViewInstance = resolver.resolveClass(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.ArrayBuffer)) { + if (element = this.lookupGlobal(CommonSymbols.ArrayBuffer)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayBufferInstance = resolver.resolveClass(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.Array)) { + if (element = this.lookupGlobal(CommonSymbols.String)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.stringInstance = resolver.resolveClass(element, null); + } + if (element = this.lookupGlobal(CommonSymbols.Array)) { assert(element.kind == ElementKind.CLASS_PROTOTYPE); this.arrayPrototype = element; } - if (element = this.lookupGlobal(LibrarySymbols.abort)) { + if (element = this.lookupGlobal(CommonSymbols.FixedArray)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.fixedArrayPrototype = element; + } + if (element = this.lookupGlobal(CommonSymbols.Set)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.setPrototype = element; + } + if (element = this.lookupGlobal(CommonSymbols.Map)) { + assert(element.kind == ElementKind.CLASS_PROTOTYPE); + this.mapPrototype = element; + } + if (element = this.lookupGlobal(CommonSymbols.abort)) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); this.abortInstance = this.resolver.resolveFunction(element, null); } - if (element = this.lookupGlobal(LibrarySymbols.memory)) { - if (element = element.lookupInSelf(LibrarySymbols.allocate)) { + if (element = this.lookupGlobal(BuiltinSymbols.runtime_allocate)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.allocateInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.memory_allocate)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.memoryAllocateInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.runtime_reallocate)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.reallocateInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.runtime_discard)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.discardInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.runtime_register)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.registerInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.runtime_makeArray)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.makeArrayInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.runtime_instanceof)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.instanceofInstance = this.resolver.resolveFunction(element, null); + } + if (element = this.lookupGlobal(BuiltinSymbols.runtime_flags)) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.flagsInstance = this.resolver.resolveFunction(element, null); + } + // memory allocator interface + if (element = this.lookupGlobal("__mem_allocate")) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.allocateMem = this.resolver.resolveFunction(element, null); + element = assert(this.lookupGlobal("__mem_free")); + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.freeMem = this.resolver.resolveFunction(element, null); + } + // garbage collector interface + if (this.lookupGlobal("__ref_collect")) { + if (element = this.lookupGlobal("__ref_link")) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.linkRef = this.resolver.resolveFunction(element, null); + if (element = this.lookupGlobal("__ref_unlink")) { + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.unlinkRef = this.resolver.resolveFunction(element, null); + } + element = assert(this.lookupGlobal("__ref_mark")); + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.markRef = this.resolver.resolveFunction(element, null); + this.collectorKind = CollectorKind.TRACING; + } else if (element = this.lookupGlobal("__ref_retain")) { assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - this.memoryAllocateInstance = this.resolver.resolveFunction(element, null); - } - } - } - - // register GC hooks if present - // FIXME: think about a better way than globals to model this, maybe a GC namespace that can be - // dynamically extended by a concrete implementation but then has `@unsafe` methods that normal - // code cannot call without explicitly enabling it with a flag. - if ( - this.elementsByName.has("__gc_allocate") && - this.elementsByName.has("__gc_link") && - this.elementsByName.has("__gc_mark") - ) { - // __gc_allocate(usize, (ref: usize) => void): usize - let element = this.elementsByName.get("__gc_allocate"); - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - let gcAllocateInstance = assert(this.resolver.resolveFunction(element, null)); - let signature = gcAllocateInstance.signature; - assert(signature.parameterTypes.length == 2); - assert(signature.parameterTypes[0] == this.options.usizeType); - assert(signature.parameterTypes[1].signatureReference); - assert(signature.returnType == this.options.usizeType); - - // __gc_link(usize, usize): void - element = this.elementsByName.get("__gc_link"); - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - let gcLinkInstance = assert(this.resolver.resolveFunction(element, null)); - signature = gcLinkInstance.signature; - assert(signature.parameterTypes.length == 2); - assert(signature.parameterTypes[0] == this.options.usizeType); - assert(signature.parameterTypes[1] == this.options.usizeType); - assert(signature.returnType == Type.void); - - // __gc_mark(usize): void - element = this.elementsByName.get("__gc_mark"); - assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); - let gcMarkInstance = assert(this.resolver.resolveFunction(element, null)); - signature = gcMarkInstance.signature; - assert(signature.parameterTypes.length == 1); - assert(signature.parameterTypes[0] == this.options.usizeType); - assert(signature.returnType == Type.void); - - this.gcAllocateInstance = gcAllocateInstance; - this.gcLinkInstance = gcLinkInstance; - this.gcMarkInstance = gcMarkInstance; - let gcHookOffset = 2 * options.usizeType.byteSize; // .next + .prev - this.gcHookOffset = gcHookOffset; - this.gcHeaderSize = (gcHookOffset + 4 + 7) & ~7; // + .hook index + alignment - this.hasGC = true; + this.retainRef = this.resolver.resolveFunction(element, null); + element = assert(this.lookupGlobal("__ref_release")); + assert(element.kind == ElementKind.FUNCTION_PROTOTYPE); + this.releaseRef = this.resolver.resolveFunction(element, null); + this.collectorKind = CollectorKind.COUNTING; + } + } } // mark module exports, i.e. to apply proper wrapping behavior on the boundaries @@ -908,10 +989,10 @@ export class Program extends DiagnosticEmitter { } /** Ensures that the given global element exists. Attempts to merge duplicates. */ - ensureGlobal(name: string, element: DeclaredElement): void { + ensureGlobal(name: string, element: DeclaredElement): DeclaredElement { var elementsByName = this.elementsByName; if (elementsByName.has(name)) { - let actual = elementsByName.get(name); + let actual = elementsByName.get(name)!; // NOTE: this is effectively only performed when merging native types with // their respective namespaces in std/builtins, but can also trigger when a // user has multiple global elements of the same name in different files, @@ -924,12 +1005,13 @@ export class Program extends DiagnosticEmitter { DiagnosticCode.Duplicate_identifier_0, element.identifierNode.range, name ); - return; + return element; } element = merged; } } elementsByName.set(name, element); + return element; } /** Looks up the element of the specified name in the global scope. */ @@ -939,6 +1021,13 @@ export class Program extends DiagnosticEmitter { return null; } + /** Looks up the element of the specified name in the global scope. Errors if not present. */ + requireGlobal(name: string): Element { + var elements = this.elementsByName; + if (elements.has(name)) return elements.get(name)!; + throw new Error("missing global"); + } + /** Tries to locate a foreign file given its normalized path. */ private lookupForeignFile( /** Normalized path to the other file. */ @@ -1130,7 +1219,7 @@ export class Program extends DiagnosticEmitter { (declaration.is(CommonFlags.READONLY) ? DecoratorFlags.INLINE : DecoratorFlags.NONE - ) | DecoratorFlags.LAZY + ) | DecoratorFlags.LAZY | DecoratorFlags.UNSAFE ), declaration ); @@ -1141,7 +1230,7 @@ export class Program extends DiagnosticEmitter { name, parent, declaration, - this.checkDecorators(decorators, DecoratorFlags.NONE) + this.checkDecorators(decorators, DecoratorFlags.UNSAFE) ); if (!parent.addInstance(name, element)) return; } @@ -1156,7 +1245,7 @@ export class Program extends DiagnosticEmitter { ): void { var name = declaration.name.text; var isStatic = declaration.is(CommonFlags.STATIC); - var acceptedFlags = DecoratorFlags.INLINE; + var acceptedFlags = DecoratorFlags.INLINE | DecoratorFlags.UNSAFE; if (!declaration.is(CommonFlags.GENERIC)) { acceptedFlags |= DecoratorFlags.OPERATOR_BINARY | DecoratorFlags.OPERATOR_PREFIX @@ -1309,7 +1398,7 @@ export class Program extends DiagnosticEmitter { property, declaration, this.checkDecorators(declaration.decorators, - DecoratorFlags.INLINE + DecoratorFlags.INLINE | DecoratorFlags.UNSAFE ) ); if (isGetter) { @@ -1529,7 +1618,7 @@ export class Program extends DiagnosticEmitter { parent: Element ): void { var name = declaration.name.text; - var validDecorators = DecoratorFlags.NONE; + var validDecorators = DecoratorFlags.UNSAFE; if (declaration.is(CommonFlags.AMBIENT)) { validDecorators |= DecoratorFlags.EXTERNAL; } else { @@ -1612,44 +1701,50 @@ export class Program extends DiagnosticEmitter { queuedImplements: ClassPrototype[] ): void { var name = declaration.name.text; - var element = new Namespace(name, parent, declaration); - if (!parent.add(name, element)) return; - element = assert(parent.lookupInSelf(name)); // possibly merged + var original = new Namespace( + name, + parent, + declaration, + this.checkDecorators(declaration.decorators, DecoratorFlags.GLOBAL) + ); + if (!parent.add(name, original)) return; + var element = assert(parent.lookupInSelf(name)); // possibly merged var members = declaration.members; for (let i = 0, k = members.length; i < k; ++i) { let member = members[i]; switch (member.kind) { case NodeKind.CLASSDECLARATION: { - this.initializeClass(member, element, queuedExtends, queuedImplements); + this.initializeClass(member, original, queuedExtends, queuedImplements); break; } case NodeKind.ENUMDECLARATION: { - this.initializeEnum(member, element); + this.initializeEnum(member, original); break; } case NodeKind.FUNCTIONDECLARATION: { - this.initializeFunction(member, element); + this.initializeFunction(member, original); break; } case NodeKind.INTERFACEDECLARATION: { - this.initializeInterface(member, element); + this.initializeInterface(member, original); break; } case NodeKind.NAMESPACEDECLARATION: { - this.initializeNamespace(member, element, queuedExtends, queuedImplements); + this.initializeNamespace(member, original, queuedExtends, queuedImplements); break; } case NodeKind.TYPEDECLARATION: { - this.initializeTypeDefinition(member, element); + this.initializeTypeDefinition(member, original); break; } case NodeKind.VARIABLE: { - this.initializeVariables(member, element); + this.initializeVariables(member, original); break; } default: assert(false); // namespace member expected } } + if (original != element) copyMembers(original, element); // retain original parent } /** Initializes a `type` definition. */ @@ -1696,6 +1791,33 @@ export class Program extends DiagnosticEmitter { if (!parent.add(name, element)) continue; // reports } } + + /** Determines the element type of a built-in array. */ + // determineBuiltinArrayType(target: Class): Type | null { + // switch (target.internalName) { + // case BuiltinSymbols.Int8Array: return Type.i8; + // case BuiltinSymbols.Uint8ClampedArray: + // case BuiltinSymbols.Uint8Array: return Type.u8; + // case BuiltinSymbols.Int16Array: return Type.i16; + // case BuiltinSymbols.Uint16Array: return Type.u16; + // case BuiltinSymbols.Int32Array: return Type.i32; + // case BuiltinSymbols.Uint32Array: return Type.u32; + // case BuiltinSymbols.Int64Array: return Type.i64; + // case BuiltinSymbols.Uint64Array: return Type.u64; + // case BuiltinSymbols.Float32Array: return Type.f32; + // case BuiltinSymbols.Float64Array: return Type.f64; + // } + // var current: Class | null = target; + // var arrayPrototype = this.arrayPrototype; + // do { + // if (current.prototype == arrayPrototype) { // Array + // let typeArguments = assert(current.typeArguments); + // assert(typeArguments.length == 1); + // return typeArguments[0]; + // } + // } while (current = current.base); + // return null; + // } } /** Indicates the specific kind of an {@link Element}. */ @@ -1763,7 +1885,9 @@ export enum DecoratorFlags { /** Is compiled lazily. */ LAZY = 1 << 9, /** Is the explicit start function. */ - START = 1 << 10 + START = 1 << 10, + /** Is considered unsafe code. */ + UNSAFE = 1 << 11 } /** Translates a decorator kind to the respective decorator flag. */ @@ -1781,6 +1905,7 @@ export function decoratorKindToFlag(kind: DecoratorKind): DecoratorFlags { case DecoratorKind.BUILTIN: return DecoratorFlags.BUILTIN; case DecoratorKind.LAZY: return DecoratorFlags.LAZY; case DecoratorKind.START: return DecoratorFlags.START; + case DecoratorKind.UNSAFE: return DecoratorFlags.UNSAFE; default: return DecoratorFlags.NONE; } } @@ -1984,15 +2109,17 @@ export class File extends Element { /* @override */ add(name: string, element: DeclaredElement, isImport: bool = false): bool { + if (element.hasDecorator(DecoratorFlags.GLOBAL)) { + element = this.program.ensureGlobal(name, element); // possibly merged globally + } if (!super.add(name, element)) return false; - element = assert(this.lookupInSelf(name)); // possibly merged + element = assert(this.lookupInSelf(name)); // possibly merged locally if (element.is(CommonFlags.EXPORT) && !isImport) { this.ensureExport( element.name, element ); } - if (element.hasDecorator(DecoratorFlags.GLOBAL)) this.program.ensureGlobal(name, element); return true; } @@ -2114,7 +2241,9 @@ export class Namespace extends DeclaredElement { /** Parent element, usually a file or another namespace. */ parent: Element, /** Declaration reference. */ - declaration: NamespaceDeclaration + declaration: NamespaceDeclaration, + /** Pre-checked flags indicating built-in decorators. */ + decoratorFlags: DecoratorFlags = DecoratorFlags.NONE ) { super( ElementKind.NAMESPACE, @@ -2124,6 +2253,7 @@ export class Namespace extends DeclaredElement { parent, declaration ); + this.decoratorFlags = decoratorFlags; } /* @override */ @@ -2358,7 +2488,7 @@ export class FunctionPrototype extends DeclaredElement { /** Constructs a new function prototype. */ constructor( - /** Simple na,e */ + /** Simple name */ name: string, /** Parent element, usually a file, namespace or class (if a method). */ parent: Element, @@ -2831,12 +2961,18 @@ export class ClassPrototype extends DeclaredElement { return (this.declaration).implementsTypes; } + /** Tests if this prototype is of a builtin array type (Array/TypedArray). */ + get isBuiltinArray(): bool { + var arrayBufferViewInstance = this.program.arrayBufferViewInstance; + return arrayBufferViewInstance !== null + && this.extends(arrayBufferViewInstance.prototype); + } + /** Tests if this prototype extends the specified. */ extends(basePtototype: ClassPrototype | null): bool { var current: ClassPrototype | null = this; - do { - if (current === basePtototype) return true; - } while (current = current.basePrototype); + do if (current === basePtototype) return true; + while (current = current.basePrototype); return false; } @@ -2885,6 +3021,12 @@ export class ClassPrototype extends DeclaredElement { } } +const enum AcyclicState { + UNKNOWN, + ACYCLIC, + NOT_ACYCLIC +} + /** A resolved class. */ export class Class extends TypedElement { @@ -2902,8 +3044,38 @@ export class Class extends TypedElement { constructorInstance: Function | null = null; /** Operator overloads. */ overloads: Map | null = null; - /** Function index of the GC hook. */ - gcHookIndex: u32 = -1; + /** Unique class id. */ + private _id: u32 = 0; + /** Remembers acyclic state. */ + private _acyclic: AcyclicState = AcyclicState.UNKNOWN; + + /** Gets the unique runtime id of this class. Must be a managed class. */ + get id(): u32 { + var id = this._id; + assert(id); // must be managed to have an id + return id; + } + + /** Tests if this class is of a builtin array type (Array/TypedArray). */ + get isBuiltinArray(): bool { + return this.prototype.isBuiltinArray; + } + + /** Tests if this class is array-like. */ + get isArrayLike(): bool { + if (this.isBuiltinArray) return true; + var lengthField = this.lookupInSelf("length"); + return lengthField !== null && ( + lengthField.kind == ElementKind.FIELD || + ( + lengthField.kind == ElementKind.PROPERTY && + (lengthField).getterInstance !== null // TODO: resolve & check type? + ) + ) && ( + this.lookupOverload(OperatorKind.INDEXED_GET) !== null || + this.lookupOverload(OperatorKind.UNCHECKED_INDEXED_GET) !== null + ); + } /** Constructs a new class. */ constructor( @@ -2925,13 +3097,20 @@ export class Class extends TypedElement { prototype.parent, prototype.declaration ); + var program = this.program; this.prototype = prototype; this.flags = prototype.flags; this.decoratorFlags = prototype.decoratorFlags; this.typeArguments = typeArguments; - this.setType(this.program.options.usizeType.asClass(this)); + this.setType(program.options.usizeType.asClass(this)); this.base = base; + if (!this.hasDecorator(DecoratorFlags.UNMANAGED)) { + let id = program.nextClassId++; + this._id = id; + program.managedClasses.set(id, this); + } + // inherit static members and contextual type arguments from base class if (base) { let inheritedTypeArguments = base.contextualTypeArguments; @@ -2960,7 +3139,7 @@ export class Class extends TypedElement { } else if (typeParameters && typeParameters.length) { throw new Error("type argument count mismatch"); } - registerConcreteElement(this.program, this); + registerConcreteElement(program, this); } /** Tests if a value of this class type is assignable to a target of the specified class type. */ @@ -3012,6 +3191,151 @@ export class Class extends TypedElement { assert(field.kind == ElementKind.FIELD); return (field).memoryOffset; } + + /** Writes a field value to a buffer and returns the number of bytes written. */ + writeField(name: string, value: T, buffer: Uint8Array, baseOffset: i32): i32 { + var field = this.lookupInSelf(name); + if (field && field.kind == ElementKind.FIELD) { + let offset = baseOffset + (field).memoryOffset; + switch ((field).type.kind) { + case TypeKind.I8: + case TypeKind.U8: { + writeI8(i32(value), buffer, offset); + return 1; + } + case TypeKind.I16: + case TypeKind.U16: { + writeI16(i32(value), buffer, offset); + return 2; + } + case TypeKind.I32: + case TypeKind.U32: { + writeI32(i32(value), buffer, offset); + return 4; + } + case TypeKind.ISIZE: + case TypeKind.USIZE: { + assert(!this.program.options.isWasm64); // TODO + writeI32(i32(value), buffer, offset); + return 4; + } + case TypeKind.F32: { + writeF32(f32(value), buffer, offset); + return 4; + } + case TypeKind.F64: { + writeF64(f64(value), buffer, offset); + return 8; + } + } + } + assert(false); + return 0; + } + + /** Tests if this class extends the specified prototype. */ + extends(prototype: ClassPrototype): bool { + return this.prototype.extends(prototype); + } + + /** Gets the concrete type arguments to the specified extendend prototype. */ + getTypeArgumentsTo(extendedPrototype: ClassPrototype): Type[] | null { + var current: Class | null = this; + do if (current.prototype === extendedPrototype) return current.typeArguments; + while (current = current.base); + return null; + } + + /** Tests if this class is inherently acyclic. */ + get isAcyclic(): bool { + var acyclic = this._acyclic; + if (acyclic == AcyclicState.UNKNOWN) { + let hasCycle = this.cyclesTo(this); + if (hasCycle) this._acyclic = acyclic = AcyclicState.NOT_ACYCLIC; + else this._acyclic = acyclic = AcyclicState.ACYCLIC; + } + return acyclic == AcyclicState.ACYCLIC; + } + + /** Tests if this class potentially forms a reference cycle to another one. */ + private cyclesTo(other: Class, except: Set = new Set()): bool { + // TODO: The pure RC paper describes acyclic data structures as classes that may contain + // + // - scalars + // - references to classes that are both acyclic and final (here: Java); and + // - arrays (in our case: also sets, maps) of either of the above + // + // Our implementation, however, treats all objects that do not reference themselves directly + // or indirectly as acylic, allowing them to contain inner cycles of other non-acyclic objects. + // This contradicts the second assumption and must be revisited when actually implementing RC. + + if (except.has(this)) return false; + except.add(this); // don't recurse indefinitely + + // Find out if any field references 'other' directly or indirectly + var current: Class | null; + var members = this.members; + if (members) { + for (let member of members.values()) { + if ( + member.kind == ElementKind.FIELD && + (current = (member).type.classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + } + } + + // Do the same for non-field data + var basePrototype: ClassPrototype | null; + + // Arrayother?> + if ((basePrototype = this.program.arrayPrototype) && this.prototype.extends(basePrototype)) { + let typeArguments = assert(this.getTypeArgumentsTo(basePrototype)); + assert(typeArguments.length == 1); + if ( + (current = typeArguments[0].classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + + // Setother?> + } else if ((basePrototype = this.program.setPrototype) && this.prototype.extends(basePrototype)) { + let typeArguments = assert(this.getTypeArgumentsTo(basePrototype)); + assert(typeArguments.length == 1); + if ( + (current = typeArguments[0].classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + + // Mapother?,V->other?> + } else if ((basePrototype = this.program.mapPrototype) && this.prototype.extends(basePrototype)) { + let typeArguments = assert(this.getTypeArgumentsTo(basePrototype)); + assert(typeArguments.length == 2); + if ( + (current = typeArguments[0].classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + if ( + (current = typeArguments[1].classReference) !== null && + ( + current === other || + current.cyclesTo(other, except) + ) + ) return true; + } + return false; + } } /** A yet unresolved interface. */ @@ -3147,7 +3471,9 @@ function tryMerge(older: Element, newer: Element): DeclaredElement | null { } } if (merged) { - if (older.is(CommonFlags.EXPORT) != newer.is(CommonFlags.EXPORT)) { + let olderIsExport = older.is(CommonFlags.EXPORT) || older.hasDecorator(DecoratorFlags.GLOBAL); + let newerIsExport = newer.is(CommonFlags.EXPORT) || newer.hasDecorator(DecoratorFlags.GLOBAL); + if (olderIsExport != newerIsExport) { older.program.error( DiagnosticCode.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, merged.identifierNode.range, merged.identifierNode.text diff --git a/src/resolver.ts b/src/resolver.ts index 43f8ba37b1..d1b9aee16c 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -82,6 +82,10 @@ import { Token } from "./tokenizer"; +import { + BuiltinSymbols +} from "./builtins"; + /** Indicates whether errors are reported or not. */ export enum ReportMode { /** Report errors. */ @@ -368,12 +372,26 @@ export class Resolver extends DiagnosticEmitter { ); // recoverable } - return this.resolveType( + let type = this.resolveType( (element).typeNode, element, contextualTypeArguments, reportMode ); + if (!type) return null; + if (node.isNullable) { + if (!type.is(TypeFlags.REFERENCE)) { + if (reportMode == ReportMode.REPORT) { + this.error( + DiagnosticCode.Basic_type_0_cannot_be_nullable, + typeNode.name.range, typeName.identifier.text + ); + } + } else { + return type.asNullable(); + } + } + return type; } if (reportMode == ReportMode.REPORT) { this.error( @@ -610,25 +628,40 @@ export class Resolver extends DiagnosticEmitter { case ElementKind.CLASS: { // property access on element access? let elementExpression = this.currentElementExpression; if (elementExpression) { - let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); - if (!indexedGet) { - this.error( - DiagnosticCode.Index_signature_is_missing_in_type_0, - elementExpression.range, (target).internalName - ); - return null; - } - let returnType = indexedGet.signature.returnType; - if (!(target = returnType.classReference)) { + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (!arrayType) { + let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); + if (!indexedGet) { + this.error( + DiagnosticCode.Index_signature_is_missing_in_type_0, + elementExpression.range, (target).internalName + ); + return null; + } + let arrayType = indexedGet.signature.returnType; + // } + if (!(target = arrayType.classReference)) { this.error( DiagnosticCode.Property_0_does_not_exist_on_type_1, - propertyAccess.property.range, propertyName, returnType.toString() + propertyAccess.property.range, propertyName, arrayType.toString() ); return null; } } break; } + case ElementKind.FUNCTION_PROTOTYPE: { // function Symbol() + type Symbol = _Symbol + let shadowType = target.shadowType; + if (shadowType) { + if (!shadowType.is(CommonFlags.RESOLVED)) { + let resolvedType = this.resolveType(shadowType.typeNode, shadowType.parent, null, reportMode); + if (resolvedType) shadowType.setType(resolvedType); + } + let classReference = shadowType.type.classReference; + if (classReference) target = classReference.prototype; + break; + } + } } // Look up the member within @@ -672,6 +705,7 @@ export class Resolver extends DiagnosticEmitter { break; } } + this.error( DiagnosticCode.Property_0_does_not_exist_on_type_1, propertyAccess.property.range, propertyName, target.internalName @@ -706,19 +740,22 @@ export class Resolver extends DiagnosticEmitter { break; } case ElementKind.CLASS: { - let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); - if (!indexedGet) { - if (reportMode == ReportMode.REPORT) { - this.error( - DiagnosticCode.Index_signature_is_missing_in_type_0, - elementAccess.range, (target).internalName - ); + // let arrayType = this.program.determineBuiltinArrayType(target); + // if (!arrayType) { + let indexedGet = (target).lookupOverload(OperatorKind.INDEXED_GET); + if (!indexedGet) { + if (reportMode == ReportMode.REPORT) { + this.error( + DiagnosticCode.Index_signature_is_missing_in_type_0, + elementAccess.range, (target).internalName + ); + } + return null; } - return null; - } + let arrayType = indexedGet.signature.returnType; + // } if (targetExpression.kind == NodeKind.ELEMENTACCESS) { // nested element access - let returnType = indexedGet.signature.returnType; - if (target = returnType.classReference) { + if (target = arrayType.classReference) { this.currentThisExpression = targetExpression; this.currentElementExpression = elementAccess.elementExpression; return target; @@ -1189,6 +1226,14 @@ export class Resolver extends DiagnosticEmitter { ); if (!target) return null; if (target.kind == ElementKind.FUNCTION_PROTOTYPE) { + // `unchecked(expr: *): *` is special + if ( + (target).internalName == BuiltinSymbols.unchecked && + expression.arguments.length > 0 + ) { + return this.resolveExpression(expression.arguments[0], flow, contextualType, reportMode); + } + // otherwise resolve normally let instance = this.resolveFunctionInclTypeArguments( target, expression.typeArguments, diff --git a/src/tokenizer.ts b/src/tokenizer.ts index 75088508ca..8076d5adc0 100644 --- a/src/tokenizer.ts +++ b/src/tokenizer.ts @@ -350,6 +350,7 @@ export function tokenIsAlsoIdentifier(token: Token): bool { case Token.FROM: case Token.FOR: case Token.GET: + case Token.INSTANCEOF: case Token.IS: case Token.KEYOF: case Token.MODULE: diff --git a/src/types.ts b/src/types.ts index d060f5538e..2276f22aa0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7,7 +7,8 @@ import { Class, FunctionTarget, Program, - DecoratorFlags + DecoratorFlags, + CollectorKind } from "./program"; import { @@ -145,15 +146,26 @@ export class Type { } } + /** Gets this type's logarithmic alignment in memory. */ + get alignLog2(): i32 { + return 31 - clz(this.byteSize); + } + /** Tests if this is a managed type that needs GC hooks. */ isManaged(program: Program): bool { - if (program.hasGC) { + if (program.collectorKind != CollectorKind.NONE) { let classReference = this.classReference; return classReference !== null && !classReference.hasDecorator(DecoratorFlags.UNMANAGED); } return false; } + /** Tests if this is a class type explicitly annotated as unmanaged. */ + get isUnmanaged(): bool { + var classReference = this.classReference; + return classReference !== null && classReference.hasDecorator(DecoratorFlags.UNMANAGED); + } + /** Computes the sign-extending shift in the target type. */ computeSmallIntegerShift(targetType: Type): u32 { return targetType.size - this.size; diff --git a/std/assembly/allocator/README.md b/std/assembly/allocator/README.md new file mode 100644 index 0000000000..d020decec5 --- /dev/null +++ b/std/assembly/allocator/README.md @@ -0,0 +1,21 @@ +Memory manager interface +======================== + +A memory manager for AssemblyScript must implement the following common and may implement any number of optional interfaces: + +Common +------ + +* **__mem_allocate**(size: `usize`): `usize`
+ Dynamically allocates a chunk of memory of at least the specified size and returns its address. + Alignment must be guaranteed to be at least 8 bytes, but there are considerations to increase + alignment to 16 bytes to fit SIMD v128 values. + +* **__mem_free**(ref: `usize`): `void`
+ Frees a dynamically allocated chunk of memory by its address. + +Optional +-------- + +* **__mem_reset**(ref: `usize`, parentRef: `usize`): `void`
+ Resets dynamic memory to its initial state. Used by the arena allocator. diff --git a/std/assembly/allocator/arena.ts b/std/assembly/allocator/arena.ts index 5d74b56c93..759eba2e1d 100644 --- a/std/assembly/allocator/arena.ts +++ b/std/assembly/allocator/arena.ts @@ -1,20 +1,17 @@ -/** - * Arena Memory Allocator - * - * Provides a `memory.reset` function to reset the heap to its initial state. A user has to make - * sure that there are no more references to cleared memory afterwards. Always aligns to 8 bytes. - * - * @module std/assembly/allocator/arena - *//***/ - -import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; +import { HEAP_BASE, memory } from "../memory"; +import { AL_MASK, MAX_SIZE_32 } from "../util/allocator"; +// @ts-ignore: decorator +@lazy var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; -var offset: usize = startOffset; -// Memory allocator interface +// @ts-ignore: decorator +@lazy +var offset: usize = startOffset; -@global export function __memory_allocate(size: usize): usize { +// @ts-ignore: decorator +@unsafe @global +function __mem_allocate(size: usize): usize { if (size > MAX_SIZE_32) unreachable(); var ptr = offset; var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; @@ -32,8 +29,13 @@ var offset: usize = startOffset; return ptr; } -@global export function __memory_free(ptr: usize): void { /* nop */ } +// @ts-ignore: decorator +@unsafe @global +function __mem_free(ptr: usize): void { +} -@global export function __memory_reset(): void { +// @ts-ignore: decorator +@unsafe @global +function __mem_reset(): void { offset = startOffset; } diff --git a/std/assembly/allocator/emscripten.ts b/std/assembly/allocator/emscripten.ts index 92956b764d..c0a6851719 100644 --- a/std/assembly/allocator/emscripten.ts +++ b/std/assembly/allocator/emscripten.ts @@ -1,22 +1,19 @@ -/** - * Emscripten Memory Allocator. - * - * Uses Emscripten's exported _malloc and _free implementations, i.e., when linking with - * Emscripten-compiled programs that already provide these. Differs from 'system' in that their - * names are prefixed with an underscore. - * - * @module std/assembly/allocator/emscripten - *//***/ - +// @ts-ignore: decorator +@unsafe declare function _malloc(size: usize): usize; -declare function _free(ptr: usize): void; -// Memory allocator interface +// @ts-ignore: decorator +@unsafe +declare function _free(ptr: usize): void; -@global export function __memory_allocate(size: usize): usize { +// @ts-ignore: decorator +@unsafe @global +function __mem_allocate(size: usize): usize { return _malloc(size); } -@global export function __memory_free(ptr: usize): void { +// @ts-ignore: decorator +@unsafe @global +function __mem_free(ptr: usize): void { _free(ptr); } diff --git a/std/assembly/allocator/index.d.ts b/std/assembly/allocator/index.d.ts new file mode 100644 index 0000000000..73d569fb59 --- /dev/null +++ b/std/assembly/allocator/index.d.ts @@ -0,0 +1,3 @@ +declare function __mem_allocate(size: usize): usize; +declare function __mem_free(ref: usize): void; +declare function __mem_reset(): void; diff --git a/std/assembly/allocator/system.ts b/std/assembly/allocator/system.ts index 76b3293b0c..ceeee58001 100644 --- a/std/assembly/allocator/system.ts +++ b/std/assembly/allocator/system.ts @@ -1,21 +1,19 @@ -/** - * System Memory Allocator. - * - * Uses the environment's malloc and free implementations, i.e., when linking with other C-like - * programs that already provide these. - * - * @module std/assembly/allocator/system - *//***/ - +// @ts-ignore: decorator +@unsafe declare function malloc(size: usize): usize; -declare function free(ptr: usize): void; -// Memory allocator interface +// @ts-ignore: decorator +@unsafe +declare function free(ptr: usize): void; -@global export function __memory_allocate(size: usize): usize { +// @ts-ignore: decorator +@unsafe @global +function __mem_allocate(size: usize): usize { return malloc(size); } -@global export function __memory_free(ptr: usize): void { +// @ts-ignore: decorator +@unsafe @global +function __mem_free(ptr: usize): void { free(ptr); } diff --git a/std/assembly/allocator/tlsf.ts b/std/assembly/allocator/tlsf.ts index 04b027dc55..9f30d60521 100644 --- a/std/assembly/allocator/tlsf.ts +++ b/std/assembly/allocator/tlsf.ts @@ -1,11 +1,7 @@ -/** - * Two-Level Segregate Fit Memory Allocator. - * - * A general purpose dynamic memory allocator specifically designed to meet real-time requirements. - * Always aligns to 8 bytes. - * - * @module std/assembly/allocator/tlsf - *//***/ +// Two-Level Segregate Fit Memory Allocator. +// +// A general purpose dynamic memory allocator specifically designed to meet real-time requirements. +// Always aligns to 8 bytes. // ╒══════════════ Block size interpretation (32-bit) ═════════════╕ // 3 2 1 @@ -15,18 +11,27 @@ // └───────────────────────────────────────────────┴─────────╨─────┘ // FL: first level, SL: second level, AL: alignment, SB: small block -import { - AL_BITS, - AL_SIZE, - AL_MASK -} from "../internal/allocator"; +import { AL_BITS, AL_SIZE, AL_MASK } from "../util/allocator"; +import { HEAP_BASE, memory } from "../memory"; +// @ts-ignore: decorator +@inline const SL_BITS: u32 = 5; + +// @ts-ignore: decorator +@inline const SL_SIZE: usize = 1 << SL_BITS; +// @ts-ignore: decorator +@inline const SB_BITS: usize = (SL_BITS + AL_BITS); + +// @ts-ignore: decorator +@inline const SB_SIZE: usize = 1 << SB_BITS; +// @ts-ignore: decorator +@inline const FL_BITS: u32 = (sizeof() == sizeof() ? 30 // ^= up to 1GB per block : 32 // ^= up to 4GB per block @@ -49,21 +54,35 @@ const FL_BITS: u32 = (sizeof() == sizeof() // F: FREE, L: LEFT_FREE /** Tag indicating that this block is free. */ +// @ts-ignore: decorator +@inline const FREE: usize = 1 << 0; + /** Tag indicating that this block's left block is free. */ +// @ts-ignore: decorator +@inline const LEFT_FREE: usize = 1 << 1; + /** Mask to obtain all tags. */ +// @ts-ignore: decorator +@inline const TAGS: usize = FREE | LEFT_FREE; /** Block structure. */ -@unmanaged -class Block { +@unmanaged class Block { /** Info field holding this block's size and tags. */ info: usize; + /** Class id. */ // TODO + // classId: u32; // + /** Size of the payload. */ // + // payloadSize: u32; // + /** Reference count. */ // + // refCount: u32; // - /** End offset of the {@link Block#info} field. User data starts here. */ - static readonly INFO: usize = (sizeof() + AL_MASK) & ~AL_MASK; + /** Size of the always present header fields. User data starts here. */ + @inline + static readonly HEADER_SIZE: usize = (offsetof("prev") + AL_MASK) & ~AL_MASK; /** Previous free block, if any. Only valid if free. */ prev: Block | null; @@ -71,14 +90,16 @@ class Block { next: Block | null; /** Minimum size of a block, excluding {@link Block#info}. */ + @inline static readonly MIN_SIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + jump /** Maximum size of a used block, excluding {@link Block#info}. */ + @inline static readonly MAX_SIZE: usize = 1 << (FL_BITS + SB_BITS); /** Gets this block's left (free) block in memory. */ get left(): Block { - assert(this.info & LEFT_FREE); // must be free to contain a jump + assert(this.info & LEFT_FREE); // left must be free or it doesn't contain 'jump' return assert( load(changetype(this) - sizeof()) ); // can't be null @@ -86,10 +107,10 @@ class Block { /** Gets this block's right block in memory. */ get right(): Block { - assert(this.info & ~TAGS); // can't skip beyond the tail block + assert(this.info & ~TAGS); // can't skip beyond the tail block (the only valid empty block) return assert( changetype( - changetype(this) + Block.INFO + (this.info & ~TAGS) + changetype(this) + Block.HEADER_SIZE + (this.info & ~TAGS) ) ); // can't be null } @@ -119,16 +140,16 @@ class Block { // └───────────────────────────────────────────────────────────────┘ 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 { +@unmanaged class Root { /** First level bitmap. */ flMap: usize = 0; /** Start offset of second level maps. */ + @inline private static readonly SL_START: usize = sizeof(); // Using *one* SL map per *FL bit* @@ -146,17 +167,18 @@ class Root { } /** End offset of second level maps. */ + @inline 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. */ + @inline private static readonly HL_START: usize = (Root.SL_END + AL_MASK) & ~AL_MASK; /** Gets the head of the specified first and second level index. */ getHead(fl: usize, sl: u32): Block | null { - assert(fl < FL_BITS); // fl out of range - assert(sl < SL_SIZE); // sl out of range + assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range return changetype(load( changetype(this) + (fl * SL_SIZE + sl) * sizeof() , Root.HL_START)); @@ -164,23 +186,23 @@ class Root { /** Sets the head of the specified first and second level index. */ setHead(fl: usize, sl: u32, value: Block | null): void { - assert(fl < FL_BITS); // fl out of range - assert(sl < SL_SIZE); // sl out of range + assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range store( - changetype(this) + (fl * SL_SIZE + sl) * sizeof() - , changetype(value) - , Root.HL_START); + changetype(this) + (fl * SL_SIZE + sl) * sizeof(), + changetype(value), + Root.HL_START + ); } /** End offset of FL/SL heads. */ - private static readonly HL_END: usize = ( - Root.HL_START + FL_BITS * SL_SIZE * sizeof() - ); + @inline + private static readonly HL_END: usize = Root.HL_START + FL_BITS * SL_SIZE * sizeof(); - get tailRef(): usize { return load(0, Root.HL_END); } - set tailRef(value: usize) { store(0, value, Root.HL_END); } + get tailRef(): usize { return load(changetype(this), Root.HL_END); } + set tailRef(value: usize) { store(changetype(this), value, Root.HL_END); } /** Total size of the {@link Root} structure. */ + @inline static readonly SIZE: usize = Root.HL_END + sizeof(); /** Inserts a previously used block back into the free list. */ @@ -189,18 +211,14 @@ class Root { assert(block); // cannot be null var blockInfo = block.info; assert(blockInfo & FREE); // must be free - var size: usize; - assert( - (size = block.info & ~TAGS) >= Block.MIN_SIZE && size < Block.MAX_SIZE - ); // must be valid, not necessary to compute yet if noAssert=true - var right: Block = assert(block.right); // can't be null + var right = block.right; // asserts != null var rightInfo = right.info; // merge with right block if also free if (rightInfo & FREE) { this.remove(right); - block.info = (blockInfo += Block.INFO + (rightInfo & ~TAGS)); + block.info = (blockInfo += Block.HEADER_SIZE + (rightInfo & ~TAGS)); right = block.right; rightInfo = right.info; // jump is set below @@ -208,11 +226,11 @@ class Root { // merge with left block if also free if (blockInfo & LEFT_FREE) { - let left: Block = assert(block.left); // can't be null + let left = block.left; // asserts != null let leftInfo = left.info; - assert(leftInfo & FREE); // must be free according to tags + assert(leftInfo & FREE); // must be free according to right tags this.remove(left); - left.info = (leftInfo += Block.INFO + (blockInfo & ~TAGS)); + left.info = (leftInfo += Block.HEADER_SIZE + (blockInfo & ~TAGS)); block = left; blockInfo = leftInfo; // jump is set below @@ -222,7 +240,7 @@ class Root { this.setJump(block, right); // right is no longer used now, hence rightInfo is not synced - size = blockInfo & ~TAGS; + var size = blockInfo & ~TAGS; assert(size >= Block.MIN_SIZE && size < Block.MAX_SIZE); // must be valid // mapping_insert @@ -293,7 +311,7 @@ class Root { /** Searches for a free block of at least the specified size. */ search(size: usize): Block | null { - assert(size >= Block.MIN_SIZE && size < Block.MAX_SIZE); + // size was already asserted by caller // mapping_search var fl: usize, sl: u32; @@ -331,9 +349,11 @@ class Root { /** Links a free left with its right block in memory. */ private setJump(left: Block, right: Block): void { - assert(left.info & FREE); // must be free - assert(left.right == right); // right block must match - assert(right.info & LEFT_FREE); // right block must be tagged as LEFT_FREE + assert( + (left.info & FREE) != 0 && // must be free to contain 'jump' + left.right == right && // right block must match + (right.info & LEFT_FREE) != 0 // free status must match + ); store( changetype(right) - sizeof() , left); // last word in left block's (free) data region @@ -344,48 +364,52 @@ class Root { * splitting it if possible, and returns its data pointer. */ use(block: Block, size: usize): usize { - var blockInfo = block.info; - assert(blockInfo & FREE); // must be free so we can use it - assert(size >= Block.MIN_SIZE && size < Block.MAX_SIZE); // must be valid - assert(!(size & AL_MASK)); // size must be aligned so the new block is + // size was already asserted by caller + var blockInfo = block.info; + assert( + (blockInfo & FREE) != 0 && // must be free + !(size & AL_MASK) // size must be aligned so the new block is + ); this.remove(block); // split if the block can hold another MIN_SIZE block var remaining = (blockInfo & ~TAGS) - size; - if (remaining >= Block.INFO + Block.MIN_SIZE) { + if (remaining >= Block.HEADER_SIZE + Block.MIN_SIZE) { block.info = size | (blockInfo & LEFT_FREE); // also discards FREE let spare = changetype( - changetype(block) + Block.INFO + size + changetype(block) + Block.HEADER_SIZE + size ); - spare.info = (remaining - Block.INFO) | FREE; // not LEFT_FREE + spare.info = (remaining - Block.HEADER_SIZE) | FREE; // not LEFT_FREE this.insert(spare); // also sets jump // otherwise tag block as no longer FREE and right as no longer LEFT_FREE } else { block.info = blockInfo & ~FREE; - let right: Block = assert(block.right); // can't be null (tail) + let right = block.right; // asserts != null right.info &= ~LEFT_FREE; } - return changetype(block) + Block.INFO; + return changetype(block) + Block.HEADER_SIZE; } /** Adds more memory to the pool. */ addMemory(start: usize, end: usize): bool { - assert(start <= end); - assert(!(start & AL_MASK)); // must be aligned - assert(!(end & AL_MASK)); // must be aligned + assert( + start <= end && // must be valid + !(start & AL_MASK) && // must be aligned + !(end & AL_MASK) // must be aligned + ); var tailRef = this.tailRef; var tailInfo: usize = 0; if (tailRef) { - assert(start >= tailRef + sizeof()); // starts after tail + assert(start >= tailRef + Block.HEADER_SIZE); // starts after tail // merge with current tail if adjacent - if (start - Block.INFO == tailRef) { - start -= Block.INFO; + if (start - Block.HEADER_SIZE == tailRef) { + start -= Block.HEADER_SIZE; tailInfo = changetype(tailRef).info; } @@ -395,19 +419,19 @@ class Root { // check if size is large enough for a free block and the tail block var size = end - start; - if (size < Block.INFO + Block.MIN_SIZE + Block.INFO) { + if (size < Block.HEADER_SIZE + Block.MIN_SIZE + Block.HEADER_SIZE) { return false; } // left size is total minus its own and the zero-length tail's header - var leftSize = size - 2 * Block.INFO; + var leftSize = size - 2 * Block.HEADER_SIZE; var left = changetype(start); left.info = leftSize | FREE | (tailInfo & LEFT_FREE); left.prev = null; left.next = null; // tail is a zero-length used block - var tail = changetype(start + size - Block.INFO); + var tail = changetype(start + size - Block.HEADER_SIZE); tail.info = 0 | LEFT_FREE; this.tailRef = changetype(tail); @@ -418,26 +442,29 @@ class Root { } /** Determines the first (LSB to MSB) set bit's index of a word. */ -function ffs(word: T): T { +function ffs(word: T): T { assert(word != 0); // word cannot be 0 return ctz(word); // differs from ffs only for 0 } /** Determines the last (LSB to MSB) set bit's index of a word. */ -function fls(word: T): T { +function fls(word: T): T { assert(word != 0); // word cannot be 0 + // @ts-ignore: type const inv: T = (sizeof() << 3) - 1; + // @ts-ignore: type return inv - clz(word); } /** Reference to the initialized {@link Root} structure, once initialized. */ +// @ts-ignore: decorator +@lazy var ROOT: Root = changetype(0); -// Memory allocator interface - /** Allocates a chunk of memory. */ -@global export function __memory_allocate(size: usize): usize { - +// @ts-ignore: decorator +@unsafe @global +function __mem_allocate(size: usize): usize { // initialize if necessary var root = ROOT; if (!root) { @@ -480,24 +507,23 @@ var ROOT: Root = changetype(0); block = assert(root.search(size)); // must be found now } - assert((block.info & ~TAGS) >= size); + assert((block.info & ~TAGS) >= size); // must fit return root.use(block, size); } /** Frees the chunk of memory at the specified address. */ -@global export function __memory_free(data: usize): void { +// @ts-ignore: decorator +@unsafe @global +function __mem_free(data: usize): void { if (data) { + assert(!(data & AL_MASK)); // must be aligned let root = ROOT; if (root) { - let block = changetype(data - Block.INFO); + let block = changetype(data - Block.HEADER_SIZE); let blockInfo = block.info; assert(!(blockInfo & FREE)); // must be used block.info = blockInfo | FREE; - root.insert(changetype(data - Block.INFO)); + root.insert(changetype(data - Block.HEADER_SIZE)); } } } - -@global export function __memory_reset(): void { - unreachable(); -} diff --git a/std/assembly/array.ts b/std/assembly/array.ts index 059d5650ca..a8b86bf112 100644 --- a/std/assembly/array.ts +++ b/std/assembly/array.ts @@ -1,148 +1,171 @@ -import { - MAX_BLENGTH, - HEADER_SIZE, - allocateUnsafe, - reallocateUnsafe, - LOAD, - STORE -} from "./internal/arraybuffer"; - -import { - allocateUnsafe as allocateUnsafeString, - freeUnsafe as freeUnsafeString, - copyUnsafe as copyUnsafeString -} from "./internal/string"; - -import { - COMPARATOR, - SORT -} from "./internal/sort"; - -import { - itoa, - dtoa, - itoa_stream, - dtoa_stream, - MAX_DOUBLE_LENGTH -} from "./internal/number"; - -import { - isArray as builtin_isArray -} from "./builtins"; - -export class Array { - [key: number]: T; // compatibility only - - /* @internal */ buffer_: ArrayBuffer; - /* @internal */ length_: i32; - - @inline static isArray(value: U): bool { +/// + +import { MAX_BYTELENGTH, allocate, reallocate, discard, register, NEWARRAY } from "./util/runtime"; +import { COMPARATOR, SORT } from "./util/sort"; +import { __runtime_id, __gc_mark_members } from "./runtime"; +import { ArrayBuffer, ArrayBufferView } from "./arraybuffer"; +import { itoa, dtoa, itoa_stream, dtoa_stream, MAX_DOUBLE_LENGTH } from "./util/number"; +import { isArray as builtin_isArray } from "./builtins"; +import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_EMPTYARRAY, E_HOLEYARRAY } from "./util/error"; + +/** Ensures that the given array has _at least_ the specified capacity. */ +function ensureCapacity(array: ArrayBufferView, minCapacity: i32, alignLog2: u32): void { + if (minCapacity > array.dataLength >>> alignLog2) { + if (minCapacity > (MAX_BYTELENGTH >>> alignLog2)) throw new RangeError(E_INVALIDLENGTH); + let oldData = array.data; + let newByteLength = minCapacity << alignLog2; + let newData = reallocate(changetype(oldData), newByteLength); // registers on move + if (newData !== changetype(oldData)) { + array.data = changetype(newData); // links + array.dataStart = newData; + } + array.dataLength = newByteLength; + } +} + +export class Array extends ArrayBufferView { + [key: number]: T; + + // Implementing ArrayBufferView isn't strictly necessary here but is done to allow glue code + // to work with typed and normal arrays interchangeably. Technically, normal arrays do not need + // `dataStart` (equals `data`) and `dataLength` (equals computed `data.byteLength`). + + // Also note that Array with non-nullable T must guard against implicit null values whenever + // length is modified in a way that a null value would exist. Otherwise, the compiler wouldn't be + // able to guarantee type-safety anymore. For lack of a better word, such an array is "holey". + + private length_: i32; + + static isArray(value: U): bool { return builtin_isArray(value) && value !== null; } + static create(capacity: i32 = 0): Array { + if (capacity > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); + var array = NEWARRAY(capacity); + array.length_ = 0; // safe even if T is a non-nullable reference + memory.fill(array.dataStart, 0, array.dataLength); + return array; + } + constructor(length: i32 = 0) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); - var byteLength = length << alignof(); - var buffer = allocateUnsafe(byteLength); - this.buffer_ = buffer; + super(length, alignof()); + if (isReference()) { + if (!isNullable()) { + if (length) throw new Error(E_HOLEYARRAY); + } + } this.length_ = length; - memory.fill( - changetype(buffer) + HEADER_SIZE, - 0, - byteLength - ); } - @inline + @unsafe get buffer(): ArrayBuffer { + return this.data; + } + get length(): i32 { return this.length_; } set length(length: i32) { - var buffer = this.buffer_; - var capacity = buffer.byteLength >>> alignof(); - if (length > capacity) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (length > MAX_LENGTH) throw new RangeError("Invalid array length"); - buffer = reallocateUnsafe(buffer, length << alignof()); - this.buffer_ = buffer; + if (isReference()) { + if (!isNullable()) { + if (length > this.length_) throw new Error(E_HOLEYARRAY); + } } + ensureCapacity(this, length, alignof()); this.length_ = length; } every(callbackfn: (element: T, index: i32, array: Array) => bool): bool { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - if (!callbackfn(LOAD(this.buffer_, index), index, this)) return false; + if (!callbackfn(load(this.dataStart + (index << alignof())), index, this)) return false; } return true; } findIndex(predicate: (element: T, index: i32, array: Array) => bool): i32 { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - if (predicate(LOAD(this.buffer_, index), index, this)) return index; + if (predicate(load(this.dataStart + (index << alignof())), index, this)) return index; } return -1; } - @operator("[]") - private __get(index: i32): T { - var buffer = this.buffer_; - return index < (buffer.byteLength >>> alignof()) - ? LOAD(buffer, index) - : unreachable(); + @operator("[]") private __get(index: i32): T { + if (isReference()) { + if (!isNullable()) { + if (index >= this.length_) throw new Error(E_HOLEYARRAY); + } + } + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return this.__unchecked_get(index); } - @operator("{}") - private __unchecked_get(index: i32): T { - return LOAD(this.buffer_, index); + @operator("{}") private __unchecked_get(index: i32): T { + return load(this.dataStart + (index << alignof())); } - @operator("[]=") - private __set(index: i32, value: T): void { - var buffer = this.buffer_; - var capacity = buffer.byteLength >>> alignof(); - if (index >= capacity) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (index >= MAX_LENGTH) throw new Error("Invalid array length"); - buffer = reallocateUnsafe(buffer, (index + 1) << alignof()); - this.buffer_ = buffer; - this.length_ = index + 1; + @operator("[]=") private __set(index: i32, value: T): void { + var length = this.length_; + if (isReference()) { + if (!isNullable()) { + if (index > length) throw new Error(E_HOLEYARRAY); + } } - STORE(buffer, index, value); - if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line + ensureCapacity(this, index + 1, alignof()); + this.__unchecked_set(index, value); + if (index >= length) this.length_ = index + 1; } - @operator("{}=") - private __unchecked_set(index: i32, value: T): void { - STORE(this.buffer_, index, value); - if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line + @operator("{}=") private __unchecked_set(index: i32, value: T): void { + if (isManaged()) { + let offset = this.dataStart + (index << alignof()); + let oldValue = load(offset); + if (value !== oldValue) { + store(offset, value); + if (isNullable()) { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + if (value !== null) __ref_link(changetype(value), changetype(this)); + } else if (isDefined(__ref_retain)) { + if (oldValue !== null) __ref_release(changetype(oldValue)); + if (value !== null) __ref_retain(changetype(value)); + } else assert(false); + } else { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + __ref_link(changetype(value), changetype(this)); + } else if (__ref_retain) { + if (oldValue !== null) __ref_release(changetype(oldValue)); + __ref_retain(changetype(value)); + } else assert(false); + } + } + } else { + store(this.dataStart + (index << alignof()), value); + } } fill(value: T, start: i32 = 0, end: i32 = i32.MAX_VALUE): this { - var buffer = this.buffer_; - var len = this.length_; - - start = start < 0 ? max(len + start, 0) : min(start, len); - end = end < 0 ? max(len + end, 0) : min(end, len); - + var dataStart = this.dataStart; + var length = this.length_; + start = start < 0 ? max(length + start, 0) : min(start, length); + end = end < 0 ? max(length + end, 0) : min(end, length); if (sizeof() == 1) { if (start < end) { memory.fill( - changetype(buffer) + start + HEADER_SIZE, - value, + dataStart + start, + u8(value), (end - start) ); } } else { for (; start < end; ++start) { - STORE(buffer, start, value); + store(dataStart + (start << alignof()), value); } } return this; } - @inline includes(searchElement: T, fromIndex: i32 = 0): bool { return this.indexOf(searchElement, fromIndex) >= 0; } @@ -151,9 +174,9 @@ export class Array { var length = this.length_; if (length == 0 || fromIndex >= length) return -1; if (fromIndex < 0) fromIndex = max(length + fromIndex, 0); - var buffer = this.buffer_; + var dataStart = this.dataStart; while (fromIndex < length) { - if (LOAD(buffer, fromIndex) == searchElement) return fromIndex; + if (load(dataStart + (fromIndex << alignof())) == searchElement) return fromIndex; ++fromIndex; } return -1; @@ -162,58 +185,102 @@ export class Array { lastIndexOf(searchElement: T, fromIndex: i32 = this.length_): i32 { var length = this.length_; if (length == 0) return -1; - if (fromIndex < 0) fromIndex = length + fromIndex; // no need to clamp + if (fromIndex < 0) fromIndex = length + fromIndex; else if (fromIndex >= length) fromIndex = length - 1; - var buffer = this.buffer_; - while (fromIndex >= 0) { // ^ - if (LOAD(buffer, fromIndex) == searchElement) return fromIndex; + var dataStart = this.dataStart; + while (fromIndex >= 0) { + if (load(dataStart + (fromIndex << alignof())) == searchElement) return fromIndex; --fromIndex; } return -1; } - push(element: T): i32 { + push(value: T): i32 { var length = this.length_; - var buffer = this.buffer_; - var capacity = buffer.byteLength >>> alignof(); - var newLength = length + 1; // safe only if length is checked - if (length >= capacity) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (length >= MAX_LENGTH) throw new Error("Invalid array length"); - buffer = reallocateUnsafe(buffer, newLength << alignof()); - this.buffer_ = buffer; + var newLength = length + 1; + ensureCapacity(this, newLength, alignof()); + if (isManaged()) { + let offset = this.dataStart + (length << alignof()); + let oldValue = load(offset); + if (oldValue !== value) { + store(offset, value); + if (isNullable()) { + if (isDefined(__ref_link)) { + if (value !== null) __ref_link(changetype(value), changetype(this)); + if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (__ref_retain) { + if (oldValue !== null) __ref_retain(changetype(value)); + if (value !== null) __ref_release(changetype(oldValue)); + } else assert(false); + } else { + if (isDefined(__ref_link)) { + __ref_link(changetype(value), changetype(this)); + if (isDefined(__ref_unlink)) if (oldValue !== null) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (__ref_retain) { + __ref_retain(changetype(value)); + if (oldValue !== null) __ref_release(changetype(oldValue)); + } else assert(false); + } + } + } else { + store(this.dataStart + (length << alignof()), value); } this.length_ = newLength; - STORE(buffer, length, element); - if (isManaged()) __gc_link(changetype(this), changetype(element)); // tslint:disable-line return newLength; } - concat(items: Array): Array { + concat(other: Array): Array { var thisLen = this.length_; - var otherLen = select(0, items.length_, items === null); + var otherLen = select(0, other.length_, other === null); var outLen = thisLen + otherLen; - var out = new Array(outLen); - - if (thisLen) { - memory.copy( - changetype(out.buffer_) + HEADER_SIZE, - changetype(this.buffer_) + HEADER_SIZE, - thisLen << alignof() - ); - } - if (otherLen) { - memory.copy( - changetype(out.buffer_) + HEADER_SIZE + (thisLen << alignof()), - changetype(items.buffer_) + HEADER_SIZE, - otherLen << alignof() - ); + if (outLen > MAX_BYTELENGTH >>> alignof()) throw new Error(E_INVALIDLENGTH); + var out = NEWARRAY(outLen); + var outStart = out.dataStart; + var thisSize = thisLen << alignof(); + if (isManaged()) { + let thisStart = this.dataStart; + for (let offset: usize = 0; offset < thisSize; offset += sizeof()) { + let ref = load(thisStart + offset); + store(outStart + offset, ref); + if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(ref, changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } + outStart += thisSize; + let otherStart = other.dataStart; + let otherSize = otherLen << alignof(); + for (let offset: usize = 0; offset < otherSize; offset += sizeof()) { + let ref = load(otherStart + offset); + store(outStart + offset, ref); + if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(ref, changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } + } else { + memory.copy(outStart, this.dataStart, thisSize); + memory.copy(outStart + thisSize, other.dataStart, otherLen << alignof()); } return out; } copyWithin(target: i32, start: i32, end: i32 = i32.MAX_VALUE): this { - var buffer = this.buffer_; + var dataStart = this.dataStart; var len = this.length_; end = min(end, len); @@ -226,13 +293,13 @@ export class Array { from += count - 1; to += count - 1; while (count) { - STORE(buffer, to, LOAD(buffer, from)); + store(dataStart + (to << alignof()), load(dataStart + (from << alignof()))); --from, --to, --count; } } else { memory.copy( - changetype(buffer) + HEADER_SIZE + (to << alignof()), - changetype(buffer) + HEADER_SIZE + (from << alignof()), + dataStart + (to << alignof()), + dataStart + (from << alignof()), count << alignof() ); } @@ -241,32 +308,49 @@ export class Array { pop(): T { var length = this.length_; - if (length < 1) throw new RangeError("Array is empty"); - var element = LOAD(this.buffer_, --length); + if (length < 1) throw new RangeError(E_EMPTYARRAY); + var element = load(this.dataStart + ((--length) << alignof())); this.length_ = length; return element; } forEach(callbackfn: (value: T, index: i32, array: Array) => void): void { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - callbackfn(LOAD(this.buffer_, index), index, this); + callbackfn(load(this.dataStart + (index << alignof())), index, this); } } map(callbackfn: (value: T, index: i32, array: Array) => U): Array { var length = this.length_; - var result = new Array(length); - var buffer = result.buffer_; + var out = NEWARRAY(length); + var outStart = out.dataStart; for (let index = 0; index < min(length, this.length_); ++index) { - STORE(buffer, index, callbackfn(LOAD(this.buffer_, index), index, this)); + let value = load(this.dataStart + (index << alignof())); + if (isManaged()) { + let ref = changetype(callbackfn(value, index, this)); + store(outStart + (index << alignof()), ref); + if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(out)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(ref, changetype(out)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + store(outStart + (index << alignof()), callbackfn(value, index, this)); + } } - return result; + return out; } filter(callbackfn: (value: T, index: i32, array: Array) => bool): Array { - var result = new Array(); + var result = NEWARRAY(0); for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - let value = LOAD(this.buffer_, index); + let value = load(this.dataStart + (index << alignof())); if (callbackfn(value, index, this)) result.push(value); } return result; @@ -278,7 +362,7 @@ export class Array { ): U { var accum = initialValue; for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - accum = callbackfn(accum, LOAD(this.buffer_, index), index, this); + accum = callbackfn(accum, load(this.dataStart + (index << alignof())), index, this); } return accum; } @@ -289,295 +373,457 @@ export class Array { ): U { var accum = initialValue; for (let index = this.length_ - 1; index >= 0; --index) { - accum = callbackfn(accum, LOAD(this.buffer_, index), index, this); + accum = callbackfn(accum, load(this.dataStart + (index << alignof())), index, this); } return accum; } shift(): T { var length = this.length_; - if (length < 1) throw new RangeError("Array is empty"); - var buffer = this.buffer_; - var element = LOAD(buffer, 0); + if (length < 1) throw new RangeError(E_EMPTYARRAY); + var base = this.dataStart; + var element = load(base); var lastIndex = length - 1; memory.copy( - changetype(buffer) + HEADER_SIZE, - changetype(buffer) + HEADER_SIZE + sizeof(), + base, + base + sizeof(), lastIndex << alignof() ); - STORE(buffer, lastIndex, null); + store(base + (lastIndex << alignof()), + // @ts-ignore: cast + null + ); this.length_ = lastIndex; return element; } some(callbackfn: (element: T, index: i32, array: Array) => bool): bool { for (let index = 0, length = this.length_; index < min(length, this.length_); ++index) { - if (callbackfn(LOAD(this.buffer_, index), index, this)) return true; + if (callbackfn(load(this.dataStart + (index << alignof())), index, this)) return true; } return false; } unshift(element: T): i32 { - var buffer = this.buffer_; - var capacity = buffer.byteLength >>> alignof(); - var length = this.length_; - var newLength = length + 1; // safe only if length is checked - if (length >= capacity) { - const MAX_LENGTH = MAX_BLENGTH >>> alignof(); - if (length >= MAX_LENGTH) throw new Error("Invalid array length"); - buffer = reallocateUnsafe(buffer, newLength << alignof()); - capacity = buffer.byteLength >>> alignof(); - this.buffer_ = buffer; - } + var newLength = this.length_ + 1; + ensureCapacity(this, newLength, alignof()); + var dataStart = this.dataStart; memory.copy( - changetype(buffer) + HEADER_SIZE + sizeof(), - changetype(buffer) + HEADER_SIZE, - (capacity - 1) << alignof() + dataStart + sizeof(), + dataStart, + (newLength - 1) << alignof() ); - STORE(buffer, 0, element); + store(dataStart, element); + if (isManaged()) { + if (isNullable()) { + if (element !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(element), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(element)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(element), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(element)); + else assert(false); + } + } this.length_ = newLength; - if (isManaged()) __gc_link(changetype(this), changetype(element)); // tslint:disable-line return newLength; } slice(begin: i32 = 0, end: i32 = i32.MAX_VALUE): Array { - var len = this.length_; - begin = begin < 0 ? max(begin + len, 0) : min(begin, len); - end = end < 0 ? max(end + len, 0) : min(end, len); - len = max(end - begin, 0); - var sliced = new Array(len); - if (len) { - memory.copy( - changetype(sliced.buffer_) + HEADER_SIZE, - changetype(this.buffer_) + HEADER_SIZE + (begin << alignof()), - len << alignof() - ); + var length = this.length_; + begin = begin < 0 ? max(begin + length, 0) : min(begin, length); + end = end < 0 ? max(end + length, 0) : min(end , length); + length = max(end - begin, 0); + var slice = NEWARRAY(length); + var sliceBase = slice.dataStart; + var thisBase = this.dataStart + (begin << alignof()); + if (isManaged()) { + let off = 0; + let end = length << alignof(); + while (off < end) { + let ref = load(thisBase + off); + store(sliceBase + off, ref); + if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(slice)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(ref, changetype(slice)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + off += sizeof(); + } + } else { + memory.copy(sliceBase, thisBase, length << alignof()); } - return sliced; + return slice; } splice(start: i32, deleteCount: i32 = i32.MAX_VALUE): Array { var length = this.length_; start = start < 0 ? max(length + start, 0) : min(start, length); deleteCount = max(min(deleteCount, length - start), 0); - var buffer = this.buffer_; - var spliced = new Array(deleteCount); - var source = changetype(buffer) + HEADER_SIZE + (start << alignof()); - memory.copy( - changetype(spliced.buffer_) + HEADER_SIZE, - source, - deleteCount << alignof() - ); + var result = NEWARRAY(deleteCount); + var resultStart = result.dataStart; + var thisStart = this.dataStart; + var thisBase = thisStart + (start << alignof()); + if (isManaged()) { + for (let i = 0; i < deleteCount; ++i) { + let ref = load(thisBase + (i << alignof())); + store(resultStart + (i << alignof()), ref); + if (isDefined(__ref_link)) { + if (isNullable()) { + if (ref) { + if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(this)); + __ref_link(ref, changetype(result)); + } + } else { + if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(this)); + __ref_link(ref, changetype(result)); + } + } + } + } else { + memory.copy( + result.dataStart, + thisBase, + deleteCount << alignof() + ); + } var offset = start + deleteCount; if (length != offset) { memory.copy( - source, - changetype(buffer) + HEADER_SIZE + (offset << alignof()), + thisBase, + thisStart + (offset << alignof()), (length - offset) << alignof() ); } this.length_ = length - deleteCount; - return spliced; + return result; } reverse(): Array { - var buffer = this.buffer_; - for (let front = 0, back = this.length_ - 1; front < back; ++front, --back) { - let temp = LOAD(buffer, front); - STORE(buffer, front, LOAD(buffer, back)); - STORE(buffer, back, temp); + var length = this.length_; + if (length) { + let front = this.dataStart; + let back = this.dataStart + ((length - 1) << alignof()); + while (front < back) { + let temp = load(front); + store(front, load(back)); + store(back, temp); + front += sizeof(); + back -= sizeof(); + } } return this; } sort(comparator: (a: T, b: T) => i32 = COMPARATOR()): this { - // TODO remove this when flow will allow trackcing null + // TODO remove this when flow will allow tracking null assert(comparator); // The comparison function must be a function var length = this.length_; if (length <= 1) return this; - var buffer = this.buffer_; + var base = this.dataStart; if (length == 2) { - let a = LOAD(buffer, 1); // a = arr[1] - let b = LOAD(buffer, 0); // b = arr[0] + let a: T = load(base, sizeof()); // a = arr[1] + let b: T = load(base); // b = arr[0] if (comparator(a, b) < 0) { - STORE(buffer, 1, b); // arr[1] = b; - STORE(buffer, 0, a); // arr[0] = a; + store(base, b, sizeof()); // arr[1] = b; + store(base, a); // arr[0] = a; } return this; } - SORT(buffer, 0, length, comparator); + SORT(base, length, comparator); return this; } join(separator: string = ","): string { + if (isBoolean()) return this.join_bool(separator); + if (isInteger()) return this.join_int(separator); + if (isFloat()) return this.join_flt(separator); + if (isString()) return this.join_str(separator); + if (isArray()) return this.join_arr(separator); + if (isReference()) return this.join_ref(separator); + ERROR("unspported element type"); + return unreachable(); + } + + private join_bool(separator: string = ","): string { var lastIndex = this.length_ - 1; if (lastIndex < 0) return ""; - var result = ""; - var value: T; - var buffer = this.buffer_; + var dataStart = this.dataStart; + if (!lastIndex) return select("true", "false", load(dataStart)); + var sepLen = separator.length; - var hasSeparator = sepLen != 0; - if (value instanceof bool) { - if (!lastIndex) return select("true", "false", LOAD(buffer, 0)); - - let valueLen = 5; // max possible length of element len("false") - let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = allocateUnsafeString(estLen); - let offset = 0; - for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - valueLen = 4 + (!value); - copyUnsafeString(result, offset, select("true", "false", value), 0, valueLen); - offset += valueLen; - if (hasSeparator) { - copyUnsafeString(result, offset, changetype(separator), 0, sepLen); - offset += sepLen; - } - } - value = LOAD(buffer, lastIndex); - valueLen = 4 + (!value); - copyUnsafeString(result, offset, select("true", "false", value), 0, valueLen); + var valueLen = 5; // max possible length of element len("false") + var estLen = (valueLen + sepLen) * lastIndex + valueLen; + var result = allocate(estLen << 1); + var offset = 0; + var value: bool; + for (let i = 0; i < lastIndex; ++i) { + value = load(dataStart + i); + valueLen = 4 + i32(!value); + memory.copy( + result + (offset << 1), + changetype(select("true", "false", value)), + valueLen << 1 + ); offset += valueLen; - - let out = result; - if (estLen > offset) { - out = result.substring(0, offset); - freeUnsafeString(result); - } - return out; - } else if (isInteger()) { - if (!lastIndex) return changetype(itoa(LOAD(buffer, 0))); - - const valueLen = (sizeof() <= 4 ? 10 : 20) + isSigned(); - let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = allocateUnsafeString(estLen); - let offset = 0; - for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - offset += itoa_stream(changetype(result), offset, value); - if (hasSeparator) { - copyUnsafeString(result, offset, separator, 0, sepLen); - offset += sepLen; - } - } - value = LOAD(buffer, lastIndex); - offset += itoa_stream(changetype(result), offset, value); - let out = result; - if (estLen > offset) { - out = result.substring(0, offset); - freeUnsafeString(result); + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - return out; - } else if (isFloat()) { - if (!lastIndex) return changetype(dtoa(LOAD(buffer, 0))); - - const valueLen = MAX_DOUBLE_LENGTH; - let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = allocateUnsafeString(estLen); - let offset = 0; - for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - offset += dtoa_stream(changetype(result), offset, value); - if (hasSeparator) { - copyUnsafeString(result, offset, separator, 0, sepLen); - offset += sepLen; - } + } + value = load(dataStart + lastIndex); + valueLen = 4 + i32(!value); + memory.copy( + result + (offset << 1), + changetype(select("true", "false", value)), + valueLen << 1 + ); + offset += valueLen; + + if (estLen > offset) { + let trimmed = changetype(result).substring(0, offset); + discard(result); + return trimmed; // registered in .substring + } + return changetype(register(result, __runtime_id())); + } + + private join_int(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + var dataStart = this.dataStart; + // @ts-ignore: type + if (!lastIndex) return changetype(itoa(load(dataStart))); + + var sepLen = separator.length; + const valueLen = (sizeof() <= 4 ? 10 : 20) + i32(isSigned()); + var estLen = (valueLen + sepLen) * lastIndex + valueLen; + var result = allocate(estLen << 1); + var offset = 0; + var value: T; + for (let i = 0; i < lastIndex; ++i) { + value = load(dataStart + (i << alignof())); + // @ts-ignore: type + offset += itoa_stream(result, offset, value); + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - value = LOAD(buffer, lastIndex); - offset += dtoa_stream(changetype(result), offset, value); - let out = result; - if (estLen > offset) { - out = result.substring(0, offset); - freeUnsafeString(result); + } + value = load(dataStart + (lastIndex << alignof())); + // @ts-ignore: type + offset += itoa_stream(result, offset, value); + if (estLen > offset) { + let trimmed = changetype(result).substring(0, offset); + discard(result); + return trimmed; // registered in .substring + } + return changetype(register(result, __runtime_id())); + } + + private join_flt(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + var dataStart = this.dataStart; + if (!lastIndex) { + return changetype(dtoa( + // @ts-ignore: type + load(dataStart)) + ); + } + + const valueLen = MAX_DOUBLE_LENGTH; + var sepLen = separator.length; + var estLen = (valueLen + sepLen) * lastIndex + valueLen; + var result = allocate(estLen << 1); + var offset = 0; + var value: T; + for (let i = 0; i < lastIndex; ++i) { + value = load(dataStart + (i << alignof())); + offset += dtoa_stream(result, offset, + // @ts-ignore: type + value + ); + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - return out; - } else if (isString()) { - if (!lastIndex) return LOAD(buffer, 0); + } + value = load(dataStart + (lastIndex << alignof())); + offset += dtoa_stream(result, offset, + // @ts-ignore: type + value + ); + if (estLen > offset) { + let trimmed = changetype(result).substring(0, offset); + discard(result); + return trimmed; // registered in .substring + } + return changetype(register(result, __runtime_id())); + } - let estLen = 0; - for (let i = 0, len = lastIndex + 1; i < len; ++i) { - estLen += LOAD(buffer, i).length; + private join_str(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + var dataStart = this.dataStart; + if (!lastIndex) return load(dataStart); + + var sepLen = separator.length; + var estLen = 0; + var value: string | null; + for (let i = 0, len = lastIndex + 1; i < len; ++i) { + value = load(dataStart + (i << alignof())); + if (value !== null) estLen += value.length; + } + var offset = 0; + var result = allocate((estLen + sepLen * lastIndex) << 1); + for (let i = 0; i < lastIndex; ++i) { + value = load(dataStart + (i << alignof())); + if (value !== null) { + let valueLen = changetype(value).length; + memory.copy( + result + (offset << 1), + changetype(value), + valueLen << 1 + ); + offset += valueLen; } - let offset = 0; - let result = allocateUnsafeString(estLen + sepLen * lastIndex); - for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - if (value) { - let valueLen = value.length; // tslint:disable-line:no-unsafe-any - copyUnsafeString(result, offset, value, 0, valueLen); // tslint:disable-line:no-unsafe-any - offset += valueLen; // tslint:disable-line:no-unsafe-any - } - if (hasSeparator) { - copyUnsafeString(result, offset, separator, 0, sepLen); - offset += sepLen; - } + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - value = LOAD(buffer, lastIndex); + } + value = load(dataStart + (lastIndex << alignof())); + if (value !== null) { + memory.copy( + result + (offset << 1), + changetype(value), + changetype(value).length << 1 + ); + } + return changetype(register(result, __runtime_id())); + } + + private join_arr(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + + var result = ""; + var sepLen = separator.length; + var base = this.dataStart; + var value: T; + if (!lastIndex) { + value = load(base); + // @ts-ignore: type + return value ? value.join(separator) : ""; + } + for (let i = 0; i < lastIndex; ++i) { + value = load(base + (i << alignof())); + // @ts-ignore: type + if (value) result += value.join(separator); + if (sepLen) result += separator; + } + value = load(base + (lastIndex << alignof())); + // @ts-ignore: type + if (value) result += value.join(separator); + return result; // registered by concatenation (FIXME: lots of garbage) + } + + private join_ref(separator: string = ","): string { + var lastIndex = this.length_ - 1; + if (lastIndex < 0) return ""; + var base = this.dataStart; + if (!lastIndex) return "[object Object]"; + + const valueLen = 15; // max possible length of element len("[object Object]") + var sepLen = separator.length; + var estLen = (valueLen + sepLen) * lastIndex + valueLen; + var result = allocate(estLen << 1); + var offset = 0; + var value: T; + for (let i = 0; i < lastIndex; ++i) { + value = load(base + (i << alignof())); if (value) { - let valueLen = value.length; // tslint:disable-line:no-unsafe-any - copyUnsafeString(result, offset, value, 0, valueLen); // tslint:disable-line:no-unsafe-any - } - return result; - } else if (isArray()) { - if (!lastIndex) { - value = LOAD(buffer, 0); - return value ? value.join(separator) : ""; // tslint:disable-line:no-unsafe-any - } - for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - if (value) result += value.join(separator); // tslint:disable-line:no-unsafe-any - if (hasSeparator) result += separator; - } - value = LOAD(buffer, lastIndex); - if (value) result += value.join(separator); // tslint:disable-line:no-unsafe-any - return result; - } else if (isReference()) { // References - if (!lastIndex) return "[object Object]"; - const valueLen = 15; // max possible length of element len("[object Object]") - let estLen = (valueLen + sepLen) * lastIndex + valueLen; - let result = allocateUnsafeString(estLen); - let offset = 0; - for (let i = 0; i < lastIndex; ++i) { - value = LOAD(buffer, i); - if (value) { - copyUnsafeString(result, offset, changetype("[object Object]"), 0, valueLen); - offset += valueLen; - } - if (hasSeparator) { - copyUnsafeString(result, offset, changetype(separator), 0, sepLen); - offset += sepLen; - } - } - if (LOAD(buffer, lastIndex)) { - copyUnsafeString(result, offset, changetype("[object Object]"), 0, valueLen); + memory.copy( + result + (offset << 1), + changetype("[object Object]"), + valueLen << 1 + ); offset += valueLen; } - let out = result; - if (estLen > offset) { - out = result.substring(0, offset); - freeUnsafeString(result); + if (sepLen) { + memory.copy( + result + (offset << 1), + changetype(separator), + sepLen << 1 + ); + offset += sepLen; } - return out; - } else { - assert(false); // Unsupported generic typename } + if (load(base + (lastIndex << alignof()))) { + memory.copy( + result + (offset << 1), + changetype("[object Object]"), + valueLen << 1 + ); + offset += valueLen; + } + if (estLen > offset) { + let out = changetype(result).substring(0, offset); + discard(result); + return out; // registered in .substring + } + return changetype(register(result, __runtime_id())); } - @inline toString(): string { return this.join(); } - private __gc(): void { - var buffer = this.buffer_; - __gc_mark(changetype(buffer)); // tslint:disable-line + // GC integration + + @unsafe private __traverse(): void { + __ref_mark(changetype(this.data)); if (isManaged()) { - let offset: usize = 0; - let end = this.length_ << alignof(); - while (offset < end) { - __gc_mark(load(changetype(buffer) + offset, HEADER_SIZE)); // tslint:disable-line - offset += sizeof(); + let cur = this.dataStart; + let end = cur + this.dataLength; + while (cur < end) { + let val = load(cur); + if (isNullable()) { + if (val) { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + } else { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + cur += sizeof(); } } } diff --git a/std/assembly/arraybuffer.ts b/std/assembly/arraybuffer.ts index 9014d73bd3..fa44cc08e1 100644 --- a/std/assembly/arraybuffer.ts +++ b/std/assembly/arraybuffer.ts @@ -1,67 +1,74 @@ -import { - HEADER_SIZE, - MAX_BLENGTH, - allocateUnsafe -} from "./internal/arraybuffer"; +import { HEADER, HEADER_SIZE, MAX_BYTELENGTH, allocate, register } from "./util/runtime"; +import { __runtime_id } from "./runtime"; +import { E_INVALIDLENGTH } from "./util/error"; -import { - Uint8ClampedArray, - Uint8Array, - Int8Array, - Uint16Array, - Int16Array, - Uint32Array, - Int32Array, - Uint64Array, - Int64Array -} from "./typedarray"; +export abstract class ArrayBufferView { -import { - DataView -} from "./dataview"; + @unsafe data: ArrayBuffer; + @unsafe dataStart: usize; + @unsafe dataLength: u32; -@sealed -export class ArrayBuffer { + protected constructor(length: i32, alignLog2: i32) { + if (length > MAX_BYTELENGTH >>> alignLog2) throw new RangeError(E_INVALIDLENGTH); + var buffer = new ArrayBuffer(length = length << alignLog2); + this.data = buffer; + this.dataStart = changetype(buffer); + this.dataLength = length; + } - readonly byteLength: i32; // capped to [0, MAX_LENGTH] + get byteOffset(): i32 { + return (this.dataStart - changetype(this.data)); + } - @inline static isView(value: T): bool { - if (value === null) return false; - if (value instanceof Uint8ClampedArray) return true; - if (value instanceof Uint8Array) return true; - if (value instanceof Int8Array) return true; - if (value instanceof Uint16Array) return true; - if (value instanceof Int16Array) return true; - if (value instanceof Uint32Array) return true; - if (value instanceof Int32Array) return true; - if (value instanceof Uint64Array) return true; - if (value instanceof Int64Array) return true; - if (value instanceof DataView) return true; + get byteLength(): i32 { + return this.dataLength; + } + + get length(): i32 { + ERROR("missing implementation: subclasses must implement ArrayBufferView#length"); + return unreachable(); + } +} + +@sealed export class ArrayBuffer { + + static isView(value: T): bool { + if (value) { + if (value instanceof Int8Array) return true; + if (value instanceof Uint8Array) return true; + if (value instanceof Uint8ClampedArray) return true; + if (value instanceof Int16Array) return true; + if (value instanceof Uint16Array) return true; + if (value instanceof Int32Array) return true; + if (value instanceof Uint32Array) return true; + if (value instanceof Int64Array) return true; + if (value instanceof Uint64Array) return true; + if (value instanceof Float32Array) return true; + if (value instanceof Float64Array) return true; + if (value instanceof DataView) return true; + } return false; } - // @unsafe - @inline get data(): usize { return changetype(this) + HEADER_SIZE; } + constructor(length: i32) { + if (length > MAX_BYTELENGTH) throw new RangeError(E_INVALIDLENGTH); + var buffer = allocate(length); + memory.fill(changetype(buffer), 0, length); + return changetype(register(buffer, __runtime_id())); + } - constructor(length: i32, unsafe: bool = false) { - if (length > MAX_BLENGTH) throw new RangeError("Invalid array buffer length"); - var buffer = allocateUnsafe(length); - if (!unsafe) memory.fill(changetype(buffer) + HEADER_SIZE, 0, length); - return buffer; + get byteLength(): i32 { + return changetype
(changetype(this) - HEADER_SIZE).payloadSize; } - slice(begin: i32 = 0, end: i32 = MAX_BLENGTH): ArrayBuffer { - var len = this.byteLength; - begin = begin < 0 ? max(len + begin, 0) : min(begin, len); - end = end < 0 ? max(len + end, 0) : min(end, len); - len = max(end - begin, 0); - var buffer = allocateUnsafe(len); - memory.copy( - changetype(buffer) + HEADER_SIZE, - changetype(this) + HEADER_SIZE + begin, - len - ); - return buffer; + slice(begin: i32 = 0, end: i32 = MAX_BYTELENGTH): ArrayBuffer { + var length = this.byteLength; + begin = begin < 0 ? max(length + begin, 0) : min(begin, length); + end = end < 0 ? max(length + end , 0) : min(end , length); + var outSize = max(end - begin, 0); + var out = allocate(outSize); + memory.copy(out, changetype(this) + begin, outSize); + return changetype(register(out, __runtime_id())); } toString(): string { diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index 65d13dea8a..83b3f1f969 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -1,501 +1,1742 @@ -/* tslint:disable */ - -@builtin @inline export const NaN: f64 = 0 / 0; -@builtin @inline export const Infinity: f64 = 1 / 0; - -@builtin export declare function isInteger(value?: T): bool; -@builtin export declare function isFloat(value?: T): bool; -@builtin export declare function isSigned(value?: T): bool; -@builtin export declare function isReference(value?: T): bool; -@builtin export declare function isString(value?: T): bool; -@builtin export declare function isArray(value?: T): bool; -@builtin export declare function isArrayLike(value?: T): bool; -@builtin export declare function isFunction(value?: T): bool; -@builtin export declare function isNullable(value?: T): bool; -@builtin export declare function isDefined(expression: void): bool; -@builtin export declare function isConstant(expression: void): bool; -@builtin export declare function isManaged(value?: T): bool; -@inline export function isNaN(value: T): bool { return value != value; } -@inline export function isFinite(value: T): bool { return value - value == 0; } - -@builtin export declare function clz(value: T): T; -@builtin export declare function ctz(value: T): T; -@builtin export declare function popcnt(value: T): T; -@builtin export declare function rotl(value: T, shift: T): T; -@builtin export declare function rotr(value: T, shift: T): T; -@builtin export declare function abs(value: T): T; -@builtin export declare function max(left: T, right: T): T; -@builtin export declare function min(left: T, right: T): T; -@builtin export declare function ceil(value: T): T; -@builtin export declare function floor(value: T): T; -@builtin export declare function copysign(left: T, right: T): T; -@builtin export declare function nearest(value: T): T; -@builtin export declare function reinterpret(value: void): T; -@builtin export declare function sqrt(value: T): T; -@builtin export declare function trunc(value: T): T; -@builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): T; -@builtin export declare function store(offset: usize, value: void, immOffset?: usize, immAlign?: usize): void; -@builtin export declare function sizeof(): usize; // | u32 / u64 -@builtin export declare function alignof(): usize; // | u32 / u64 -@builtin export declare function offsetof(fieldName?: string): usize; // | u32 / u64 -@builtin export declare function select(ifTrue: T, ifFalse: T, condition: bool): T; -@builtin export declare function unreachable(): void; -@builtin export declare function changetype(value: void): T; -@builtin export declare function assert(isTrueish: T, message?: string): T; -@builtin export declare function unchecked(expr: T): T; -@builtin export declare function call_indirect(target: void, ...args: void[]): T; -@builtin export declare function instantiate(...args: void[]): T; +// @ts-ignore: decorator +@builtin @inline +export const NaN: f64 = 0 / 0; + +// @ts-ignore: decorator +@builtin @inline +export const Infinity: f64 = 1 / 0; + +// @ts-ignore: decorator +@builtin +export declare function isInteger(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isFloat(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isBoolean(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isSigned(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isReference(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isString(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isArray(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isArrayLike(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isFunction(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isNullable(value?: T): bool; + +// @ts-ignore: decorator +@builtin +export declare function isDefined(expression: void): bool; + +// @ts-ignore: decorator +@builtin +export declare function isConstant(expression: void): bool; + +// @ts-ignore: decorator +@builtin +export declare function isManaged(value?: T): bool; + +export function isNaN(value: T): bool { + if (!isFloat()) { + if (!isInteger()) ERROR("numeric type expected"); + } + return value != value; +} + +export function isFinite(value: T): bool { + if (!isFloat()) { + if (!isInteger()) ERROR("numeric type expected"); + } + return value - value == 0; +} + +// @ts-ignore: decorator +@builtin +export declare function clz(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function ctz(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function popcnt(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function rotl(value: T, shift: T): T; + +// @ts-ignore: decorator +@builtin +export declare function rotr(value: T, shift: T): T; + +// @ts-ignore: decorator +@builtin +export declare function abs(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function max(left: T, right: T): T; + +// @ts-ignore: decorator +@builtin +export declare function min(left: T, right: T): T; + +// @ts-ignore: decorator +@builtin +export declare function ceil(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function floor(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function copysign(left: T, right: T): T; + +// @ts-ignore: decorator +@builtin +export declare function nearest(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function reinterpret(value: number): T; + +// @ts-ignore: decorator +@builtin +export declare function sqrt(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function trunc(value: T): T; + +// @ts-ignore: decorator +@builtin +export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): T; + +// @ts-ignore: decorator +@builtin +export declare function store(offset: usize, value: void, immOffset?: usize, immAlign?: usize): void; + +// @ts-ignore: decorator +@builtin +export declare function sizeof(): usize; // | u32 / u64 + +// @ts-ignore: decorator +@builtin +export declare function alignof(): usize; // | u32 / u64 + +// @ts-ignore: decorator +@builtin +export declare function offsetof(fieldName?: string): usize; // | u32 / u64 + +// @ts-ignore: decorator +@builtin +export declare function select(ifTrue: T, ifFalse: T, condition: bool): T; + +// @ts-ignore: decorator +@builtin +export declare function unreachable(): void; + +// @ts-ignore: decorator +@builtin +export declare function changetype(value: void): T; + +// @ts-ignore: decorator +@builtin +export declare function assert(isTrueish: T, message?: string): T; + +// @ts-ignore: decorator +@builtin +export declare function unchecked(expr: T): T; + +// @ts-ignore: decorator +@builtin +export declare function call_indirect(target: void, ...args: void[]): T; + +// @ts-ignore: decorator +@builtin +export declare function call_direct(target: void, ...args: void[]): T; + +// @ts-ignore: decorator +@builtin +export declare function instantiate(...args: void[]): T; export namespace atomic { - @builtin export declare function load(offset: usize, immOffset?: usize): T; - @builtin export declare function store(offset: usize, value: T, immOffset?: usize): void; - @builtin export declare function add(ptr: usize, value: T, immOffset?: usize): T; - @builtin export declare function sub(ptr: usize, value: T, immOffset?: usize): T; - @builtin export declare function and(ptr: usize, value: T, immOffset?: usize): T; - @builtin export declare function or(ptr: usize, value: T, immOffset?: usize): T; - @builtin export declare function xor(ptr: usize, value: T, immOffset?: usize): T; - @builtin export declare function xchg(ptr: usize, value: T, immOffset?: usize): T; - @builtin export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T; - @builtin export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult; - @builtin export declare function notify(ptr: usize, count: i32): i32; + // @ts-ignore: decorator + @builtin + export declare function load(offset: usize, immOffset?: usize): T; + + // @ts-ignore: decorator + @builtin + export declare function store(offset: usize, value: T, immOffset?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function add(ptr: usize, value: T, immOffset?: usize): T; + + // @ts-ignore: decorator + @builtin + export declare function sub(ptr: usize, value: T, immOffset?: usize): T; + + // @ts-ignore: decorator + @builtin + export declare function and(ptr: usize, value: T, immOffset?: usize): T; + + // @ts-ignore: decorator + @builtin + export declare function or(ptr: usize, value: T, immOffset?: usize): T; + + // @ts-ignore: decorator + @builtin + export declare function xor(ptr: usize, value: T, immOffset?: usize): T; + + // @ts-ignore: decorator + @builtin + export declare function xchg(ptr: usize, value: T, immOffset?: usize): T; + + // @ts-ignore: decorator + @builtin + export declare function cmpxchg(ptr: usize, expected: T, replacement: T, immOffset?: usize): T; + + // @ts-ignore: decorator + @builtin + export declare function wait(ptr: usize, expected: T, timeout: i64): AtomicWaitResult; + + // @ts-ignore: decorator + @builtin + export declare function notify(ptr: usize, count: i32): i32; } -@lazy export const enum AtomicWaitResult { +// @ts-ignore: decorator +@lazy +export const enum AtomicWaitResult { OK = 0, NOT_EQUAL = 1, TIMED_OUT = 2 } -@builtin export declare function i8(value: void): i8; +// @ts-ignore: decorator +@builtin +export declare function i8(value: void): i8; + export namespace i8 { - @lazy export const MIN_VALUE: i8 = -128; - @lazy export const MAX_VALUE: i8 = 127; + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: i8 = -128; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: i8 = 127; } -@builtin export declare function i16(value: void): i16; +// @ts-ignore: decorator +@builtin +export declare function i16(value: void): i16; + export namespace i16 { - @lazy export const MIN_VALUE: i16 = -32768; - @lazy export const MAX_VALUE: i16 = 32767; + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: i16 = -32768; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: i16 = 32767; } -@builtin export declare function i32(value: void): i32; +// @ts-ignore: decorator +@builtin +export declare function i32(value: void): i32; + export namespace i32 { - @lazy export const MIN_VALUE: i32 = -2147483648; - @lazy export const MAX_VALUE: i32 = 2147483647; - @builtin export declare function clz(value: i32): i32; - @builtin export declare function ctz(value: i32): i32; - @builtin export declare function popcnt(value: i32): i32; - @builtin export declare function rotl(value: i32, shift: i32): i32; - @builtin export declare function rotr(value: i32, shift: i32): i32; - @builtin export declare function reinterpret_f32(value: f32): i32; - @builtin export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; - @builtin export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; - @builtin export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; - @builtin export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; - @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): i32; - @builtin export declare function store8(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; - @builtin export declare function store16(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; - @builtin export declare function store(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; - + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: i32 = -2147483648; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: i32 = 2147483647; + + // @ts-ignore: decorator + @builtin + export declare function clz(value: i32): i32; + + // @ts-ignore: decorator + @builtin + export declare function ctz(value: i32): i32; + + // @ts-ignore: decorator + @builtin + export declare function popcnt(value: i32): i32; + + // @ts-ignore: decorator + @builtin + export declare function rotl(value: i32, shift: i32): i32; + + // @ts-ignore: decorator + @builtin + export declare function rotr(value: i32, shift: i32): i32; + + // @ts-ignore: decorator + @builtin + export declare function reinterpret_f32(value: f32): i32; + + // @ts-ignore: decorator + @builtin + export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function store8(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store16(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store(offset: usize, value: i32, immOffset?: usize, immAlign?: usize): void; + export namespace atomic { - @builtin export declare function load8_u(offset: usize, immOffset?: usize): i32; - @builtin export declare function load16_u(offset: usize, immOffset?: usize): i32; - @builtin export declare function load(offset: usize, immOffset?: usize): i32; - @builtin export declare function store8(offset: usize, value: i32, immOffset?: usize): void; - @builtin export declare function store16(offset: usize, value: i32, immOffset?: usize): void; - @builtin export declare function store(offset: usize, value: i32, immOffset?: usize): void; - @builtin export declare function wait(ptr: usize, expected: i32, timeout: i64): AtomicWaitResult; + + // @ts-ignore: decorator + @builtin + export declare function load8_u(offset: usize, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function load16_u(offset: usize, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function load(offset: usize, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function store8(offset: usize, value: i32, immOffset?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store16(offset: usize, value: i32, immOffset?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store(offset: usize, value: i32, immOffset?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function wait(ptr: usize, expected: i32, timeout: i64): AtomicWaitResult; export namespace rmw8 { - @builtin export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } + export namespace rmw16 { - @builtin export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function add_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function sub_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function and_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function or_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function xor_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function xchg_u(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function cmpxchg_u(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } + export namespace rmw { - @builtin export declare function add(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function sub(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function and(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function or(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function xor(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function xchg(offset: usize, value: i32, immOffset?: usize): i32; - @builtin export declare function cmpxchg(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function add(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function sub(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function and(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function or(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function xor(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function xchg(offset: usize, value: i32, immOffset?: usize): i32; + + // @ts-ignore: decorator + @builtin + export declare function cmpxchg(offset: usize, expected: i32, replacement: i32, immOffset?: usize): i32; } } } -@builtin export declare function i64(value: void): i64; +// @ts-ignore: decorator +@builtin +export declare function i64(value: void): i64; + export namespace i64 { - @lazy export const MIN_VALUE: i64 = -9223372036854775808; - @lazy export const MAX_VALUE: i64 = 9223372036854775807; - @builtin export declare function clz(value: i64): i64; - @builtin export declare function ctz(value: i64): i64; - @builtin export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; - @builtin export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; - @builtin export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; - @builtin export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; - @builtin export declare function load32_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; - @builtin export declare function load32_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; - @builtin export declare function load(offset: usize, immOffset?: usize): i64; - @builtin export declare function popcnt(value: i64): i64; - @builtin export declare function rotl(value: i64, shift: i64): i64; - @builtin export declare function rotr(value: i64, shift: i64): i64; - @builtin export declare function reinterpret_f64(value: f64): i64; - @builtin export declare function store8(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; - @builtin export declare function store16(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; - @builtin export declare function store32(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; - @builtin export declare function store(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: i64 = -9223372036854775808; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: i64 = 9223372036854775807; + + // @ts-ignore: decorator + @builtin + export declare function clz(value: i64): i64; + + // @ts-ignore: decorator + @builtin + export declare function ctz(value: i64): i64; + + // @ts-ignore: decorator + @builtin + export declare function load8_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load8_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load16_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load16_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load32_s(offset: usize, immOffset?: usize, immAlign?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load32_u(offset: usize, immOffset?: usize, immAlign?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load(offset: usize, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function popcnt(value: i64): i64; + + // @ts-ignore: decorator + @builtin + export declare function rotl(value: i64, shift: i64): i64; + + // @ts-ignore: decorator + @builtin + export declare function rotr(value: i64, shift: i64): i64; + + // @ts-ignore: decorator + @builtin + export declare function reinterpret_f64(value: f64): i64; + + // @ts-ignore: decorator + @builtin + export declare function store8(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store16(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store32(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store(offset: usize, value: i64, immOffset?: usize, immAlign?: usize): void; export namespace atomic { - @builtin export declare function load8_u(offset: usize, immOffset?: usize): i64; - @builtin export declare function load16_u(offset: usize, immOffset?: usize): i64; - @builtin export declare function load32_u(offset: usize, immOffset?: usize): i64; - @builtin export declare function load(offset: usize, immOffset?: usize): i64; - @builtin export declare function store8(offset: usize, value: i64, immOffset?: usize): void; - @builtin export declare function store16(offset: usize, value: i64, immOffset?: usize): void; - @builtin export declare function store32(offset: usize, value: i64, immOffset?: usize): void; - @builtin export declare function store(offset: usize, value: i64, immOffset?: usize): void; - @builtin export declare function wait(ptr: usize, expected: i64, timeout: i64): AtomicWaitResult; + + // @ts-ignore: decorator + @builtin + export declare function load8_u(offset: usize, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load16_u(offset: usize, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load32_u(offset: usize, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function load(offset: usize, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function store8(offset: usize, value: i64, immOffset?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store16(offset: usize, value: i64, immOffset?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store32(offset: usize, value: i64, immOffset?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function store(offset: usize, value: i64, immOffset?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function wait(ptr: usize, expected: i64, timeout: i64): AtomicWaitResult; export namespace rmw8 { - @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } + export namespace rmw16 { - @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } + export namespace rmw32 { - @builtin export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function add_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function sub_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function and_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function or_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function xor_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function xchg_u(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function cmpxchg_u(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } + export namespace rmw { - @builtin export declare function add(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function sub(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function and(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function or(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function xor(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function xchg(offset: usize, value: i64, immOffset?: usize): i64; - @builtin export declare function cmpxchg(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function add(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function sub(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function and(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function or(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function xor(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function xchg(offset: usize, value: i64, immOffset?: usize): i64; + + // @ts-ignore: decorator + @builtin + export declare function cmpxchg(offset: usize, expected: i64, replacement: i64, immOffset?: usize): i64; } } } -@builtin export declare function isize(value: void): isize; +// @ts-ignore: decorator +@builtin +export declare function isize(value: void): isize; + export namespace isize { - @lazy export const MIN_VALUE: isize = sizeof() == sizeof() + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: isize = sizeof() == sizeof() ? -2147483648 : -9223372036854775808; - @lazy export const MAX_VALUE: isize = sizeof() == sizeof() + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: isize = sizeof() == sizeof() ? 2147483647 : 9223372036854775807; } -@builtin export declare function u8(value: void): u8; +// @ts-ignore: decorator +@builtin +export declare function u8(value: void): u8; + export namespace u8 { - @lazy export const MIN_VALUE: u8 = 0; - @lazy export const MAX_VALUE: u8 = 255; + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: u8 = 0; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: u8 = 255; } -@builtin export declare function u16(value: void): u16; +// @ts-ignore: decorator +@builtin +export declare function u16(value: void): u16; + export namespace u16 { - @lazy export const MIN_VALUE: u16 = 0; - @lazy export const MAX_VALUE: u16 = 65535; + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: u16 = 0; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: u16 = 65535; } -@builtin export declare function u32(value: void): u32; +// @ts-ignore: decorator +@builtin +export declare function u32(value: void): u32; + export namespace u32 { - @lazy export const MIN_VALUE: u32 = 0; - @lazy export const MAX_VALUE: u32 = 4294967295; + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: u32 = 0; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: u32 = 4294967295; } -@builtin export declare function u64(value: void): u64; +// @ts-ignore: decorator +@builtin +export declare function u64(value: void): u64; + export namespace u64 { - @lazy export const MIN_VALUE: u64 = 0; - @lazy export const MAX_VALUE: u64 = 18446744073709551615; + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: u64 = 0; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: u64 = 18446744073709551615; } -@builtin export declare function usize(value: void): usize; +// @ts-ignore: decorator +@builtin +export declare function usize(value: void): usize; + export namespace usize { - @lazy export const MIN_VALUE: usize = 0; - @lazy export const MAX_VALUE: usize = sizeof() == sizeof() + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: usize = 0; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: usize = sizeof() == sizeof() ? 4294967295 : 18446744073709551615; } -@builtin export declare function bool(value: void): bool; +// @ts-ignore: decorator +@builtin +export declare function bool(value: void): bool; + export namespace bool { - @lazy export const MIN_VALUE: bool = false; - @lazy export const MAX_VALUE: bool = true; + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE: bool = false; + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE: bool = true; } -@builtin export declare function f32(value: void): f32; +// @ts-ignore: decorator +@builtin +export declare function f32(value: void): f32; + export namespace f32 { - @lazy export const EPSILON = reinterpret(0x34000000); // 0x1p-23f - @lazy export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f - @lazy export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f - @lazy export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f - @lazy export const MIN_SAFE_INTEGER: f32 = -16777215; - @lazy export const MAX_SAFE_INTEGER: f32 = 16777215; - @builtin export declare function abs(value: f32): f32; - @builtin export declare function ceil(value: f32): f32; - @builtin export declare function copysign(x: f32, y: f32): f32; - @builtin export declare function floor(value: f32): f32; - @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f32; - @builtin export declare function max(left: f32, right: f32): f32; - @builtin export declare function min(left: f32, right: f32): f32; - @builtin export declare function nearest(value: f32): f32; - @builtin export declare function reinterpret_i32(value: i32): f32; - @builtin export declare function sqrt(value: f32): f32; - @builtin export declare function store(offset: usize, value: f32, immOffset?: usize, immAlign?: usize): void; - @builtin export declare function trunc(value: f32): f32; + + // @ts-ignore: decorator + @lazy + export const EPSILON = reinterpret(0x34000000); // 0x1p-23f + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE = reinterpret(0x00000001); // 0x0.000001p+0f + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f + + // @ts-ignore: decorator + @lazy + export const MIN_NORMAL_VALUE = reinterpret(0x00800000); // 0x1p-126f + + // @ts-ignore: decorator + @lazy + export const MIN_SAFE_INTEGER: f32 = -16777215; + + // @ts-ignore: decorator + @lazy + export const MAX_SAFE_INTEGER: f32 = 16777215; + + // @ts-ignore: decorator + @builtin + export declare function abs(value: f32): f32; + + // @ts-ignore: decorator + @builtin + export declare function ceil(value: f32): f32; + + // @ts-ignore: decorator + @builtin + export declare function copysign(x: f32, y: f32): f32; + + // @ts-ignore: decorator + @builtin + export declare function floor(value: f32): f32; + + // @ts-ignore: decorator + @builtin + export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f32; + + // @ts-ignore: decorator + @builtin + export declare function max(left: f32, right: f32): f32; + + // @ts-ignore: decorator + @builtin + export declare function min(left: f32, right: f32): f32; + + // @ts-ignore: decorator + @builtin + export declare function nearest(value: f32): f32; + + // @ts-ignore: decorator + @builtin + export declare function reinterpret_i32(value: i32): f32; + + // @ts-ignore: decorator + @builtin + export declare function sqrt(value: f32): f32; + + // @ts-ignore: decorator + @builtin + export declare function store(offset: usize, value: f32, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function trunc(value: f32): f32; } -@builtin export declare function f64(value: void): f64; +// @ts-ignore: decorator +@builtin +export declare function f64(value: void): f64; + export namespace f64 { - @lazy export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52 - @lazy export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0 - @lazy export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023 - @lazy export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022 - @lazy export const MIN_SAFE_INTEGER: f64 = -9007199254740991; - @lazy export const MAX_SAFE_INTEGER: f64 = 9007199254740991; - @builtin export declare function abs(value: f64): f64; - @builtin export declare function ceil(value: f64): f64; - @builtin export declare function copysign(x: f64, y: f64): f64; - @builtin export declare function floor(value: f64): f64; - @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f64; - @builtin export declare function max(left: f64, right: f64): f64; - @builtin export declare function min(left: f64, right: f64): f64; - @builtin export declare function nearest(value: f64): f64; - @builtin export declare function reinterpret_i64(value: i64): f64; - @builtin export declare function sqrt(value: f64): f64; - @builtin export declare function store(offset: usize, value: f64, immOffset?: usize, immAlign?: usize): void; - @builtin export declare function trunc(value: f64): f64; + + // @ts-ignore: decorator + @lazy + export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52 + + // @ts-ignore: decorator + @lazy + export const MIN_VALUE = reinterpret(0x0000000000000001); // 0x0.0000000000001p+0 + + // @ts-ignore: decorator + @lazy + export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023 + + // @ts-ignore: decorator + @lazy + export const MIN_NORMAL_VALUE = reinterpret(0x0010000000000000); // 0x1p-1022 + + // @ts-ignore: decorator + @lazy + export const MIN_SAFE_INTEGER: f64 = -9007199254740991; + + // @ts-ignore: decorator + @lazy + export const MAX_SAFE_INTEGER: f64 = 9007199254740991; + + // @ts-ignore: decorator + @builtin + export declare function abs(value: f64): f64; + + // @ts-ignore: decorator + @builtin + export declare function ceil(value: f64): f64; + + // @ts-ignore: decorator + @builtin + export declare function copysign(x: f64, y: f64): f64; + + // @ts-ignore: decorator + @builtin + export declare function floor(value: f64): f64; + + // @ts-ignore: decorator + @builtin + export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): f64; + + // @ts-ignore: decorator + @builtin + export declare function max(left: f64, right: f64): f64; + + // @ts-ignore: decorator + @builtin + export declare function min(left: f64, right: f64): f64; + + // @ts-ignore: decorator + @builtin + export declare function nearest(value: f64): f64; + + // @ts-ignore: decorator + @builtin + export declare function reinterpret_i64(value: i64): f64; + + // @ts-ignore: decorator + @builtin + export declare function sqrt(value: f64): f64; + + // @ts-ignore: decorator + @builtin + export declare function store(offset: usize, value: f64, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function trunc(value: f64): f64; } -@builtin export declare function v128(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128; +// @ts-ignore: decorator +@builtin +export declare function v128( + a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, + i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8 +): v128; + export namespace v128 { - @builtin export declare function splat(x: T): v128; - @builtin export declare function extract_lane(x: v128, idx: u8): T; - @builtin export declare function replace_lane(x: v128, idx: u8, value: T): v128; - @builtin export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128; - @builtin export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): v128; - @builtin export declare function store(offset: usize, value: v128, immOffset?: usize, immAlign?: usize): void; - @builtin export declare function add(a: v128, b: v128): v128; - @builtin export declare function sub(a: v128, b: v128): v128; - @builtin export declare function mul(a: v128, b: v128): v128; // except i64 - @builtin export declare function div(a: v128, b: v128): v128; // f32, f64 only - @builtin export declare function neg(a: v128): v128; - @builtin export declare function add_saturate(a: v128, b: v128): v128; - @builtin export declare function sub_saturate(a: v128, b: v128): v128; - @builtin export declare function shl(a: v128, b: i32): v128; - @builtin export declare function shr(a: v128, b: i32): v128; - @builtin export declare function and(a: v128, b: v128): v128; - @builtin export declare function or(a: v128, b: v128): v128; - @builtin export declare function xor(a: v128, b: v128): v128; - @builtin export declare function not(a: v128): v128; - @builtin export declare function bitselect(v1: v128, v2: v128, c: v128): v128; - @builtin export declare function any_true(a: v128): bool; - @builtin export declare function all_true(a: v128): bool; - @builtin export declare function min(a: v128, b: v128): v128; // f32, f64 only - @builtin export declare function max(a: v128, b: v128): v128; // f32, f64 only - @builtin export declare function abs(a: v128): v128; // f32, f64 only - @builtin export declare function sqrt(a: v128): v128; // f32, f64 only - @builtin export declare function eq(a: v128, b: v128): v128; - @builtin export declare function ne(a: v128, b: v128): v128; - @builtin export declare function lt(a: v128, b: v128): v128; - @builtin export declare function le(a: v128, b: v128): v128; - @builtin export declare function gt(a: v128, b: v128): v128; - @builtin export declare function ge(a: v128, b: v128): v128; - @builtin export declare function convert(a: v128): v128; - @builtin export declare function trunc(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function splat(x: T): v128; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane(x: v128, idx: u8): T; + + // @ts-ignore: decorator + @builtin + export declare function replace_lane(x: v128, idx: u8, value: T): v128; + + // @ts-ignore: decorator + @builtin + export declare function shuffle(a: v128, b: v128, ...lanes: u8[]): v128; + + // @ts-ignore: decorator + @builtin + export declare function load(offset: usize, immOffset?: usize, immAlign?: usize): v128; + + // @ts-ignore: decorator + @builtin + export declare function store(offset: usize, value: v128, immOffset?: usize, immAlign?: usize): void; + + // @ts-ignore: decorator + @builtin + export declare function add(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function mul(a: v128, b: v128): v128; // except i64 + + // @ts-ignore: decorator + @builtin + export declare function div(a: v128, b: v128): v128; // f32, f64 only + + // @ts-ignore: decorator + @builtin + export declare function neg(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function add_saturate(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub_saturate(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function shl(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function and(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function or(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function xor(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function not(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function bitselect(v1: v128, v2: v128, c: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function any_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function all_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function min(a: v128, b: v128): v128; // f32, f64 only + + // @ts-ignore: decorator + @builtin + export declare function max(a: v128, b: v128): v128; // f32, f64 only + + // @ts-ignore: decorator + @builtin + export declare function abs(a: v128): v128; // f32, f64 only + + // @ts-ignore: decorator + @builtin + export declare function sqrt(a: v128): v128; // f32, f64 only + + // @ts-ignore: decorator + @builtin + export declare function eq(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ne(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function convert(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function trunc(a: v128): v128; } -@builtin export declare function i8x16(a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8): v128; +// @ts-ignore: decorator +@builtin +export declare function i8x16( + a: i8, b: i8, c: i8, d: i8, e: i8, f: i8, g: i8, h: i8, + i: i8, j: i8, k: i8, l: i8, m: i8, n: i8, o: i8, p: i8 +): v128; + export namespace i8x16 { - @builtin export declare function splat(x: i8): v128; - @builtin export declare function extract_lane_s(x: v128, idx: u8): i8; - @builtin export declare function extract_lane_u(x: v128, idx: u8): u8; - @builtin export declare function replace_lane(x: v128, idx: u8, value: i8): v128; - @builtin export declare function add(a: v128, b: v128): v128; - @builtin export declare function sub(a: v128, b: v128): v128; - @builtin export declare function mul(a: v128, b: v128): v128; - @builtin export declare function neg(a: v128): v128; - @builtin export declare function add_saturate_s(a: v128, b: v128): v128; - @builtin export declare function add_saturate_u(a: v128, b: v128): v128; - @builtin export declare function sub_saturate_s(a: v128, b: v128): v128; - @builtin export declare function sub_saturate_u(a: v128, b: v128): v128; - @builtin export declare function shl(a: v128, b: i32): v128; - @builtin export declare function shr_s(a: v128, b: i32): v128; - @builtin export declare function shr_u(a: v128, b: i32): v128; - @builtin export declare function any_true(a: v128): bool; - @builtin export declare function all_true(a: v128): bool; - @builtin export declare function eq(a: v128, b: v128): v128; - @builtin export declare function ne(a: v128, b: v128): v128; - @builtin export declare function lt_s(a: v128, b: v128): v128; - @builtin export declare function lt_u(a: v128, b: v128): v128; - @builtin export declare function le_s(a: v128, b: v128): v128; - @builtin export declare function le_u(a: v128, b: v128): v128; - @builtin export declare function gt_s(a: v128, b: v128): v128; - @builtin export declare function gt_u(a: v128, b: v128): v128; - @builtin export declare function ge_s(a: v128, b: v128): v128; - @builtin export declare function ge_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function splat(x: i8): v128; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane_s(x: v128, idx: u8): i8; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane_u(x: v128, idx: u8): u8; + + // @ts-ignore: decorator + @builtin + export declare function replace_lane(x: v128, idx: u8, value: i8): v128; + + // @ts-ignore: decorator + @builtin + export declare function add(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function mul(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function neg(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function add_saturate_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function add_saturate_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub_saturate_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub_saturate_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function shl(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr_s(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr_u(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function any_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function all_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function eq(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ne(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge_u(a: v128, b: v128): v128; } -@builtin export declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128; +// @ts-ignore: decorator +@builtin +export declare function i16x8(a: i16, b: i16, c: i16, d: i16, e: i16, f: i16, g: i16, h: i16): v128; + export namespace i16x8 { - @builtin export declare function splat(x: i16): v128; - @builtin export declare function extract_lane_s(x: v128, idx: u8): i16; - @builtin export declare function extract_lane_u(x: v128, idx: u8): u16; - @builtin export declare function replace_lane(x: v128, idx: u8, value: i16): v128; - @builtin export declare function add(a: v128, b: v128): v128; - @builtin export declare function sub(a: v128, b: v128): v128; - @builtin export declare function mul(a: v128, b: v128): v128; - @builtin export declare function neg(a: v128): v128; - @builtin export declare function add_saturate_s(a: v128, b: v128): v128; - @builtin export declare function add_saturate_u(a: v128, b: v128): v128; - @builtin export declare function sub_saturate_s(a: v128, b: v128): v128; - @builtin export declare function sub_saturate_u(a: v128, b: v128): v128; - @builtin export declare function shl(a: v128, b: i32): v128; - @builtin export declare function shr_s(a: v128, b: i32): v128; - @builtin export declare function shr_u(a: v128, b: i32): v128; - @builtin export declare function any_true(a: v128): bool; - @builtin export declare function all_true(a: v128): bool; - @builtin export declare function eq(a: v128, b: v128): v128; - @builtin export declare function ne(a: v128, b: v128): v128; - @builtin export declare function lt_s(a: v128, b: v128): v128; - @builtin export declare function lt_u(a: v128, b: v128): v128; - @builtin export declare function le_s(a: v128, b: v128): v128; - @builtin export declare function le_u(a: v128, b: v128): v128; - @builtin export declare function gt_s(a: v128, b: v128): v128; - @builtin export declare function gt_u(a: v128, b: v128): v128; - @builtin export declare function ge_s(a: v128, b: v128): v128; - @builtin export declare function ge_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function splat(x: i16): v128; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane_s(x: v128, idx: u8): i16; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane_u(x: v128, idx: u8): u16; + + // @ts-ignore: decorator + @builtin + export declare function replace_lane(x: v128, idx: u8, value: i16): v128; + + // @ts-ignore: decorator + @builtin + export declare function add(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function mul(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function neg(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function add_saturate_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function add_saturate_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub_saturate_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub_saturate_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function shl(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr_s(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr_u(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function any_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function all_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function eq(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ne(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge_u(a: v128, b: v128): v128; } -@builtin export declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128; +// @ts-ignore: decorator +@builtin +export declare function i32x4(a: i32, b: i32, c: i32, d: i32): v128; + export namespace i32x4 { - @builtin export declare function splat(x: i32): v128; - @builtin export declare function extract_lane(x: v128, idx: u8): i32; - @builtin export declare function replace_lane(x: v128, idx: u8, value: i32): v128; - @builtin export declare function add(a: v128, b: v128): v128; - @builtin export declare function sub(a: v128, b: v128): v128; - @builtin export declare function mul(a: v128, b: v128): v128; - @builtin export declare function neg(a: v128): v128; - @builtin export declare function shl(a: v128, b: i32): v128; - @builtin export declare function shr_s(a: v128, b: i32): v128; - @builtin export declare function shr_u(a: v128, b: i32): v128; - @builtin export declare function any_true(a: v128): bool; - @builtin export declare function all_true(a: v128): bool; - @builtin export declare function eq(a: v128, b: v128): v128; - @builtin export declare function ne(a: v128, b: v128): v128; - @builtin export declare function lt_s(a: v128, b: v128): v128; - @builtin export declare function lt_u(a: v128, b: v128): v128; - @builtin export declare function le_s(a: v128, b: v128): v128; - @builtin export declare function le_u(a: v128, b: v128): v128; - @builtin export declare function gt_s(a: v128, b: v128): v128; - @builtin export declare function gt_u(a: v128, b: v128): v128; - @builtin export declare function ge_s(a: v128, b: v128): v128; - @builtin export declare function ge_u(a: v128, b: v128): v128; - @builtin export declare function trunc_s_f32x4_sat(a: v128): v128; - @builtin export declare function trunc_u_f32x4_sat(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function splat(x: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane(x: v128, idx: u8): i32; + + // @ts-ignore: decorator + @builtin + export declare function replace_lane(x: v128, idx: u8, value: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function add(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function mul(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function neg(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function shl(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr_s(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr_u(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function any_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function all_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function eq(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ne(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge_s(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge_u(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function trunc_s_f32x4_sat(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function trunc_u_f32x4_sat(a: v128): v128; } -@builtin export declare function i64x2(a: i64, b: i64): v128; +// @ts-ignore: decorator +@builtin +export declare function i64x2(a: i64, b: i64): v128; + export namespace i64x2 { - @builtin export declare function splat(x: i64): v128; - @builtin export declare function extract_lane(x: v128, idx: u8): i64; - @builtin export declare function replace_lane(x: v128, idx: u8, value: i64): v128; - @builtin export declare function add(a: v128, b: v128): v128; - @builtin export declare function sub(a: v128, b: v128): v128; - @builtin export declare function mul(a: v128, b: v128): v128; - @builtin export declare function neg(a: v128): v128; - @builtin export declare function shl(a: v128, b: i32): v128; - @builtin export declare function shr_s(a: v128, b: i32): v128; - @builtin export declare function shr_u(a: v128, b: i32): v128; - @builtin export declare function any_true(a: v128): bool; - @builtin export declare function all_true(a: v128): bool; - @builtin export declare function trunc_s_f64x2_sat(a: v128): v128; - @builtin export declare function trunc_u_f64x2_sat(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function splat(x: i64): v128; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane(x: v128, idx: u8): i64; + + // @ts-ignore: decorator + @builtin + export declare function replace_lane(x: v128, idx: u8, value: i64): v128; + + // @ts-ignore: decorator + @builtin + export declare function add(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function mul(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function neg(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function shl(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr_s(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function shr_u(a: v128, b: i32): v128; + + // @ts-ignore: decorator + @builtin + export declare function any_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function all_true(a: v128): bool; + + // @ts-ignore: decorator + @builtin + export declare function trunc_s_f64x2_sat(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function trunc_u_f64x2_sat(a: v128): v128; } -@builtin export declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128; +// @ts-ignore: decorator +@builtin +export declare function f32x4(a: f32, b: f32, c: f32, d: f32): v128; + export namespace f32x4 { - @builtin export declare function splat(x: f32): v128; - @builtin export declare function extract_lane(x: v128, idx: u8): f32; - @builtin export declare function replace_lane(x: v128, idx: u8, value: f32): v128; - @builtin export declare function add(a: v128, b: v128): v128; - @builtin export declare function sub(a: v128, b: v128): v128; - @builtin export declare function mul(a: v128, b: v128): v128; - @builtin export declare function div(a: v128, b: v128): v128; - @builtin export declare function neg(a: v128): v128; - @builtin export declare function min(a: v128, b: v128): v128; - @builtin export declare function max(a: v128, b: v128): v128; - @builtin export declare function abs(a: v128): v128; - @builtin export declare function sqrt(a: v128): v128; - @builtin export declare function eq(a: v128, b: v128): v128; - @builtin export declare function ne(a: v128, b: v128): v128; - @builtin export declare function lt(a: v128, b: v128): v128; - @builtin export declare function le(a: v128, b: v128): v128; - @builtin export declare function gt(a: v128, b: v128): v128; - @builtin export declare function ge(a: v128, b: v128): v128; - @builtin export declare function convert_s_i32x4(a: v128): v128; - @builtin export declare function convert_u_i32x4(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function splat(x: f32): v128; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane(x: v128, idx: u8): f32; + + // @ts-ignore: decorator + @builtin + export declare function replace_lane(x: v128, idx: u8, value: f32): v128; + + // @ts-ignore: decorator + @builtin + export declare function add(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function mul(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function div(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function neg(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function min(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function max(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function abs(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sqrt(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function eq(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ne(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function convert_s_i32x4(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function convert_u_i32x4(a: v128): v128; } -@builtin export declare function f64x2(a: f64, b: f64): v128; +// @ts-ignore: decorator +@builtin +export declare function f64x2(a: f64, b: f64): v128; + export namespace f64x2 { - @builtin export declare function splat(x: f64): v128; - @builtin export declare function extract_lane(x: v128, idx: u8): f64; - @builtin export declare function replace_lane(x: v128, idx: u8, value: f64): v128; - @builtin export declare function add(a: v128, b: v128): v128; - @builtin export declare function sub(a: v128, b: v128): v128; - @builtin export declare function mul(a: v128, b: v128): v128; - @builtin export declare function div(a: v128, b: v128): v128; - @builtin export declare function neg(a: v128): v128; - @builtin export declare function min(a: v128, b: v128): v128; - @builtin export declare function max(a: v128, b: v128): v128; - @builtin export declare function abs(a: v128): v128; - @builtin export declare function sqrt(a: v128): v128; - @builtin export declare function eq(a: v128, b: v128): v128; - @builtin export declare function ne(a: v128, b: v128): v128; - @builtin export declare function lt(a: v128, b: v128): v128; - @builtin export declare function le(a: v128, b: v128): v128; - @builtin export declare function gt(a: v128, b: v128): v128; - @builtin export declare function ge(a: v128, b: v128): v128; - @builtin export declare function convert_s_i64x2(a: v128): v128; - @builtin export declare function convert_u_i64x2(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function splat(x: f64): v128; + + // @ts-ignore: decorator + @builtin + export declare function extract_lane(x: v128, idx: u8): f64; + + // @ts-ignore: decorator + @builtin + export declare function replace_lane(x: v128, idx: u8, value: f64): v128; + + // @ts-ignore: decorator + @builtin + export declare function add(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sub(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function mul(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function div(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function neg(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function min(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function max(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function abs(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function sqrt(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function eq(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ne(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function lt(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function le(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function gt(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function ge(a: v128, b: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function convert_s_i64x2(a: v128): v128; + + // @ts-ignore: decorator + @builtin + export declare function convert_u_i64x2(a: v128): v128; } export namespace v8x16 { - @builtin export declare function shuffle(a: v128, b: v128, l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8): v128; + + // @ts-ignore: decorator + @builtin + export declare function shuffle( + a: v128, b: v128, + l0: u8, l1: u8, l2: u8, l3: u8, l4: u8, l5: u8, l6: u8, l7: u8, + l8: u8, l9: u8, l10: u8, l11: u8, l12: u8, l13: u8, l14: u8, l15: u8 + ): v128; } -@builtin export declare function start(): void; +// @ts-ignore: decorator +@builtin +export declare function ERROR(message?: string): void; + +// @ts-ignore: decorator +@builtin +export declare function WARNING(message?: string): void; + +// @ts-ignore: decorator +@builtin +export declare function INFO(message?: string): void; + +// @ts-ignore: decorator +@external("env", "abort") +declare function abort( + message?: string | null, + fileName?: string | null, + lineNumber?: u32, + columnNumber?: u32 +): void; + +// @ts-ignore: decorator +@external("env", "trace") +declare function trace( + message: string, + n?: i32, + a0?: f64, + a1?: f64, + a2?: f64, + a3?: f64, + a4?: f64 +): void; diff --git a/std/assembly/collector/README.md b/std/assembly/collector/README.md new file mode 100644 index 0000000000..d6071fca79 --- /dev/null +++ b/std/assembly/collector/README.md @@ -0,0 +1,113 @@ +Garbage collector interface +=========================== + +A garbage collector for AssemblyScript must implement the following common and either the tracing or reference counting interfaces: + +Common +------ + +* **__ref_collect**(): `void`
+ Triggers a full garbage collection cycle. Also indicates the presence of a GC. + +Tracing +------- + +* **__ref_register**(ref: `usize`): `void`
+ Sets up a new reference. + +* **__ref_link**(ref: `usize`, parentRef: `usize`): `void`
+ Links a reference to a parent that is now referencing it. + +* **__ref_unlink**(ref: `usize`, parentRef: `usize`): `void`
+ Unlinks a reference from a parent that was referencing it. Implementation is optional. + +* **__ref_mark**(ref: `usize`): `void`
+ Marks a reference as being reachable so it doesn't become sweeped. + +Reference counting +------------------ + +* **__ref_register**(ref: `usize`): `void`
+ Sets up a new reference. Implementation is optional. + +* **__ref_retain**(ref: `usize`): `void`
+ Retains a reference, usually incrementing RC. + +* **__ref_release**(ref: `usize`): `void`
+ Releases a reference, usually decrementing RC. + +Typical patterns +---------------- + +Standard library components make use of the interface where managed references are stored or deleted. Common patterns are: + +### General + +```ts +/// + +if (isManaged()) { + // compiled only if T is a managed reference + ... pattern ... +} +``` + +### Insertion + +```ts +if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, parentRef); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } +} else { + if (isDefined(__ref_link)) __ref_link(ref, parentRef); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); +} +``` + +### Replacement + +```ts +if (ref !== oldRef) { + if (isNullable()) { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) if (oldRef) __ref_unlink(oldRef, parentRef); + if (ref) __ref_link(ref, parentRef); + } else if (isDefined(__ref_retain)) { + if (oldRef) __ref_release(oldRef); + if (ref) __ref_retain(ref); + } else assert(false); + } else { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) if (oldRef) __ref_unlink(oldRef, parentRef); // * + __ref_link(ref, parentRef); + } else if (isDefined(__ref_retain)) { + if (oldRef) __ref_release(oldRef); // * + __ref_retain(ref); + } else assert(false); + } +} +``` + +### Deletion + +```ts +if (isNullable()) { + if (ref) { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(ref, parentRef); + } else if (isDefined(__ref_retain)) __ref_release(ref); + else assert(false); + } +} else { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(ref, parentRef); + } else if (isDefined(__ref_retain)) __ref_release(ref); + else assert(false); +} +``` + +(*) Note that some data structures may contain `null` values even though the value type isn't nullable. May be the case when appending a new element to an array for example. diff --git a/std/assembly/collector/dummy.ts b/std/assembly/collector/dummy.ts new file mode 100644 index 0000000000..231e8e90c0 --- /dev/null +++ b/std/assembly/collector/dummy.ts @@ -0,0 +1,37 @@ +// A tracing dummy GC. + +// @ts-ignore: decorator +@inline +const TRACE = isDefined(GC_TRACE); + +// @ts-ignore: decorator +@global @unsafe +function __ref_register(ref: usize): void { + if (TRACE) trace("dummy.register", 1, ref); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_collect(): void { + if (TRACE) trace("dummy.collect"); +} + +// Tracing + +// @ts-ignore: decorator +@global @unsafe +function __ref_link(ref: usize, parentRef: usize): void { + if (TRACE) trace("dummy.link", 2, ref, parentRef); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_unlink(ref: usize, parentRef: usize): void { + if (TRACE) trace("dummy.unlink", 2, ref, parentRef); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_mark(ref: usize): void { + if (TRACE) trace("dummy.mark", 1, ref); +} diff --git a/std/assembly/collector/dummyrc.ts b/std/assembly/collector/dummyrc.ts new file mode 100644 index 0000000000..676e8deb94 --- /dev/null +++ b/std/assembly/collector/dummyrc.ts @@ -0,0 +1,29 @@ +// A reference counting dummy GC. + +// @ts-ignore: decorator +@inline +const TRACE = isDefined(GC_TRACE); + +// @ts-ignore: decorator +@global @unsafe +function __ref_register(ref: usize): void { + if (TRACE) trace("dummyrc.register", 1, ref); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_collect(): void { + if (TRACE) trace("dummyrc.collect"); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_retain(ref: usize): void { + if (TRACE) trace("dummyrc.retain", 1, ref); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_release(ref: usize): void { + if (TRACE) trace("dummyrc.release", 1, ref); +} diff --git a/std/assembly/collector/index.d.ts b/std/assembly/collector/index.d.ts new file mode 100644 index 0000000000..74a44d041e --- /dev/null +++ b/std/assembly/collector/index.d.ts @@ -0,0 +1,15 @@ +// common +declare function __ref_collect(): void; +declare function __ref_register(ref: usize): void; + +// tracing +declare function __ref_link(ref: usize, parentRef: usize): void; +declare function __ref_unlink(ref: usize, parentRef: usize): void; +declare function __ref_mark(ref: usize): void; + +// reference counting +declare function __ref_retain(ref: usize): void; +declare function __ref_release(ref: usize): void; + +// debugging +declare const GC_TRACE: bool; diff --git a/std/assembly/collector/itcm.ts b/std/assembly/collector/itcm.ts index 0dbeb5487c..83fa90e873 100644 --- a/std/assembly/collector/itcm.ts +++ b/std/assembly/collector/itcm.ts @@ -1,18 +1,11 @@ -/** - * Incremental Tri-Color-Marking Garbage Collector. - * - * @module std/assembly/collector/itcm - *//***/ - // Largely based on Bach Le's μgc, see: https://github.com/bullno1/ugc -@inline const TRACE = false; - -/** Size of a managed object header. */ -@inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; +// @ts-ignore: decorator +@inline +const TRACE = isDefined(GC_TRACE); -import { AL_MASK, MAX_SIZE_32 } from "../internal/allocator"; -import { iterateRoots } from "../gc"; +import { HEADER_SIZE } from "../util/runtime"; +import { __gc_mark_roots, __gc_mark_members } from "../runtime"; /** Collector states. */ const enum State { @@ -27,13 +20,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) ════════════════╕ @@ -53,6 +56,11 @@ var iter: ManagedObject; /** Represents a managed object in memory, consisting of a header followed by the object's data. */ @unmanaged class ManagedObject { + //
+ classId: u32; + payloadSize: u32; + //
+ /** Pointer to the next object with color flags stored in the alignment bits. */ nextWithColor: usize; @@ -60,7 +68,9 @@ var iter: ManagedObject; prev: ManagedObject; /** Class-specific hook function called with the user-space reference. */ - hookFn: (ref: usize) => void; + get hookFn(): (ref: usize) => void { + return changetype<(ref: usize) => void>(this.classId); + } /** Gets the pointer to the next object. */ get next(): ManagedObject { @@ -86,14 +96,14 @@ var iter: ManagedObject; unlink(): void { var next = this.next; var prev = this.prev; - if (TRACE) trace(" unlink", 3, objToRef(prev), objToRef(this), objToRef(next)); + if (TRACE) trace(" unlink [pref, ref, next]", 3, objToRef(prev), objToRef(this), objToRef(next)); next.prev = prev; prev.next = next; } /** Marks this object as gray, that is reachable with unscanned children. */ makeGray(): void { - if (TRACE) trace(" makeGray", 1, objToRef(this)); + if (TRACE) trace(" makeGray", 1, objToRef(this)); const gray = 2; if (this == iter) iter = this.prev; this.unlink(); @@ -108,7 +118,7 @@ var iter: ManagedObject; /** Inserts an object. */ push(obj: ManagedObject): void { var prev = this.prev; - if (TRACE) trace(" push", 3, objToRef(prev), objToRef(obj), objToRef(this)); + if (TRACE) trace(" push [prev, ref, next]", 3, objToRef(prev), objToRef(obj), objToRef(this)); obj.next = this; obj.prev = prev; prev.next = obj; @@ -117,62 +127,62 @@ var iter: ManagedObject; /** Clears this list. */ clear(): void { - if (TRACE) trace(" clear", 1, objToRef(this)); + if (TRACE) trace(" clear", 1, objToRef(this)); this.nextWithColor = changetype(this); this.prev = this; } } +function maybeInit(): void { + if (state == State.INIT) { + if (TRACE) trace("itcm~init"); + fromSpace = changetype(memory.allocate(HEADER_SIZE)); + if (TRACE) trace(" fromSpace =", 1, objToRef(fromSpace)); + fromSpace.classId = -1; // would error + fromSpace.payloadSize = 0; + fromSpace.clear(); + toSpace = changetype(memory.allocate(HEADER_SIZE)); + if (TRACE) trace(" toSpace =", 1, objToRef(toSpace)); + toSpace.classId = -1; // would error + toSpace.payloadSize = 0; + toSpace.clear(); + iter = toSpace; + state = State.IDLE; + if (TRACE) trace("itcm~state = IDLE"); + } +} + /** Performs a single step according to the current state. */ function step(): void { var obj: ManagedObject; switch (state) { - case State.INIT: { - if (TRACE) trace("gc~step/INIT"); - fromSpace = changetype(memory.allocate(HEADER_SIZE)); - fromSpace.hookFn = changetype<(ref: usize) => void>(-1); // would error - fromSpace.clear(); - toSpace = changetype(memory.allocate(HEADER_SIZE)); - toSpace.hookFn = changetype<(ref: usize) => void>(-1); // would error - toSpace.clear(); - iter = toSpace; - state = State.IDLE; - if (TRACE) trace("gc~state = IDLE"); - // fall-through - } + case State.INIT: unreachable(); case State.IDLE: { - if (TRACE) trace("gc~step/IDLE"); - iterateRoots(__gc_mark); + if (TRACE) trace("itcm~step/IDLE"); + __gc_mark_roots(); state = State.MARK; - if (TRACE) trace("gc~state = MARK"); + if (TRACE) trace("itcm~state = MARK"); break; } case State.MARK: { obj = iter.next; if (obj !== toSpace) { - if (TRACE) trace("gc~step/MARK iterate", 1, objToRef(obj)); + if (TRACE) trace("itcm~step/MARK", 1, objToRef(obj)); iter = obj; - obj.color = !white; - // if (TRACE) { - // trace(" next/prev/hook", 3, - // changetype(obj.next), - // changetype(obj.prev), - // changetype(obj.hookFn) - // ); - // } - obj.hookFn(objToRef(obj)); + obj.color = i32(!white); + __gc_mark_members(obj.classId, objToRef(obj)); } else { - if (TRACE) trace("gc~step/MARK finish"); - iterateRoots(__gc_mark); + __gc_mark_roots(); + if (TRACE) trace("itcm~step/MARK finish"); obj = iter.next; if (obj === toSpace) { let from = fromSpace; fromSpace = toSpace; toSpace = from; - white = !white; + white = i32(!white); iter = from.next; state = State.SWEEP; - if (TRACE) trace("gc~state = SWEEP"); + if (TRACE) trace("itcm~state = SWEEP"); } } break; @@ -180,65 +190,69 @@ function step(): void { case State.SWEEP: { obj = iter; if (obj !== toSpace) { - if (TRACE) trace("gc~step/SWEEP free", 1, objToRef(obj)); + if (TRACE) trace("itcm~step/SWEEP free", 1, objToRef(obj)); iter = obj.next; if (changetype(obj) >= HEAP_BASE) memory.free(changetype(obj)); } else { - if (TRACE) trace("gc~step/SWEEP finish"); + if (TRACE) trace("itcm~step/SWEEP finish"); toSpace.clear(); state = State.IDLE; - if (TRACE) trace("gc~state = IDLE"); + if (TRACE) trace("itcm~state = IDLE"); } break; } } } -@inline function refToObj(ref: usize): ManagedObject { +// @ts-ignore: decorator +@inline +function refToObj(ref: usize): ManagedObject { return changetype(ref - HEADER_SIZE); } -@inline function objToRef(obj: ManagedObject): usize { +// @ts-ignore: decorator +@inline +function objToRef(obj: ManagedObject): usize { return changetype(obj) + HEADER_SIZE; } // Garbage collector interface -@global export function __gc_allocate( - size: usize, - markFn: (ref: usize) => void -): usize { - if (TRACE) trace("gc.allocate", 1, size); - if (size > MAX_SIZE_32 - HEADER_SIZE) unreachable(); - step(); // also makes sure it's initialized - var obj = changetype(memory.allocate(HEADER_SIZE + size)); - obj.hookFn = markFn; - obj.color = white; - fromSpace.push(obj); - return objToRef(obj); +// @ts-ignore: decorator +@global @unsafe +export function __ref_collect(): void { + if (TRACE) trace("itcm.collect"); + maybeInit(); + // finish the current state + while (state != State.IDLE) step(); + // perform a full cycle + do step(); while (state != State.IDLE); } -@global export function __gc_link(parentRef: usize, childRef: usize): void { - if (TRACE) trace("gc.link", 2, parentRef, childRef); - var parent = refToObj(parentRef); - if (parent.color == !white && refToObj(childRef).color == white) parent.makeGray(); +// @ts-ignore: decorator +@global @unsafe +export function __ref_register(ref: usize): void { + if (TRACE) trace("itcm.register", 1, ref); + maybeInit(); + var obj = refToObj(ref); + obj.color = white; + fromSpace.push(obj); // sets gc-reserved header fields } -@global export function __gc_mark(ref: usize): void { - if (TRACE) trace("gc.mark", 1, ref); - if (ref) { - let obj = refToObj(ref); - if (obj.color == white) obj.makeGray(); - } +// @ts-ignore: decorator +@global @unsafe +export function __ref_link(ref: usize, parentRef: usize): void { + if (TRACE) trace("itcm.link", 2, ref, parentRef); + maybeInit(); + var parent = refToObj(parentRef); + if (parent.color == i32(!white) && refToObj(ref).color == white) parent.makeGray(); } -@global export function __gc_collect(): void { - if (TRACE) trace("gc.collect"); - // begin collecting if not yet collecting - switch (state) { - case State.INIT: - case State.IDLE: step(); - } - // finish the cycle - while (state != State.IDLE) step(); +// @ts-ignore: decorator +@global @unsafe +export function __ref_mark(ref: usize): void { + if (TRACE) trace("itcm.mark", 1, ref); + maybeInit(); + var obj = refToObj(ref); + if (obj.color == white) obj.makeGray(); } diff --git a/std/assembly/collector/pure.ts b/std/assembly/collector/pure.ts new file mode 100644 index 0000000000..8b977fcdfd --- /dev/null +++ b/std/assembly/collector/pure.ts @@ -0,0 +1,269 @@ +// A Pure Reference Counting Garbage Collector +// +// After the paper by D. Bacon et al., 2001, IBM T.J. Watson Research Center +// https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf + +import { HEADER_SIZE } from "../util/runtime"; + +ERROR("not implemented"); + +/* tslint:disable */ + +// TODO: new builtins +declare function ITERATECHILDREN(s: Header, fn: (t: Header) => void): void; +declare function ISACYCLIC(s: Header): bool; + +/** Object Colorings for Cycle Collection */ +const enum Color { + /** In use or free. */ + BLACK = 0, + /** Possible member of cycle. */ + GRAY = 1, + /** Member of garbage cycle. */ + WHITE = 2, + /** Possible root of cycle. */ + PURPLE = 3, + /** Acyclic. */ + GREEN = 4 +} + +// TODO: this is a placeholder -> map this to HEADER +class Header { + rc: u32; + color: Color; + buffered: bool; +} + +// When reference counts are decremented, we place potential roots of cyclic garbage into a buffer +// called Roots. Periodically, we process this buffer and look for cycles by subtracting internal +// reference counts. + +var rootsBuffer: usize = 0; +var rootsOffset: usize = 0; // insertion offset +var rootsLength: usize = 0; // insertion limit + +function appendRoot(s: Header): void { + if (rootsOffset >= rootsLength) { + // grow for now + let newLength = rootsLength ? 2 * rootsLength : 256 * sizeof(); + let newBuffer = memory.allocate(newLength); + memory.copy(newBuffer, rootsBuffer, rootsOffset); + memory.free(rootsBuffer); + rootsBuffer = newBuffer; + rootsLength = newLength; + } + store(rootsBuffer + rootsOffset, s); + rootsOffset += sizeof(); +} + +function systemFree(s: Header): void { + memory.free(changetype(s)); +} + +// When a reference to a node S is created, the reference count of T is incremented and it is +// colored black, since any object whose reference count was just incremented can not be garbage. + +function increment(s: Header): void { + s.rc += 1; + s.color = ISACYCLIC(s) ? Color.GREEN : Color.BLACK; // TODO: is this about correct? +} + +// When a reference to a node S is deleted, the reference count is decremented. If the reference +// count reaches zero, the procedure Release is invoked to free the garbage node. If the reference +// count does not reach zero, the node is considered as a possible root of a cycle. + +function decrement(s: Header): void { + s.rc -= 1; + if (s.color == Color.GREEN) { // if (ISACYCLIC()) { ... } + if (!s.rc) systemFree(s); + // TODO: is this correct? here, if `decrement` was generic (propagate from UNLINK) + // the green condition could be eliminated both here and in increment (just using black). + // acyclic types also don't need ITERATECHILDREN then as these really just inc/dec/free. + } else { + if (!s.rc) release(s); + else possibleRoot(s); + } +} + +// When the reference count of a node reaches zero, the contained pointers are deleted, the object +// is colored black, and unless it has been buffered, it is freed. If it has been buffered, it is +// in the Roots buffer and will be freed later (in the procedure MarkRoots). + +function release(s: Header): void { + ITERATECHILDREN(s, t => decrement(t)); // TODO: skip if acyclic ? + s.color = Color.BLACK; + if (!s.buffered) systemFree(s); +} + +// When the reference count of S is decremented but does not reach zero, it is considered as a +// possible root of a garbage cycle. If its color is already purple, then it is already a candidate +// root; if not, its color is set to purple. Then the buffered flag is checked to see if it has +// been purple since we last performed a cycle collection. If it is not buffered, it is added to +// the buffer of possible roots. + +function possibleRoot(s: Header): void { + if (s.color != Color.PURPLE) { + s.color = Color.PURPLE; + if (!s.buffered) { + s.buffered = true; + appendRoot(s); + } + } +} + +// When the root buffer is full, or when some other condition, such as low memory occurs, the +// actual cycle collection operation is invoked. This operation has three phases: MarkRoots, which +// removes internal reference counts; ScanRoots, which restores reference counts when they are +// non-zero; and finally CollectRoots, which actually collects the cyclic garbage. + +function collectCycles(): void { + markRoots(); + scanRoots(); + collectRoots(); +} + +// The marking phase looks at all the nodes S whose pointers have been stored in the Roots buffer +// since the last cycle collection. If the color of the node is purple (indicating a possible root +// of a garbage cycle) and the reference count has not become zero, then MarkGray(S) is invoked to +// perform a depth-first search in which the reached nodes are colored gray and internal reference +// counts are subtracted. Otherwise, the node is removed from the Roots buffer, the buffered flag +// is cleared, and if the reference count is zero the object is freed. + +function markRoots(): void { + var readOffset = rootsBuffer; + var writeOffset = readOffset; + var readLimit = readOffset + rootsOffset; + while (readOffset < readLimit) { + let s = load
(readOffset); + if (s.color == Color.PURPLE && s.rc > 0) { + markGray(s); + store
(writeOffset, s); + writeOffset += sizeof(); + } else { + s.buffered = false; + // remove from roots + if (s.color == Color.BLACK && !s.rc) systemFree(s); + } + readOffset += sizeof(); + } + rootsOffset = writeOffset - rootsBuffer; +} + +// For each node S that was considered by MarkGray(S), this procedure invokes Scan(S) to either +// color the garbage subgraph white or re-color the live subgraph black. + +function scanRoots(): void { + var readOffset = rootsBuffer; + var readLimit = readOffset + rootsOffset; + while (readOffset < readLimit) { + scan(load
(readOffset)); + readOffset += sizeof(); + } +} + +// After the ScanRoots phase of the CollectCycles procedure, any remaining white nodes will be +// cyclic garbage and will be reachable from the Roots buffer. This prodecure invokes CollectWhite +// for each node in the Roots buffer to collect the garbage; all nodes in the root buffer are +// removed and their buffered flag is cleared. + +function collectRoots(): void { + var readOffset = rootsBuffer; + var readLimit = readOffset + rootsOffset; + while (readOffset < readLimit) { + let s = load
(readOffset); + // remove from roots + s.buffered = false; + collectWhite(s); + } + rootsOffset = 0; +} + +// This procedure performs a simple depth-first traversal of the graph beginning at S, marking +// visited nodes gray and removing internal reference counts as it goes. + +function markGray(s: Header): void { + if (s.color != Color.GRAY) { + s.color = Color.GRAY; + ITERATECHILDREN(s, t => { + t.rc -= 1; + markGray(t); + }); + } +} + +// If this procedure finds a gray object whose reference count is greater than one, then that +// object and everything reachable from it are live data; it will therefore call ScanBlack(S) in +// order to re-color the reachable subgraph and restore the reference counts subtracted by +// MarkGray. However, if the color of an object is gray and its reference count is zero, then it is +// colored white, and Scan is invoked upon its chldren. Note that an object may be colored white +// and then re-colored black if it is reachable from some subsequently discovered live node. + +function scan(s: Header): void { + if (s.color == Color.GRAY) { + if (s.rc > 0) scanBlack(s); + else { + s.color = Color.WHITE; + ITERATECHILDREN(s, t => scan(t)); + } + } + +} + +// This procedure performs the inverse operation of MarkGray, visiting the nodes, changing the +// color of objects back to black, and restoring their reference counts. + +function scanBlack(s: Header): void { + s.color = Color.BLACK; + ITERATECHILDREN(s, t => { + t.rc += 1; + if (t.color != Color.BLACK) scanBlack(t); + }); +} + +// This procedure recursively frees all white objects, re-coloring them black as it goes. If a +// white object is buffered, it is not freed; it will be freed later when it is found in the Roots +// buffer. + +function collectWhite(s: Header): void { + if (s.color == Color.WHITE && !s.buffered) { + s.color = Color.BLACK; + ITERATECHILDREN(s, t => collectWhite(t)); + systemFree(s); + } +} + +// Garbage collector interface + +// @ts-ignore: decorator +@global @unsafe +function __ref_collect(): void { + collectCycles(); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_retain(ref: usize): void { + increment(changetype
(ref - HEADER_SIZE)); +} + +// @ts-ignore: decorator +@global @unsafe +function __ref_release(ref: usize): void { + decrement(changetype
(ref - HEADER_SIZE)) +} + +// TODO: + +// A significant constant-factor improvement can be obtained for cycle collection by observing that +// some objects are inherently acyclic. We speculate that they will comprise the majorits of +// objects in many applications. Therefore, if we can avoid cycle collection for inherently acyclic +// object, we will significantly reduce the overhead of cycle collection as a whole. [...] +// +// Acyclic classes may contain: +// - scalars; +// - references to classes that are both acyclic and final; and +// - arrays of either of the above. +// +// Our implementation marks objects whose class is acyclic with the special color green. Green +// objects are ignored by the cycle collection algorithm, except that when a dead cycle refers to +// green objects, they are collected along with the dead cycle. diff --git a/std/assembly/common/README.md b/std/assembly/common/README.md new file mode 100644 index 0000000000..10f2f98c57 --- /dev/null +++ b/std/assembly/common/README.md @@ -0,0 +1 @@ +These source files are used by both the standard library *and* compiler. Must remain portable. diff --git a/std/assembly/common/feature.ts b/std/assembly/common/feature.ts new file mode 100644 index 0000000000..60b1563dde --- /dev/null +++ b/std/assembly/common/feature.ts @@ -0,0 +1,15 @@ +/** Indicates specific features to activate. */ +export const enum Feature { + /** No additional features. */ + NONE = 0, + /** Sign extension operations. */ + SIGN_EXTENSION = 1 << 0, // see: https://github.com/WebAssembly/sign-extension-ops + /** Mutable global imports and exports. */ + MUTABLE_GLOBAL = 1 << 1, // see: https://github.com/WebAssembly/mutable-global + /** Bulk memory operations. */ + BULK_MEMORY = 1 << 2, // see: https://github.com/WebAssembly/bulk-memory-operations + /** SIMD types and operations. */ + SIMD = 1 << 3, // see: https://github.com/WebAssembly/simd + /** Threading and atomic operations. */ + THREADS = 1 << 4 // see: https://github.com/WebAssembly/threads +} diff --git a/std/assembly/common/rtti.ts b/std/assembly/common/rtti.ts new file mode 100644 index 0000000000..cda38fd396 --- /dev/null +++ b/std/assembly/common/rtti.ts @@ -0,0 +1,62 @@ +// ╒═════════════════════ RTTI interpretation ═════════════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ◄─ RTTI_BASE +// │ count │ +// ├ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┤ +// │ reserved │ +// ╞═══════════════════════════════════════════════════════════════╡ ┐ +// │ RTTIData#flags [id=1] │ id=1..count +// ├ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┤ +// │ RTTIData#base [id=1] │ +// ├───────────────────────────────────────────────────────────────┤ +// │ ... │ + +/** Runtime type information data structure. */ +@unmanaged +export class RTTIData { + flags: RTTIFlags; + base: u32; +} + +/** Runtime type information flags. */ +export const enum RTTIFlags { + /** No specific flags. */ + NONE = 0, + /** Type is an `Array`. */ + ARRAY = 1 << 0, + /** Type is a `Set`. */ + SET = 1 << 1, + /** Type is a `Map`. */ + MAP = 1 << 2, + /** Type is inherently acyclic. */ + ACYCLIC = 1 << 3, + /** Value alignment of 1 byte. */ + VALUE_ALIGN_0 = 1 << 4, + /** Value alignment of 2 bytes. */ + VALUE_ALIGN_1 = 1 << 5, + /** Value alignment of 4 bytes. */ + VALUE_ALIGN_2 = 1 << 6, + /** Value alignment of 8 bytes. */ + VALUE_ALIGN_3 = 1 << 7, + /** Value alignment of 16 bytes. */ + VALUE_ALIGN_4 = 1 << 8, + /** Value type is nullable. */ + VALUE_NULLABLE = 1 << 9, + /** Value type is managed. */ + VALUE_MANAGED = 1 << 10, + /** Key alignment of 1 byte. */ + KEY_ALIGN_0 = 1 << 11, + /** Key alignment of 2 bytes. */ + KEY_ALIGN_1 = 1 << 12, + /** Key alignment of 4 bytes. */ + KEY_ALIGN_2 = 1 << 13, + /** Key alignment of 8 bytes. */ + KEY_ALIGN_3 = 1 << 14, + /** Key alignment of 16 bytes. */ + KEY_ALIGN_4 = 1 << 15, + /** Key type is nullable. */ + KEY_NULLABLE = 1 << 16, + /** Key type is managed. */ + KEY_MANAGED = 1 << 17 +} diff --git a/std/assembly/common/target.ts b/std/assembly/common/target.ts new file mode 100644 index 0000000000..9e8cf27614 --- /dev/null +++ b/std/assembly/common/target.ts @@ -0,0 +1,9 @@ +/** Compilation target. */ +export enum Target { + /** WebAssembly with 32-bit pointers. */ + WASM32, + /** WebAssembly with 64-bit pointers. Experimental and not supported by any runtime yet. */ + WASM64, + /** Portable. */ + JS +} diff --git a/std/assembly/dataview.ts b/std/assembly/dataview.ts index 0e65466ffb..875f830749 100644 --- a/std/assembly/dataview.ts +++ b/std/assembly/dataview.ts @@ -1,189 +1,213 @@ -import { - HEADER_SIZE, - MAX_BLENGTH -} from "./internal/arraybuffer"; +import { MAX_BYTELENGTH } from "./util/runtime"; +import { ArrayBuffer } from "./arraybuffer"; +import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH } from "./util/error"; + +// TODO: there is probably a smarter way to check byteOffset for accesses larger than 1 byte export class DataView { + private data: ArrayBuffer; + private dataStart: usize; + private dataLength: i32; + constructor( - readonly buffer: ArrayBuffer, - readonly byteOffset: i32 = 0, - readonly byteLength: i32 = i32.MIN_VALUE // FIXME + buffer: ArrayBuffer, + byteOffset: i32 = 0, + byteLength: i32 = buffer.byteLength ) { - if (byteLength === i32.MIN_VALUE) byteLength = buffer.byteLength - byteOffset; // FIXME - if (byteOffset > MAX_BLENGTH) throw new RangeError("Invalid byteOffset"); - if (byteLength > MAX_BLENGTH) throw new RangeError("Invalid byteLength"); - if (byteOffset + byteLength > buffer.byteLength) throw new RangeError("Invalid length"); + if ( + i32(byteLength > MAX_BYTELENGTH) | + i32(byteOffset + byteLength > buffer.byteLength) + ) throw new RangeError(E_INVALIDLENGTH); + this.data = buffer; // links + var dataStart = changetype(buffer) + byteOffset; + this.dataStart = dataStart; + this.dataLength = byteLength; + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get byteOffset(): i32 { + return (this.dataStart - changetype(this.data)); + } + + get byteLength(): i32 { + return this.dataLength; } getFloat32(byteOffset: i32, littleEndian: boolean = false): f32 { - checkOffset(byteOffset, 4, this.byteLength); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); return littleEndian - ? load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + ? load(this.dataStart + byteOffset) : reinterpret( bswap( - load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + load(this.dataStart + byteOffset) ) ); } getFloat64(byteOffset: i32, littleEndian: boolean = false): f64 { - checkOffset(byteOffset, 8, this.byteLength); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); return littleEndian - ? load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + ? load(this.dataStart + byteOffset) : reinterpret( - bswap( - load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE) + bswap( + load(this.dataStart + byteOffset) ) ); } getInt8(byteOffset: i32): i8 { - checkOffset(byteOffset, 1, this.byteLength); - return load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + if (byteOffset >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + byteOffset); } getInt16(byteOffset: i32, littleEndian: boolean = false): i16 { - checkOffset(byteOffset, 2, this.byteLength); - var result: i16 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + var result: i16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getInt32(byteOffset: i32, littleEndian: boolean = false): i32 { - checkOffset(byteOffset, 4, this.byteLength); - var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + var result: i32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint8(byteOffset: i32): u8 { - checkOffset(byteOffset, 1, this.byteLength); - return load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + if (byteOffset >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + byteOffset); } getUint16(byteOffset: i32, littleEndian: boolean = false): u16 { - checkOffset(byteOffset, 2, this.byteLength); - var result: u16 = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + var result: u16 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } getUint32(byteOffset: i32, littleEndian: boolean = false): u32 { - checkOffset(byteOffset, 4, this.byteLength); - var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + var result: u32 = load(this.dataStart + byteOffset); return littleEndian ? result : bswap(result); } setFloat32(byteOffset: i32, value: f32, littleEndian: boolean = false): void { - checkOffset(byteOffset, 4, this.byteLength); - if (littleEndian) { - store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); - } else { - store(changetype(this.buffer) + this.byteOffset + byteOffset, - bswap( - reinterpret(value) - ), - HEADER_SIZE - ); - } + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + if (littleEndian) store(this.dataStart + byteOffset, value); + else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setFloat64(byteOffset: i32, value: f64, littleEndian: boolean = false): void { - checkOffset(byteOffset, 8, this.byteLength); - if (littleEndian) { - store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); - } else { - store(changetype(this.buffer) + this.byteOffset + byteOffset, - bswap( - reinterpret(value) - ), - HEADER_SIZE - ); - } + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + if (littleEndian) store(this.dataStart + byteOffset, value); + else store(this.dataStart + byteOffset, bswap(reinterpret(value))); } setInt8(byteOffset: i32, value: i8): void { - checkOffset(byteOffset, 1, this.byteLength); - store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); + if (byteOffset >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + byteOffset, value); } setInt16(byteOffset: i32, value: i16, littleEndian: boolean = false): void { - checkOffset(byteOffset, 2, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setInt32(byteOffset: i32, value: i32, littleEndian: boolean = false): void { - checkOffset(byteOffset, 4, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint8(byteOffset: i32, value: u8): void { - checkOffset(byteOffset, 1, this.byteLength); - store(changetype(this.buffer) + this.byteOffset + byteOffset, value, HEADER_SIZE); + if (byteOffset >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + byteOffset, value); } setUint16(byteOffset: i32, value: u16, littleEndian: boolean = false): void { - checkOffset(byteOffset, 2, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 2 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint32(byteOffset: i32, value: u32, littleEndian: boolean = false): void { - checkOffset(byteOffset, 4, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 4 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } // Non-standard additions that make sense in WebAssembly, but won't work in JS: getInt64(byteOffset: i32, littleEndian: boolean = false): i64 { - checkOffset(byteOffset, 8, this.byteLength); - var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); - return littleEndian ? result : bswap(result); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + var result: i64 = load(this.dataStart + byteOffset); + return littleEndian ? result : bswap(result); } getUint64(byteOffset: i32, littleEndian: boolean = false): u64 { - checkOffset(byteOffset, 8, this.byteLength); - var result = load(changetype(this.buffer) + this.byteOffset + byteOffset, HEADER_SIZE); - return littleEndian ? result : bswap(result); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + var result = load(this.dataStart + byteOffset); + return littleEndian ? result : bswap(result); } setInt64(byteOffset: i32, value: i64, littleEndian: boolean = false): void { - checkOffset(byteOffset, 8, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } setUint64(byteOffset: i32, value: u64, littleEndian: boolean = false): void { - checkOffset(byteOffset, 8, this.byteLength); - store( - changetype(this.buffer) + this.byteOffset + byteOffset, - littleEndian ? value : bswap(value), - HEADER_SIZE - ); + if ( + i32(byteOffset < 0) | + i32(byteOffset + 8 > this.dataLength) + ) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + byteOffset, littleEndian ? value : bswap(value)); } toString(): string { return "[object DataView]"; } } - -@inline function checkOffset(byteOffset: i32, n: i32, byteLength: i32): void { - // n and byteLength must be known to be in bounds - if (byteOffset > MAX_BLENGTH || byteOffset + n > byteLength) throw new Error("Offset out of bounds"); -} diff --git a/std/assembly/diagnostics.ts b/std/assembly/diagnostics.ts deleted file mode 100644 index 9e797ad187..0000000000 --- a/std/assembly/diagnostics.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* tslint:disable */ - -@builtin export declare function ERROR(message?: void): void; -@builtin export declare function WARNING(message?: void): void; -@builtin export declare function INFO(message?: void): void; diff --git a/std/assembly/env.ts b/std/assembly/env.ts deleted file mode 100644 index 381e482c11..0000000000 --- a/std/assembly/env.ts +++ /dev/null @@ -1,16 +0,0 @@ -declare function abort( - message?: string | null, - fileName?: string | null, - lineNumber?: u32, - columnNumber?: u32 -): void; - -declare function trace( - message: string, - n?: i32, - a0?: f64, - a1?: f64, - a2?: f64, - a3?: f64, - a4?: f64 -): void; diff --git a/std/assembly/fixedarray.ts b/std/assembly/fixedarray.ts new file mode 100644 index 0000000000..1c166ce84e --- /dev/null +++ b/std/assembly/fixedarray.ts @@ -0,0 +1,94 @@ +import { HEADER, HEADER_SIZE, MAX_BYTELENGTH, allocate, register } from "./util/runtime"; +import { __runtime_id, __gc_mark_members } from "./runtime"; +import { E_INDEXOUTOFRANGE, E_INVALIDLENGTH, E_HOLEYARRAY } from "./util/error"; + +// NOTE: DO NOT USE YET! + +// TODO: FixedArray with S being the static size, i.e. `new FixedArray`. +// Then hard-wire this special type to the compiler and do static length checks instead :) + +export class FixedArray { + [key: number]: T; + + constructor(length: i32) { + if (length > MAX_BYTELENGTH >>> alignof()) throw new RangeError(E_INVALIDLENGTH); + if (isReference()) { + if (!isNullable()) { + if (length) throw new Error(E_HOLEYARRAY); + } + } + var outSize = length << alignof(); + var out = allocate(outSize); + memory.fill(out, 0, outSize); + return changetype>(register(out, __runtime_id>())); + } + + get length(): i32 { + return changetype
(changetype(this) - HEADER_SIZE).payloadSize >>> alignof(); + } + + @operator("[]") private __get(index: i32): T { + if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE); + return this.__unchecked_get(index); + } + + @operator("[]=") private __set(index: i32, value: T): void { + if (index >= this.length) throw new RangeError(E_INDEXOUTOFRANGE); + return this.__unchecked_set(index, value); + } + + @operator("{}") private __unchecked_get(index: i32): T { + return load(changetype(this) + (index << alignof())); + } + + @operator("{}=") private __unchecked_set(index: i32, value: T): void { + if (isManaged()) { + let offset = changetype(this) + (index << alignof()); + let oldValue = load(offset); + if (value !== oldValue) { + store(offset, value); + if (oldValue !== null) { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + else assert(false); + } + if (isNullable()) { + if (value !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } + } else { + store(changetype(this) + (index << alignof()), value); + } + } + + // GC integration + + @unsafe private __traverse(): void { + if (isManaged()) { + let cur = changetype(this); + let end = cur + changetype
(changetype(this) - HEADER_SIZE).payloadSize; + while (cur < end) { + let val = load(cur); + if (isNullable()) { + if (val) { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + } else { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + cur += sizeof(); + } + } + } +} diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts deleted file mode 100644 index ceaf6d98ec..0000000000 --- a/std/assembly/gc.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* tslint:disable */ - -@builtin export declare function iterateRoots(fn: (ref: usize) => void): void; - -export namespace gc { - - export function collect(): void { - if (isDefined(__gc_collect)) { __gc_collect(); return; } - WARNING("Calling 'gc.collect' requires a garbage collector to be present."); - unreachable(); - } -} diff --git a/std/assembly/index.d.ts b/std/assembly/index.d.ts index 68b46c256c..1a56bbc3f1 100644 --- a/std/assembly/index.d.ts +++ b/std/assembly/index.d.ts @@ -118,6 +118,8 @@ declare function changetype(value: any): T; declare function unchecked(value: T): T; /** Emits a `call_indirect` instruction, calling the specified function in the function table by index with the specified arguments. Does result in a runtime error if the arguments do not match the called function. */ declare function call_indirect(target: Function | u32, ...args: any[]): T; +/** Emits a `call` instruction, calling the specified function in the function table directly with the specified arguments. Function index must be a compile-time constant. */ +declare function call_direct(target: Function | u32, ...args: any[]): T; /** Instantiates a new instance of `T` using the specified constructor arguments. */ declare function instantiate(...args: any[]): T; /** Tests if a 32-bit or 64-bit float is `NaN`. */ @@ -128,6 +130,8 @@ declare function isFinite(value: T): bool; declare function isInteger(value?: any): value is number; /** Tests if the specified type *or* expression is of a float type. Compiles to a constant. */ declare function isFloat(value?: any): value is number; +/** Tests if the specified type *or* expression is of a boolean type. */ +declare function isBoolean(value?: any): value is number; /** Tests if the specified type *or* expression can represent negative numbers. Compiles to a constant. */ declare function isSigned(value?: any): value is number; /** Tests if the specified type *or* expression is of a reference type. Compiles to a constant. */ @@ -200,7 +204,7 @@ declare enum AtomicWaitResult { } /** Converts any other numeric value to an 8-bit signed integer. */ -declare function i8(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i8; +declare function i8(value: any): i8; declare namespace i8 { /** Smallest representable value. */ export const MIN_VALUE: i8; @@ -208,7 +212,7 @@ declare namespace i8 { export const MAX_VALUE: i8; } /** Converts any other numeric value to a 16-bit signed integer. */ -declare function i16(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i8; +declare function i16(value: any): i8; declare namespace i16 { /** Smallest representable value. */ export const MIN_VALUE: i16; @@ -216,7 +220,7 @@ declare namespace i16 { export const MAX_VALUE: i16; } /** Converts any other numeric value to a 32-bit signed integer. */ -declare function i32(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i32; +declare function i32(value: any): i32; declare namespace i32 { /** Smallest representable value. */ export const MIN_VALUE: i32; @@ -308,7 +312,7 @@ declare namespace i32 { } } /** Converts any other numeric value to a 64-bit signed integer. */ -declare function i64(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i64; +declare function i64(value: any): i64; declare namespace i64 { /** Smallest representable value. */ export const MIN_VALUE: i64; @@ -429,7 +433,7 @@ declare namespace i64 { /** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */ declare var isize: typeof i32 | typeof i64; /** Converts any other numeric value to an 8-bit unsigned integer. */ -declare function u8(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i8; +declare function u8(value: any): i8; declare namespace u8 { /** Smallest representable value. */ export const MIN_VALUE: u8; @@ -437,7 +441,7 @@ declare namespace u8 { export const MAX_VALUE: u8; } /** Converts any other numeric value to a 16-bit unsigned integer. */ -declare function u16(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i8; +declare function u16(value: any): i8; declare namespace u16 { /** Smallest representable value. */ export const MIN_VALUE: u16; @@ -445,7 +449,7 @@ declare namespace u16 { export const MAX_VALUE: u16; } /** Converts any other numeric value to a 32-bit unsigned integer. */ -declare function u32(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i32; +declare function u32(value: any): i32; declare namespace u32 { /** Smallest representable value. */ export const MIN_VALUE: u32; @@ -453,7 +457,7 @@ declare namespace u32 { export const MAX_VALUE: u32; } /** Converts any other numeric value to a 64-bit unsigned integer. */ -declare function u64(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): i64; +declare function u64(value: any): i64; declare namespace u64 { /** Smallest representable value. */ export const MIN_VALUE: u64; @@ -463,7 +467,7 @@ declare namespace u64 { /** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */ declare var usize: typeof u32 | typeof u64; /** Converts any other numeric value to a 1-bit unsigned integer. */ -declare function bool(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): bool; +declare function bool(value: any): bool; declare namespace bool { /** Smallest representable value. */ export const MIN_VALUE: bool; @@ -471,7 +475,7 @@ declare namespace bool { export const MAX_VALUE: bool; } /** Converts any other numeric value to a 32-bit float. */ -declare function f32(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): f32; +declare function f32(value: any): f32; declare namespace f32 { /** Smallest representable value. */ export const MIN_VALUE: f32; @@ -491,7 +495,7 @@ declare namespace f32 { export function store(offset: usize, value: f32, immOffset?: usize, immAlign?: usize): void; } /** Converts any other numeric value to a 64-bit float. */ -declare function f64(value: i8 | i16 | i32 | i64 | isize | u8 | u16 | u32 | u64 | usize | bool | f32 | f64): f64; +declare function f64(value: any): f64; declare namespace f64 { /** Smallest representable value. */ export const MIN_VALUE: f64; @@ -968,6 +972,8 @@ declare function bswap16(value: T): T; /** Memory operations. */ declare namespace memory { + /** Whether the memory managed interface is implemented. */ + export const implemented: bool; /** Returns the current memory size in units of pages. One page is 64kb. */ export function size(): i32; /** Grows linear memory by a given unsigned delta of pages. One page is 64kb. Returns the previous memory size in units of pages or `-1` on failure. */ @@ -976,10 +982,12 @@ declare namespace memory { export function fill(dst: usize, value: u8, count: usize): void; /** Copies n bytes from the specified source to the specified destination in memory. These regions may overlap. */ export function copy(dst: usize, src: usize, n: usize): void; + /** Repeats `src` of length `srcLength` `count` times at `dst`. */ + export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void; /** Copies elements from a passive element segment to a table. */ - // export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void; + export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void; /** Prevents further use of a passive element segment. */ - // export function drop(segmentIndex: u32): void; + export function drop(segmentIndex: u32): void; /** Copies elements from one region of a table to another region. */ export function allocate(size: usize): usize; /** Disposes a chunk of memory by its pointer. */ @@ -992,32 +1000,34 @@ declare namespace memory { /** Garbage collector operations. */ declare namespace gc { - /** Allocates a managed object identified by its visitor function. */ - export function allocate(size: usize, visitFn: (ref: usize) => void): usize; + /** Whether the garbage collector interface is implemented. */ + export const implemented: bool; /** Performs a full garbage collection cycle. */ export function collect(): void; + /** Retains a reference, making sure that it doesn't become collected. */ + export function retain(ref: usize): void; + /** Releases a reference, allowing it to become collected. */ + export function release(ref: usize): void; } /** Table operations. */ declare namespace table { /** Copies elements from a passive element segment to a table. */ - // export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void; + export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void; /** Prevents further use of a passive element segment. */ - // export function drop(elementIndex: u32): void; + export function drop(elementIndex: u32): void; /** Copies elements from one region of a table to another region. */ - // export function copy(dest: u32, src: u32, n: u32): void; + export function copy(dest: u32, src: u32, n: u32): void; } /** Class representing a generic, fixed-length raw binary data buffer. */ declare class ArrayBuffer { /** The size, in bytes, of the array. */ readonly byteLength: i32; - /** Unsafe pointer to the start of the data in memory. */ - readonly data: usize; /** Returns true if value is one of the ArrayBuffer views, such as typed array or a DataView **/ static isView(value: T): bool; /** Constructs a new array buffer of the given length in bytes. */ - constructor(length: i32, unsafe?: bool); + constructor(length: i32); /** Returns a copy of this array buffer's bytes from begin, inclusive, up to end, exclusive. */ slice(begin?: i32, end?: i32): ArrayBuffer; /** Returns a string representation of ArrayBuffer. */ @@ -1165,12 +1175,15 @@ declare class Float64Array extends TypedArray {} /** Class representing a sequence of values of type `T`. */ declare class Array { + /** Tests if a value is an array. */ static isArray(value: any): value is Array; + /** Creates a new array with at least the specified capacity and length zero. */ + static create(capacity?: i32): Array; [key: number]: T; /** Current length of the array. */ length: i32; - /** Constructs a new array. */ + /** Constructs a new array. If length is greater than zero and T is a non-nullable reference, use `Array.create` instead.*/ constructor(capacity?: i32); fill(value: T, start?: i32, end?: i32): this; @@ -1199,6 +1212,13 @@ declare class Array { toString(): string; } +/** Class representing a fixed sequence of values of type `T`. */ +declare class FixedArray { + [key: number]: T; + readonly length: i32; + constructor(capacity?: i32); +} + /** Class representing a sequence of characters. */ declare class String { @@ -1461,13 +1481,6 @@ interface TypedPropertyDescriptor { set?(value: T): void; } -/** Annotates an element as a program global. */ -declare function global( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; - /** Annotates a method as a binary operator overload for the specified `token`. */ declare function operator(token: "[]" | "[]=" | "{}" | "{}=" | "==" | "!=" | ">" | "<" | "<=" | ">=" | @@ -1502,6 +1515,9 @@ declare namespace operator { ) => TypedPropertyDescriptor | void; } +/** Annotates an element as a program global. */ +declare function global(...args: any[]): any; + /** Annotates a class as being unmanaged with limited capabilities. */ declare function unmanaged(constructor: Function): void; @@ -1509,29 +1525,16 @@ declare function unmanaged(constructor: Function): void; declare function sealed(constructor: Function): void; /** Annotates a method, function or constant global as always inlined. */ -declare function inline( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; +declare function inline(...args: any[]): any; + +/** Annotates a method, function or constant global as unsafe. */ +declare function unsafe(...args: any[]): any; /** Annotates an explicit external name of a function or global. */ -declare function external(namespace: string, name: string): ( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -) => TypedPropertyDescriptor | void; +declare function external(...args: any[]): any; /** Annotates a global for lazy compilation. */ -declare function lazy( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; +declare function lazy(...args: any[]): any; /** Annotates a function as the explicit start function. */ -declare function start( - target: any, - propertyKey: string, - descriptor: TypedPropertyDescriptor -): TypedPropertyDescriptor | void; +declare function start(...args: any[]): any; diff --git a/std/assembly/internal/allocator.ts b/std/assembly/internal/allocator.ts deleted file mode 100644 index 508710c6cf..0000000000 --- a/std/assembly/internal/allocator.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** Number of alignment bits. */ -@inline export const AL_BITS: u32 = 3; -/** Number of possible alignment values. */ -@inline export const AL_SIZE: usize = 1 << AL_BITS; -/** Mask to obtain just the alignment bits. */ -@inline export const AL_MASK: usize = AL_SIZE - 1; -/** Maximum 32-bit allocation size. */ -@inline export const MAX_SIZE_32: usize = 1 << 30; // 1GB diff --git a/std/assembly/internal/arraybuffer.ts b/std/assembly/internal/arraybuffer.ts deleted file mode 100644 index 4545d8e0d3..0000000000 --- a/std/assembly/internal/arraybuffer.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - AL_MASK, - MAX_SIZE_32 - } from "./allocator"; - -/** Size of an ArrayBuffer header. */ -@inline export const HEADER_SIZE: usize = (offsetof() + AL_MASK) & ~AL_MASK; -/** Maximum byte length of an ArrayBuffer. */ -@inline export const MAX_BLENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; - -function computeSize(byteLength: i32): usize { - // round up to power of 2, with HEADER_SIZE=8: - // 0 -> 2^3 = 8 - // 1..8 -> 2^4 = 16 - // 9..24 -> 2^5 = 32 - // ... - // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) - return 1 << (32 - clz(byteLength + HEADER_SIZE - 1)); -} - -// Low-level utility - -function __gc(ref: usize): void {} - -export function allocateUnsafe(byteLength: i32): ArrayBuffer { - assert(byteLength <= MAX_BLENGTH); - var buffer: usize; - if (isManaged()) { - buffer = __gc_allocate(computeSize(byteLength), __gc); // tslint:disable-line - } else { - buffer = memory.allocate(computeSize(byteLength)); - } - store(buffer, byteLength, offsetof("byteLength")); - return changetype(buffer); -} - -export function reallocateUnsafe(buffer: ArrayBuffer, newByteLength: i32): ArrayBuffer { - var oldByteLength = buffer.byteLength; - if (newByteLength > oldByteLength) { - assert(newByteLength <= MAX_BLENGTH); - if (newByteLength <= (computeSize(oldByteLength) - HEADER_SIZE)) { // fast path: zero out additional space - store(changetype(buffer), newByteLength, offsetof("byteLength")); - } else { // slow path: copy to new buffer - let newBuffer = allocateUnsafe(newByteLength); - memory.copy( - changetype(newBuffer) + HEADER_SIZE, - changetype(buffer) + HEADER_SIZE, - oldByteLength - ); - if (!isManaged()) { - memory.free(changetype(buffer)); - } - buffer = newBuffer; - } - memory.fill( - changetype(buffer) + HEADER_SIZE + oldByteLength, - 0, - (newByteLength - oldByteLength) - ); - } else if (newByteLength < oldByteLength) { // fast path: override size - // TBD: worth to copy and release if size is significantly less than before? - assert(newByteLength >= 0); - store(changetype(buffer), newByteLength, offsetof("byteLength")); - } - return buffer; -} - -// The helpers below use two different types in order to emit loads and stores that load respectively -// store one type to/from memory while returning/taking the desired output/input type. This allows to -// emit instructions like -// -// * `i32.load8` ^= `load(...)` that reads an i8 but returns an i32, or -// * `i64.load32_s` ^= `load(...)`) that reads a 32-bit as a 64-bit integer -// -// without having to emit an additional instruction for conversion purposes. The second parameter -// can be omitted for references and other loads and stores that simply return the exact type. - -@inline export function LOAD(buffer: ArrayBuffer, index: i32, byteOffset: i32 = 0): TOut { - return load(changetype(buffer) + (index << alignof()) + byteOffset, HEADER_SIZE); -} - -@inline export function STORE(buffer: ArrayBuffer, index: i32, value: TIn, byteOffset: i32 = 0): void { - store(changetype(buffer) + (index << alignof()) + byteOffset, value, HEADER_SIZE); -} diff --git a/std/assembly/internal/memory.ts b/std/assembly/internal/memory.ts deleted file mode 100644 index ea240fb80f..0000000000 --- a/std/assembly/internal/memory.ts +++ /dev/null @@ -1,254 +0,0 @@ -// this function will go away once `memory.copy` becomes an intrinsic -export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memcpy.c - var w: u32, x: u32; - - // copy 1 byte each until src is aligned to 4 bytes - while (n && (src & 3)) { - store(dest++, load(src++)); - n--; - } - - // if dst is aligned to 4 bytes as well, copy 4 bytes each - if ((dest & 3) == 0) { - while (n >= 16) { - store(dest , load(src )); - store(dest + 4, load(src + 4)); - store(dest + 8, load(src + 8)); - store(dest + 12, load(src + 12)); - src += 16; dest += 16; n -= 16; - } - if (n & 8) { - store(dest , load(src )); - store(dest + 4, load(src + 4)); - dest += 8; src += 8; - } - if (n & 4) { - store(dest, load(src)); - dest += 4; src += 4; - } - if (n & 2) { // drop to 2 bytes each - store(dest, load(src)); - dest += 2; src += 2; - } - if (n & 1) { // drop to 1 byte - store(dest++, load(src++)); - } - return; - } - - // if dst is not aligned to 4 bytes, use alternating shifts to copy 4 bytes each - // doing shifts if faster when copying enough bytes (here: 32 or more) - if (n >= 32) { - switch (dest & 3) { - // known to be != 0 - case 1: { - w = load(src); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - n -= 3; - while (n >= 17) { - x = load(src + 1); - store(dest, w >> 24 | x << 8); - w = load(src + 5); - store(dest + 4, x >> 24 | w << 8); - x = load(src + 9); - store(dest + 8, w >> 24 | x << 8); - w = load(src + 13); - store(dest + 12, x >> 24 | w << 8); - src += 16; dest += 16; n -= 16; - } - break; - } - case 2: { - w = load(src); - store(dest++, load(src++)); - store(dest++, load(src++)); - n -= 2; - while (n >= 18) { - x = load(src + 2); - store(dest, w >> 16 | x << 16); - w = load(src + 6); - store(dest + 4, x >> 16 | w << 16); - x = load(src + 10); - store(dest + 8, w >> 16 | x << 16); - w = load(src + 14); - store(dest + 12, x >> 16 | w << 16); - src += 16; dest += 16; n -= 16; - } - break; - } - case 3: { - w = load(src); - store(dest++, load(src++)); - n -= 1; - while (n >= 19) { - x = load(src + 3); - store(dest, w >> 8 | x << 24); - w = load(src + 7); - store(dest + 4, x >> 8 | w << 24); - x = load(src + 11); - store(dest + 8, w >> 8 | x << 24); - w = load(src + 15); - store(dest + 12, x >> 8 | w << 24); - src += 16; dest += 16; n -= 16; - } - break; - } - } - } - - // copy remaining bytes one by one - if (n & 16) { - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - } - if (n & 8) { - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - } - if (n & 4) { - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - store(dest++, load(src++)); - } - if (n & 2) { - store(dest++, load(src++)); - store(dest++, load(src++)); - } - if (n & 1) { - store(dest++, load(src++)); - } -} - -// this function will go away once `memory.copy` becomes an intrinsic -export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c - if (dest === src) return; - if (src + n <= dest || dest + n <= src) { - memcpy(dest, src, n); - return; - } - if (dest < src) { - if ((src & 7) == (dest & 7)) { - while (dest & 7) { - if (!n) return; - --n; - store(dest++, load(src++)); - } - while (n >= 8) { - store(dest, load(src)); - n -= 8; - dest += 8; - src += 8; - } - } - while (n) { - store(dest++, load(src++)); - --n; - } - } else { - if ((src & 7) == (dest & 7)) { - while ((dest + n) & 7) { - if (!n) return; - store(dest + --n, load(src + n)); - } - while (n >= 8) { - n -= 8; - store(dest + n, load(src + n)); - } - } - while (n) { - store(dest + --n, load(src + n)); - } - } -} - -// this function will go away once `memory.fill` becomes an intrinsic -export function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset - - // fill head and tail with minimal branching - if (!n) return; - store(dest, c); - store(dest + n - 1, c); - if (n <= 2) return; - - store(dest + 1, c); - store(dest + 2, c); - store(dest + n - 2, c); - store(dest + n - 3, c); - if (n <= 6) return; - store(dest + 3, c); - store(dest + n - 4, c); - if (n <= 8) return; - - // advance pointer to align it at 4-byte boundary - var k: usize = -dest & 3; - dest += k; - n -= k; - n &= -4; - - var c32: u32 = -1 / 255 * c; - - // fill head/tail up to 28 bytes each in preparation - store(dest, c32); - store(dest + n - 4, c32); - if (n <= 8) return; - store(dest + 4, c32); - store(dest + 8, c32); - store(dest + n - 12, c32); - store(dest + n - 8, c32); - if (n <= 24) return; - store(dest + 12, c32); - store(dest + 16, c32); - store(dest + 20, c32); - store(dest + 24, c32); - store(dest + n - 28, c32); - store(dest + n - 24, c32); - store(dest + n - 20, c32); - store(dest + n - 16, c32); - - // align to a multiple of 8 - k = 24 + (dest & 4); - dest += k; - n -= k; - - // copy 32 bytes each - var c64: u64 = c32 | (c32 << 32); - while (n >= 32) { - store(dest, c64); - store(dest + 8, c64); - store(dest + 16, c64); - store(dest + 24, c64); - n -= 32; - dest += 32; - } -} - -export function memcmp(vl: usize, vr: usize, n: usize): i32 { // see: musl/src/string/memcmp.c - if (vl == vr) return 0; - while (n != 0 && load(vl) == load(vr)) { - n--; vl++; vr++; - } - return n ? load(vl) - load(vr) : 0; -} diff --git a/std/assembly/internal/string.ts b/std/assembly/internal/string.ts deleted file mode 100644 index 7d903c498b..0000000000 --- a/std/assembly/internal/string.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { MAX_SIZE_32 } from "./allocator"; -import { String } from "../string"; - -/** Size of a String header. */ -@inline export const HEADER_SIZE = (offsetof() + 1) & ~1; // 2 byte aligned -/** Maximum length of a String. */ -@inline export const MAX_LENGTH = (MAX_SIZE_32 - HEADER_SIZE) >>> 1; - -// Low-level utility - -function __gc(ref: usize): void {} - -export function allocateUnsafe(length: i32): String { - assert(length > 0 && length <= MAX_LENGTH); - var buffer: usize; - if (isManaged()) { - buffer = __gc_allocate(HEADER_SIZE + (length << 1), __gc); // tslint:disable-line - } else { - buffer = memory.allocate(HEADER_SIZE + (length << 1)); - } - store(buffer, length); - return changetype(buffer); -} - -@inline -export function freeUnsafe(buffer: String): void { - if (!isManaged()) { - assert(buffer); - memory.free(changetype(buffer)); - } -} - -export function copyUnsafe(dest: String, destOffset: usize, src: String, srcOffset: usize, len: usize): void { - memory.copy( - changetype(dest) + (destOffset << 1) + HEADER_SIZE, - changetype(src) + (srcOffset << 1) + HEADER_SIZE, - len << 1 - ); -} - -export function compareUnsafe(str1: String, offset1: usize, str2: String, offset2: usize, len: usize): i32 { - var cmp: i32 = 0; - var ptr1 = changetype(str1) + (offset1 << 1); - var ptr2 = changetype(str2) + (offset2 << 1); - while (len && !(cmp = load(ptr1, HEADER_SIZE) - load(ptr2, HEADER_SIZE))) { - --len, ptr1 += 2, ptr2 += 2; - } - return cmp; -} - -export function repeatUnsafe(dest: String, destOffset: usize, src: String, count: i32): void { - var length = src.length; - if (ASC_SHRINK_LEVEL > 1) { - let strLen = length << 1; - let to = changetype(dest) + HEADER_SIZE + (destOffset << 1); - let from = changetype(src) + HEADER_SIZE; - for (let i = 0, len = strLen * count; i < len; i += strLen) { - memory.copy(to + i, from, strLen); - } - } else { - switch (length) { - case 0: break; - case 1: { - let cc = load(changetype(src), HEADER_SIZE); - let out = changetype(dest) + (destOffset << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 1), cc, HEADER_SIZE); - } - break; - } - case 2: { - let cc = load(changetype(src), HEADER_SIZE); - let out = changetype(dest) + (destOffset << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 2), cc, HEADER_SIZE); - } - break; - } - case 3: { - let cc1 = load(changetype(src), HEADER_SIZE + 0); - let cc2 = load(changetype(src), HEADER_SIZE + 4); - let out = changetype(dest) + (destOffset << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 2), cc1, HEADER_SIZE + 0); - store(out + (i << 1), cc2, HEADER_SIZE + 4); - } - break; - } - case 4: { - let cc = load(changetype(src), HEADER_SIZE); - let out = changetype(dest) + (destOffset << 1); - for (let i = 0; i < count; ++i) { - store(out + (i << 3), cc, HEADER_SIZE); - } - break; - } - default: { - let strLen = length << 1; - let to = changetype(dest) + HEADER_SIZE + (destOffset << 1); - let from = changetype(src) + HEADER_SIZE; - for (let i = 0, len = strLen * count; i < len; i += strLen) { - memory.copy(to + i, from, strLen); - } - break; - } - } - } -} - -// Helpers - -@inline export const enum CharCode { - PLUS = 0x2B, - MINUS = 0x2D, - DOT = 0x2E, - _0 = 0x30, - _1 = 0x31, - _2 = 0x32, - _3 = 0x33, - _4 = 0x34, - _5 = 0x35, - _6 = 0x36, - _7 = 0x37, - _8 = 0x38, - _9 = 0x39, - A = 0x41, - B = 0x42, - E = 0x45, - N = 0x4E, - O = 0x4F, - X = 0x58, - Z = 0x5a, - a = 0x61, - b = 0x62, - e = 0x65, - n = 0x6E, - o = 0x6F, - x = 0x78, - z = 0x7A -} - -export function isWhiteSpaceOrLineTerminator(c: u16): bool { - switch (c) { - case 9: // - case 10: // - case 13: // - case 11: // - case 12: // - case 32: // - case 160: // - case 8232: // - case 8233: // - case 65279: return true; // - default: return false; - } -} - -/** Parses a string to an integer (usually), using the specified radix. */ -export function parse(str: String, radix: i32 = 0): T { - var len: i32 = str.length; - if (!len) return NaN; - - var ptr = changetype(str) /* + HEAD -> offset */; - var code = load(ptr, HEADER_SIZE); - - // determine sign - var sign: T; - if (code == CharCode.MINUS) { - if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); - sign = -1; - } else if (code == CharCode.PLUS) { - if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); - sign = 1; - } else { - sign = 1; - } - - // determine radix - if (!radix) { - if (code == CharCode._0 && len > 2) { - switch (load(ptr + 2, HEADER_SIZE)) { - case CharCode.B: - case CharCode.b: { - ptr += 4; len -= 2; - radix = 2; - break; - } - case CharCode.O: - case CharCode.o: { - ptr += 4; len -= 2; - radix = 8; - break; - } - case CharCode.X: - case CharCode.x: { - ptr += 4; len -= 2; - radix = 16; - break; - } - default: radix = 10; - } - } else radix = 10; - } else if (radix < 2 || radix > 36) { - return NaN; - } - - // calculate value - var num: T = 0; - while (len--) { - code = load(ptr, HEADER_SIZE); - if (code >= CharCode._0 && code <= CharCode._9) { - code -= CharCode._0; - } else if (code >= CharCode.A && code <= CharCode.Z) { - code -= CharCode.A - 10; - } else if (code >= CharCode.a && code <= CharCode.z) { - code -= CharCode.a - 10; - } else break; - if (code >= radix) break; - num = (num * radix) + code; - ptr += 2; - } - return sign * num; -} diff --git a/std/assembly/internal/typedarray.ts b/std/assembly/internal/typedarray.ts deleted file mode 100644 index 0fb265ae69..0000000000 --- a/std/assembly/internal/typedarray.ts +++ /dev/null @@ -1,259 +0,0 @@ -import { - HEADER_SIZE as AB_HEADER_SIZE, - MAX_BLENGTH as AB_MAX_BLENGTH, - allocateUnsafe, - LOAD, - STORE -} from "./arraybuffer"; - -import { - SORT as SORT_IMPL -} from "./sort"; - -/** Typed array base class. Not a global object. */ -export abstract class TypedArray { - [key: number]: T; // compatibility only - - readonly buffer: ArrayBuffer; - readonly byteOffset: i32; - readonly byteLength: i32; - - constructor(length: i32) { - const MAX_LENGTH = AB_MAX_BLENGTH / sizeof(); - if (length > MAX_LENGTH) throw new RangeError("Invalid typed array length"); - var byteLength = length << alignof(); - var buffer = allocateUnsafe(byteLength); - memory.fill(changetype(buffer) + AB_HEADER_SIZE, 0, byteLength); - this.buffer = buffer; - this.byteOffset = 0; - this.byteLength = byteLength; - } - - @inline - get length(): i32 { - return this.byteLength >>> alignof(); - } - - @operator("[]") - protected __get(index: i32): T { - if (index >= (this.byteLength >>> alignof())) throw new Error("Index out of bounds"); - return LOAD(this.buffer, index, this.byteOffset); - } - - @inline @operator("{}") - protected __unchecked_get(index: i32): T { - return LOAD(this.buffer, index, this.byteOffset); - } - - @operator("[]=") - protected __set(index: i32, value: native): void { - if (index >= (this.byteLength >>> alignof())) throw new Error("Index out of bounds"); - STORE>(this.buffer, index, value, this.byteOffset); - } - - @inline @operator("{}=") - protected __unchecked_set(index: i32, value: native): void { - STORE>(this.buffer, index, value, this.byteOffset); - } - - // copyWithin(target: i32, start: i32, end: i32 = this.length): this -} - -@inline -export function FILL, T extends number>( - array: TArray, - value: native, - start: i32, - end: i32 -): TArray { - var buffer = array.buffer; - var byteOffset = array.byteOffset; - var len = array.length; - start = start < 0 ? max(len + start, 0) : min(start, len); - end = end < 0 ? max(len + end, 0) : min(end, len); - if (sizeof() == 1) { - if (start < end) { - memory.fill( - changetype(buffer) + start + byteOffset + AB_HEADER_SIZE, - value, - (end - start) - ); - } - } else { - for (; start < end; ++start) { - STORE>(buffer, start, value, byteOffset); - } - } - return array; -} - -@inline -export function SORT, T>( - array: TArray, - comparator: (a: T, b: T) => i32 -): TArray { - var byteOffset = array.byteOffset; - var length = array.length; - if (length <= 1) return array; - var buffer = array.buffer; - if (length == 2) { - let a = LOAD(buffer, 1, byteOffset); - let b = LOAD(buffer, 0, byteOffset); - if (comparator(a, b) < 0) { - STORE(buffer, 1, b, byteOffset); - STORE(buffer, 0, a, byteOffset); - } - return array; - } - SORT_IMPL(buffer, byteOffset, length, comparator); - return array; -} - -@inline -export function SUBARRAY, T>( - array: TArray, - begin: i32, - end: i32 -): TArray { - var length = array.length; - if (begin < 0) begin = max(length + begin, 0); - else begin = min(begin, length); - if (end < 0) end = max(length + end, begin); - else end = max(min(end, length), begin); - var slice = memory.allocate(offsetof()); - store(slice, array.buffer, offsetof("buffer")); - store(slice, array.byteOffset + (begin << alignof()), offsetof("byteOffset")); - store(slice, (end - begin) << alignof(), offsetof("byteLength")); - return changetype(slice); -} - -@inline -export function REDUCE, T, TRet>( - array: TArray, - callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, - initialValue: TRet -): TRet { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - initialValue = callbackfn( - initialValue, - LOAD(buffer, i, byteOffset), - i, - array, - ); - } - return initialValue; -} - -@inline -export function REDUCE_RIGHT, T, TRet>( - array: TArray, - callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, - initialValue: TRet -): TRet { - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = array.length - 1; i >= 0; i--) { - initialValue = callbackfn( - initialValue, - LOAD(buffer, i, byteOffset), - i, - array, - ); - } - return initialValue; -} - -@inline -export function MAP, T>( - array: TArray, - callbackfn: (value: T, index: i32, self: TArray) => T, -): TArray { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - var result = instantiate(length); - var resultBuffer = result.buffer; - for (let i = 0; i < length; i++) { - STORE>(resultBuffer, i, >callbackfn(LOAD(buffer, i, byteOffset), i, array)); - } - - return result; -} - -@inline -export function FIND_INDEX, T>( - array: TArray, - callbackfn: (value: T, index: i32, array: TArray) => bool, -): i32 { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - if (callbackfn(LOAD(buffer, i, byteOffset), i, array)) { - return i; - } - } - return -1; -} - -@inline -export function SOME, T>( - array: TArray, - callbackfn: (value: T, index: i32, array: TArray) => bool, -): bool { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - if (callbackfn(LOAD(buffer, i, byteOffset), i, array)) { - return true; - } - } - return false; -} - -@inline -export function EVERY, T>( - array: TArray, - callbackfn: (value: T, index: i32, array: TArray) => bool, -): bool { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - if (callbackfn(LOAD(buffer, i, byteOffset), i, array)) { - continue; - } - return false; - } - return true; -} - -@inline -export function FOREACH, T>( - array: TArray, - callbackfn: (value: T, index: i32, array: TArray) => void, -): void { - var length = array.length; - var buffer = array.buffer; - var byteOffset = array.byteOffset; - for (let i = 0; i < length; i++) { - callbackfn(LOAD(buffer, i, byteOffset), i, array); - } -} - -@inline -export function REVERSE, T>(array: TArray): TArray { - var buffer = array.buffer; - var byteOffset = array.byteOffset; - - for (let front = 0, back = array.length - 1; front < back; ++front, --back) { - let temp = LOAD(buffer, front, byteOffset); - STORE(buffer, front, LOAD(buffer, back, byteOffset), byteOffset); - STORE(buffer, back, temp, byteOffset); - } - return array; -} diff --git a/std/assembly/map.ts b/std/assembly/map.ts index 076962bf0c..4d52a3d82b 100644 --- a/std/assembly/map.ts +++ b/std/assembly/map.ts @@ -1,16 +1,21 @@ -import { - HEADER_SIZE as HEADER_SIZE_AB -} from "./internal/arraybuffer"; +/// -import { - HASH -} from "./internal/hash"; +import { HASH } from "./util/hash"; +import { __runtime_id, __gc_mark_members } from "./runtime"; // A deterministic hash map based on CloseTable from https://github.com/jorendorff/dht -@inline const INITIAL_CAPACITY = 4; -@inline const FILL_FACTOR: f64 = 8 / 3; -@inline const FREE_FACTOR: f64 = 3 / 4; +// @ts-ignore: decorator +@inline +const INITIAL_CAPACITY = 4; + +// @ts-ignore: decorator +@inline +const FILL_FACTOR: f64 = 8 / 3; + +// @ts-ignore: decorator +@inline +const FREE_FACTOR: f64 = 3 / 4; /** Structure of a map entry. */ @unmanaged class MapEntry { @@ -20,13 +25,19 @@ import { } /** Empty bit. */ -@inline const EMPTY: usize = 1 << 0; +// @ts-ignore: decorator +@inline +const EMPTY: usize = 1 << 0; /** Size of a bucket. */ -@inline const BUCKET_SIZE = sizeof(); +// @ts-ignore: decorator +@inline +const BUCKET_SIZE = sizeof(); /** Computes the alignment of an entry. */ -@inline function ENTRY_ALIGN(): usize { +// @ts-ignore: decorator +@inline +function ENTRY_ALIGN(): usize { // can align to 4 instead of 8 if 32-bit and K/V is <= 32-bits const maxkv = sizeof() > sizeof() ? sizeof() : sizeof(); const align = (maxkv > sizeof() ? maxkv : sizeof()) - 1; @@ -34,7 +45,9 @@ import { } /** Computes the aligned size of an entry. */ -@inline function ENTRY_SIZE(): usize { +// @ts-ignore: decorator +@inline +function ENTRY_SIZE(): usize { const align = ENTRY_ALIGN(); const size = (offsetof>() + align) & ~align; return size; @@ -54,14 +67,16 @@ export class Map { get size(): i32 { return this.entriesCount; } - constructor() { this.clear(); } + constructor() { + this.clear(); + } clear(): void { const bucketsSize = INITIAL_CAPACITY * BUCKET_SIZE; this.buckets = new ArrayBuffer(bucketsSize); this.bucketsMask = INITIAL_CAPACITY - 1; const entriesSize = INITIAL_CAPACITY * ENTRY_SIZE(); - this.entries = new ArrayBuffer(entriesSize, true); + this.entries = new ArrayBuffer(entriesSize); this.entriesCapacity = INITIAL_CAPACITY; this.entriesOffset = 0; this.entriesCount = 0; @@ -69,8 +84,7 @@ export class Map { private find(key: K, hashCode: u32): MapEntry | null { var entry = load>( - changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE, - HEADER_SIZE_AB + changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE ); while (entry) { if (!(entry.taggedNext & EMPTY) && entry.key == key) return entry; @@ -90,9 +104,37 @@ export class Map { set(key: K, value: V): void { var hashCode = HASH(key); - var entry = this.find(key, hashCode); + var entry = this.find(key, hashCode); // unmanaged! if (entry) { - entry.value = value; + if (isManaged()) { + let oldValue = entry.value; + if (value !== oldValue) { + entry.value = value; + if (isNullable()) { + if (oldValue !== null) { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + else assert(false); + } + if (value !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + __ref_link(changetype(value), changetype(this)); + } else if (isDefined(__ref_retain)) { + __ref_release(changetype(oldValue)); + __ref_retain(changetype(value)); + } else assert(false); + } + } + } else { + entry.value = value; + } } else { // check if rehashing is necessary if (this.entriesOffset == this.entriesCapacity) { @@ -104,24 +146,79 @@ export class Map { } // append new entry let entries = this.entries; - entry = changetype>( - changetype(entries) + HEADER_SIZE_AB + this.entriesOffset++ * ENTRY_SIZE() - ); + entry = changetype>(changetype(entries) + this.entriesOffset++ * ENTRY_SIZE()); entry.key = key; entry.value = value; + // link with the map + if (isManaged()) { + if (isNullable()) { + if (key !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(key)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(key)); + else assert(false); + } + } + if (isManaged()) { + if (isNullable()) { + if (value !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(value), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(value)); + else assert(false); + } + } ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; - entry.taggedNext = load(bucketPtrBase, HEADER_SIZE_AB); - store(bucketPtrBase, changetype(entry), HEADER_SIZE_AB); - if (isManaged()) __gc_link(changetype(this), changetype(key)); // tslint:disable-line - if (isManaged()) __gc_link(changetype(this), changetype(value)); // tslint:disable-line + entry.taggedNext = load(bucketPtrBase); + store(bucketPtrBase, changetype(entry)); } } delete(key: K): bool { var entry = this.find(key, HASH(key)); if (!entry) return false; + if (isManaged()) { + let oldKey = entry.key; + if (isNullable()) { + if (oldKey !== null) { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldKey), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldKey)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldKey), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldKey)); + else assert(false); + } + } + if (isManaged()) { + let oldValue = entry.key; + if (isNullable()) { + if (oldValue !== null) { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(oldValue), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(oldValue)); + else assert(false); + } + } entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate @@ -137,12 +234,12 @@ export class Map { var newBucketsCapacity = (newBucketsMask + 1); var newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE); var newEntriesCapacity = (newBucketsCapacity * FILL_FACTOR); - var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE(), true); + var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE()); // copy old entries to new entries - var oldPtr = changetype(this.entries) + HEADER_SIZE_AB; + var oldPtr = changetype(this.entries); var oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE(); - var newPtr = changetype(newEntries) + HEADER_SIZE_AB; + var newPtr = changetype(newEntries); while (oldPtr != oldEnd) { let oldEntry = changetype>(oldPtr); if (!(oldEntry.taggedNext & EMPTY)) { @@ -151,8 +248,8 @@ export class Map { newEntry.value = oldEntry.value; let newBucketIndex = HASH(oldEntry.key) & newBucketsMask; let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE; - newEntry.taggedNext = load(newBucketPtrBase, HEADER_SIZE_AB); - store(newBucketPtrBase, newPtr, HEADER_SIZE_AB); + newEntry.taggedNext = load(newBucketPtrBase); + store(newBucketPtrBase, newPtr); newPtr += ENTRY_SIZE(); } oldPtr += ENTRY_SIZE(); @@ -169,22 +266,44 @@ export class Map { return "[object Map]"; } - private __gc(): void { - __gc_mark(changetype(this.buckets)); // tslint:disable-line + // GC integration + + @unsafe private __traverse(): void { + __ref_mark(changetype(this.buckets)); var entries = this.entries; - __gc_mark(changetype(entries)); // tslint:disable-line + __ref_mark(changetype(entries)); if (isManaged() || isManaged()) { - let offset: usize = 0; - let end: usize = this.entriesOffset * ENTRY_SIZE(); - while (offset < end) { - let entry = changetype>( - changetype(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE() - ); + let cur = changetype(entries); + let end = cur + this.entriesOffset * ENTRY_SIZE(); + while (cur < end) { + let entry = changetype>(cur); if (!(entry.taggedNext & EMPTY)) { - if (isManaged()) __gc_mark(changetype(entry.key)); // tslint:disable-line - if (isManaged()) __gc_mark(changetype(entry.value)); // tslint:disable-line + if (isManaged()) { + let val = changetype(entry.key); + if (isNullable()) { + if (val) { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + } else { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + } + if (isManaged()) { + let val = changetype(entry.value); + if (isNullable()) { + if (val) { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + } else { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + } } - offset += ENTRY_SIZE(); + cur += ENTRY_SIZE(); } } } diff --git a/std/assembly/math.ts b/std/assembly/math.ts index f899f1b082..58a39bedcc 100644 --- a/std/assembly/math.ts +++ b/std/assembly/math.ts @@ -42,7 +42,9 @@ function R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3 return p / q; } -@inline function expo2(x: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX) +// @ts-ignore: decorator +@inline +function expo2(x: f64): f64 { // exp(x)/2 for x >= log(DBL_MAX) const // see: musl/src/math/__expo2.c k = 2043, kln2 = reinterpret(0x40962066151ADD8B); // 0x1.62066151add8bp+10 @@ -50,12 +52,25 @@ function R(z: f64): f64 { // Rational approximation of (asin(x)-x)/x^3 return NativeMath.exp(x - kln2) * scale * scale; } -/** @internal */ -@lazy var random_seeded = false; -@lazy var random_state0_64: u64; -@lazy var random_state1_64: u64; -@lazy var random_state0_32: u32; -@lazy var random_state1_32: u32; +// @ts-ignore: decorator +@lazy +var random_seeded = false; + +// @ts-ignore: decorator +@lazy +var random_state0_64: u64; + +// @ts-ignore: decorator +@lazy +var random_state1_64: u64; + +// @ts-ignore: decorator +@lazy +var random_state0_32: u32; + +// @ts-ignore: decorator +@lazy +var random_state1_32: u32; function murmurHash3(h: u64): u64 { // Force all bits of a hash block to avalanche h ^= h >> 33; // see: https://github.com/aappleby/smhasher @@ -75,17 +90,40 @@ function splitMix32(h: u32): u32 { export namespace NativeMath { - @lazy export const E = reinterpret(0x4005BF0A8B145769); // 2.7182818284590452354 - @lazy export const LN2 = reinterpret(0x3FE62E42FEFA39EF); // 0.69314718055994530942 - @lazy export const LN10 = reinterpret(0x40026BB1BBB55516); // 2.30258509299404568402 - @lazy export const LOG2E = reinterpret(0x3FF71547652B82FE); // 1.4426950408889634074 - @lazy export const LOG10E = reinterpret(0x3FDBCB7B1526E50E); // 0.43429448190325182765 - @lazy export const PI = reinterpret(0x400921FB54442D18); // 3.14159265358979323846 - @lazy export const SQRT1_2 = reinterpret(0x3FE6A09E667F3BCD); // 0.70710678118654752440 - @lazy export const SQRT2 = reinterpret(0x3FF6A09E667F3BCD); // 1.41421356237309504880 + // @ts-ignore: decorator + @lazy + export const E = reinterpret(0x4005BF0A8B145769); // 2.7182818284590452354 - @inline - export function abs(x: f64): f64 { + // @ts-ignore: decorator + @lazy + export const LN2 = reinterpret(0x3FE62E42FEFA39EF); // 0.69314718055994530942 + + // @ts-ignore: decorator + @lazy + export const LN10 = reinterpret(0x40026BB1BBB55516); // 2.30258509299404568402 + + // @ts-ignore: decorator + @lazy + export const LOG2E = reinterpret(0x3FF71547652B82FE); // 1.4426950408889634074 + + // @ts-ignore: decorator + @lazy + export const LOG10E = reinterpret(0x3FDBCB7B1526E50E); // 0.43429448190325182765 + + // @ts-ignore: decorator + @lazy + export const PI = reinterpret(0x400921FB54442D18); // 3.14159265358979323846 + + // @ts-ignore: decorator + @lazy + export const SQRT1_2 = reinterpret(0x3FE6A09E667F3BCD); // 0.70710678118654752440 + + // @ts-ignore: decorator + @lazy + export const SQRT2 = reinterpret(0x3FF6A09E667F3BCD); // 1.41421356237309504880 + + // @ts-ignore: decorator + @inline export function abs(x: f64): f64 { return builtin_abs(x); } @@ -346,6 +384,7 @@ export namespace NativeMath { return t; } + // @ts-ignore: decorator @inline export function ceil(x: f64): f64 { return builtin_ceil(x); @@ -497,11 +536,13 @@ export namespace NativeMath { return (x + y) * twopk; } + // @ts-ignore: decorator @inline export function floor(x: f64): f64 { return builtin_floor(x); } + // @ts-ignore: decorator @inline export function fround(x: f64): f32 { return x; @@ -763,11 +804,13 @@ export namespace NativeMath { return val_lo + val_hi; } + // @ts-ignore: decorator @inline export function max(value1: f64, value2: f64): f64 { return builtin_max(value1, value2); } + // @ts-ignore: decorator @inline export function min(value1: f64, value2: f64): f64 { return builtin_min(value1, value2); @@ -997,11 +1040,13 @@ export namespace NativeMath { return reinterpret(r) - 1; } + // @ts-ignore: decorator @inline export function round(x: f64): f64 { return builtin_copysign(builtin_floor(x + 0.5), x); } + // @ts-ignore: decorator @inline export function sign(x: f64): f64 { if (ASC_SHRINK_LEVEL > 0) { @@ -1011,11 +1056,12 @@ export namespace NativeMath { } } + // @ts-ignore: decorator @inline export function signbit(x: f64): bool { // In ECMAScript all NaN values are indistinguishable from each other // so we need handle NaN and negative NaN in similar way - return ((reinterpret(x) >>> 63) & (x == x)); + return ((reinterpret(x) >>> 63) & i32(x == x)); } export function sin(x: f64): f64 { // TODO @@ -1041,6 +1087,7 @@ export namespace NativeMath { return t; } + // @ts-ignore: decorator @inline export function sqrt(x: f64): f64 { return builtin_sqrt(x); @@ -1074,6 +1121,7 @@ export namespace NativeMath { return builtin_copysign(t, x); } + // @ts-ignore: decorator @inline export function trunc(x: f64): f64 { return builtin_trunc(x); @@ -1232,16 +1280,19 @@ export namespace NativeMath { } } -/** @internal */ -@lazy var rempio2f_y: f64; -@lazy const PIO2_TABLE: u64[] = [ +// @ts-ignore: decorator +@lazy +var rempio2f_y: f64; + +// @ts-ignore: decorator +@lazy +const PIO2_TABLE: u64[] = [ 0xA2F9836E4E441529, 0xFC2757D1F534DDC0, 0xDB6295993C439041, 0xFE5163ABDEBBC561 ]; -/** @internal */ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 const // see: musl/src/math/asinf.c and SUN COPYRIGHT NOTICE above pS0 = reinterpret(0x3E2AAA75), // 1.6666586697e-01f @@ -1253,7 +1304,9 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 return p / q; } -@inline function expo2f(x: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX) +// @ts-ignore: decorator +@inline +function expo2f(x: f32): f32 { // exp(x)/2 for x >= log(DBL_MAX) const // see: musl/src/math/__expo2f.c k = 235, kln2 = reinterpret(0x4322E3BC); // 0x1.45c778p+7f @@ -1261,8 +1314,9 @@ function Rf(z: f32): f32 { // Rational approximation of (asin(x)-x)/x^3 return NativeMathf.exp(x - kln2) * scale * scale; } -@inline /** @internal */ -function pio2_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c +// @ts-ignore: decorator +@inline +function pio2_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c const coeff = reinterpret(0x3BF921FB54442D18); // π * 0x1p-65 = 8.51530395021638647334e-20 const bits = PIO2_TABLE; @@ -1291,8 +1345,9 @@ function pio2_large_quot(x: f32, u: i32): i32 { // see: jdh8/metallic/blob return q; } -@inline /** @internal */ -function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c +// @ts-ignore: decorator +@inline +function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob/master/src/math/float/rem_pio2f.c const pi2hi = reinterpret(0x3FF921FB50000000); // 1.57079631090164184570 const pi2lo = reinterpret(0x3E5110B4611A6263); // 1.58932547735281966916e-8 const _2_pi = reinterpret(0x3FE45F306DC9C883); // 0.63661977236758134308 @@ -1308,7 +1363,8 @@ function rempio2f(x: f32, u: u32, sign: i32): i32 { // see: jdh8/metallic/blob } /* |sin(x)/x - s(x)| < 2**-37.5 (~[-4.89e-12, 4.824e-12]). */ -@inline /** @internal */ +// @ts-ignore: decorator +@inline function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c const S1 = reinterpret(0xBFC5555554CBAC77); // -0x15555554cbac77.0p-55 const S2 = reinterpret(0x3F811110896EFBB2); // 0x111110896efbb2.0p-59 @@ -1323,7 +1379,8 @@ function sin_kernf(x: f64): f32 { // see: musl/tree/src/math/__sindf.c } /* |cos(x) - c(x)| < 2**-34.1 (~[-5.37e-11, 5.295e-11]). */ -@inline /** @internal */ +// @ts-ignore: decorator +@inline function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c const C0 = reinterpret(0xBFDFFFFFFD0C5E81); // -0x1ffffffd0c5e81.0p-54 const C1 = reinterpret(0x3FA55553E1053A42); // 0x155553e1053a42.0p-57 @@ -1337,7 +1394,8 @@ function cos_kernf(x: f64): f32 { // see: musl/tree/src/math/__cosdf.c } /* |tan(x)/x - t(x)| < 2**-25.5 (~[-2e-08, 2e-08]). */ -@inline /** @internal */ +// @ts-ignore: decorator +@inline function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c const T0 = reinterpret(0x3FD5554D3418C99F); /* 0x15554d3418c99f.0p-54 */ @@ -1360,19 +1418,47 @@ function tan_kernf(x: f64, odd: i32): f32 { // see: musl/tree/src/math/__tandf.c export namespace NativeMathf { - @lazy export const E = NativeMath.E; - @lazy export const LN2 = NativeMath.LN2; - @lazy export const LN10 = NativeMath.LN10; - @lazy export const LOG2E = NativeMath.LOG2E; - @lazy export const LOG10E = NativeMath.LOG10E; - @lazy export const PI = NativeMath.PI; - @lazy export const SQRT1_2 = NativeMath.SQRT1_2; - @lazy export const SQRT2 = NativeMath.SQRT2; + // @ts-ignore: decorator + @lazy + export const E = NativeMath.E; + + // @ts-ignore: decorator + @lazy + export const LN2 = NativeMath.LN2; + + // @ts-ignore: decorator + @lazy + export const LN10 = NativeMath.LN10; + + // @ts-ignore: decorator + @lazy + export const LOG2E = NativeMath.LOG2E; + + // @ts-ignore: decorator + @lazy + export const LOG10E = NativeMath.LOG10E; + + // @ts-ignore: decorator + @lazy + export const PI = NativeMath.PI; + + // @ts-ignore: decorator + @lazy + export const SQRT1_2 = NativeMath.SQRT1_2; + + // @ts-ignore: decorator + @lazy + export const SQRT2 = NativeMath.SQRT2; + + // @ts-ignore: decorator + @lazy + export var sincos_sin: f32 = 0; - /** Used as return values from Mathf.sincos */ - @lazy export var sincos_sin: f32 = 0; - @lazy export var sincos_cos: f32 = 0; + // @ts-ignore: decorator + @lazy + export var sincos_cos: f32 = 0; + // @ts-ignore: decorator @inline export function abs(x: f32): f32 { return builtin_abs(x); @@ -1609,6 +1695,7 @@ export namespace NativeMathf { return t; } + // @ts-ignore: decorator @inline export function ceil(x: f32): f32 { return builtin_ceil(x); @@ -1685,6 +1772,7 @@ export namespace NativeMathf { return expo2f(x); } + // @ts-ignore: decorator @inline export function floor(x: f32): f32 { return builtin_floor(x); @@ -1796,6 +1884,7 @@ export namespace NativeMathf { return (x + y) * twopk; } + // @ts-ignore: decorator @inline export function fround(x: f32): f32 { return x; @@ -1831,6 +1920,7 @@ export namespace NativeMathf { return z * builtin_sqrt((x * x + y * y)); } + // @ts-ignore: decorator @inline export function imul(x: f32, y: f32): f32 { /* @@ -2010,11 +2100,13 @@ export namespace NativeMathf { return (lo + hi) * ivln2lo + lo * ivln2hi + hi * ivln2hi + dk; } + // @ts-ignore: decorator @inline export function max(value1: f32, value2: f32): f32 { return builtin_max(value1, value2); } + // @ts-ignore: decorator @inline export function min(value1: f32, value2: f32): f32 { return builtin_min(value1, value2); @@ -2209,6 +2301,7 @@ export namespace NativeMathf { return sn * z; } + // @ts-ignore: decorator @inline export function seedRandom(value: i64): void { NativeMath.seedRandom(value); @@ -2229,11 +2322,13 @@ export namespace NativeMathf { return reinterpret((r >> 9) | (127 << 23)) - 1.0; } + // @ts-ignore: decorator @inline export function round(x: f32): f32 { return builtin_copysign(builtin_floor(x + 0.5), x); } + // @ts-ignore: decorator @inline export function sign(x: f32): f32 { if (ASC_SHRINK_LEVEL > 0) { @@ -2243,8 +2338,10 @@ export namespace NativeMathf { } } + // @ts-ignore: decorator @inline export function signbit(x: f32): bool { + // @ts-ignore: type return ((reinterpret(x) >>> 31) & (x == x)); } @@ -2308,6 +2405,7 @@ export namespace NativeMathf { return t; } + // @ts-ignore: decorator @inline export function sqrt(x: f32): f32 { return builtin_sqrt(x); @@ -2377,6 +2475,7 @@ export namespace NativeMathf { return builtin_copysign(t, x); } + // @ts-ignore: decorator @inline export function trunc(x: f32): f32 { return builtin_trunc(x); @@ -2541,12 +2640,12 @@ export namespace NativeMathf { if (ix <= 0x3f490fda) { /* |x| ~<= π/4 */ if (ix < 0x39800000) { /* |x| < 2**-12 */ - sincos_s32 = x; - sincos_c32 = 1; + sincos_sin = x; + sincos_cos = 1; return; } - sincos_s32 = sin_kernf(x); - sincos_c32 = cos_kernf(x); + sincos_sin = sin_kernf(x); + sincos_cos = cos_kernf(x); return; } @@ -2554,33 +2653,33 @@ export namespace NativeMathf { if (ix <= 0x407b53d1) { /* |x| ~<= 5π/4 */ if (ix <= 0x4016cbe3) { /* |x| ~<= 3π/4 */ if (sign) { - sincos_s32 = -cos_kernf(x + s1pio2); - sincos_c32 = sin_kernf(x + s1pio2); + sincos_sin = -cos_kernf(x + s1pio2); + sincos_cos = sin_kernf(x + s1pio2); } else { - sincos_s32 = cos_kernf(s1pio2 - x); - sincos_c32 = sin_kernf(s1pio2 - x); + sincos_sin = cos_kernf(s1pio2 - x); + sincos_cos = sin_kernf(s1pio2 - x); } return; } /* -sin(x + c) is not correct if x+c could be 0: -0 vs +0 */ - sincos_s32 = -sin_kernf(sign ? x + s2pio2 : x - s2pio2); - sincos_c32 = -cos_kernf(sign ? x + s2pio2 : x - s2pio2); + sincos_sin = -sin_kernf(sign ? x + s2pio2 : x - s2pio2); + sincos_cos = -cos_kernf(sign ? x + s2pio2 : x - s2pio2); return; } if (ix <= 0x40e231d5) { /* |x| ~<= 9π/4 */ if (ix <= 0x40afeddf) { /* |x| ~<= 7π/4 */ if (sign) { - sincos_s32 = cos_kernf(x + s3pio2); - sincos_c32 = -sin_kernf(x + s3pio2); + sincos_sin = cos_kernf(x + s3pio2); + sincos_cos = -sin_kernf(x + s3pio2); } else { - sincos_s32 = -cos_kernf(x - s3pio2); - sincos_c32 = sin_kernf(x - s3pio2); + sincos_sin = -cos_kernf(x - s3pio2); + sincos_cos = sin_kernf(x - s3pio2); } return; } - sincos_s32 = sin_kernf(sign ? x + s4pio2 : x - s4pio2); - sincos_c32 = cos_kernf(sign ? x + s4pio2 : x - s4pio2); + sincos_sin = sin_kernf(sign ? x + s4pio2 : x - s4pio2); + sincos_cos = cos_kernf(sign ? x + s4pio2 : x - s4pio2); return; } } @@ -2588,8 +2687,8 @@ export namespace NativeMathf { /* sin(Inf or NaN) is NaN */ if (ix >= 0x7f800000) { let xx = x - x; - sincos_s32 = xx; - sincos_c32 = xx; + sincos_sin = xx; + sincos_cos = xx; return; } @@ -2601,24 +2700,24 @@ export namespace NativeMathf { switch (n & 3) { case 0: { - sincos_s32 = s; - sincos_c32 = c; + sincos_sin = s; + sincos_cos = c; break; } case 1: { - sincos_s32 = c; - sincos_c32 = -s; + sincos_sin = c; + sincos_cos = -s; break; } case 2: { - sincos_s32 = -s; - sincos_c32 = -c; + sincos_sin = -s; + sincos_cos = -c; break; } case 3: default: { - sincos_s32 = -c; - sincos_c32 = s; + sincos_sin = -c; + sincos_cos = s; break; } } diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index 7c92f50e46..6865c3624f 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -1,55 +1,98 @@ -import { memcmp, memmove, memset } from "./internal/memory"; +/// -@builtin export declare const HEAP_BASE: usize; // tslint:disable-line +import { memcmp, memmove, memset } from "./util/memory"; +import { E_NOTIMPLEMENTED } from "./util/error"; -/* tslint:disable */ +// @ts-ignore: decorator +@builtin +export declare const HEAP_BASE: usize; +/** Memory manager interface. */ export namespace memory { - @builtin export declare function size(): i32; + /** Whether the memory managed interface is implemented. */ + // @ts-ignore: decorator + @lazy + export const implemented: bool = isDefined(__mem_allocate); - @builtin export declare function grow(pages: i32): i32; + /** Gets the size of the memory in pages. */ + // @ts-ignore: decorator + @builtin + export declare function size(): i32; - @builtin @inline - export function fill(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset - memset(dest, c, n); // fallback if "bulk-memory" isn't enabled - } + /** Grows the memory by the given size in pages and returns the previous size in pages. */ + // @ts-ignore: decorator + @unsafe @builtin + export declare function grow(pages: i32): i32; - @builtin @inline - export function copy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c - memmove(dest, src, n); // fallback if "bulk-memory" isn't enabled + /** Fills a section in memory with the specified byte value. */ + // @ts-ignore: decorator + @unsafe @builtin + export function fill(dst: usize, c: u8, n: usize): void { + memset(dst, c, n); // fallback if "bulk-memory" isn't enabled } - @inline export function compare(vl: usize, vr: usize, n: usize): i32 { // see: musl/src/string/memcmp.c - return memcmp(vl, vr, n); + /** Copies a section of memory to another. Has move semantics. */ + // @ts-ignore: decorator + @unsafe @builtin + export function copy(dst: usize, src: usize, n: usize): void { + memmove(dst, src, n); // fallback if "bulk-memory" isn't enabled } - // Passive segments + /** Initializes a memory segment. */ + // @ts-ignore: decorator + @unsafe + export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { + throw new Error(E_NOTIMPLEMENTED); + } - // export function init(segmentIndex: u32, srcOffset: usize, dstOffset: usize, n: usize): void { - // __memory_init(segmentIndex, srcOffset, dstOffset); - // } + /** Drops a memory segment. */ + // @ts-ignore: decorator + @unsafe + export function drop(segmentIndex: u32): void { + throw new Error(E_NOTIMPLEMENTED); + } - // export function drop(segmentIndex: u32): void { - // __memory_drop(segmentIndex); - // } + /** Dynamically allocates a section of memory and returns its address. */ + // @ts-ignore: decorator + @unsafe + export function allocate(size: usize): usize { + if (isDefined(__mem_allocate)) return __mem_allocate(size); + else throw new Error(E_NOTIMPLEMENTED); + } - // Allocator + /** Dynamically frees a section of memory by the previously allocated address. */ + // @ts-ignore: decorator + @unsafe + export function free(ptr: usize): void { + if (isDefined(__mem_free)) __mem_free(ptr); + else throw new Error(E_NOTIMPLEMENTED); + } - @inline export function allocate(size: usize): usize { - if (isDefined(__memory_allocate)) return __memory_allocate(size); - WARNING("Calling 'memory.allocate' requires a memory manager to be present."); - return unreachable(); + /** Resets the memory to its initial state. Arena allocator only. */ + // @ts-ignore: decorator + @unsafe + export function reset(): void { + if (isDefined(__mem_reset)) __mem_reset(); + else throw new Error(E_NOTIMPLEMENTED); } - @inline export function free(ptr: usize): void { - if (isDefined(__memory_free)) { __memory_free(ptr); return; } - WARNING("Calling 'memory.free' requires a memory manager to be present."); - unreachable(); + /** Repeats a section of memory at a specific address. */ + // @ts-ignore: decorator + @unsafe + export function repeat(dst: usize, src: usize, srcLength: usize, count: usize): void { + var index: usize = 0; + var total = srcLength * count; + while (index < total) { + memory.copy(dst + index, src, srcLength); + index += srcLength; + } } - @inline export function reset(): void { - if (isDefined(__memory_reset)) { __memory_reset(); return; } - unreachable(); + /** Compares a section of memory to another. */ + // @ts-ignore: decorator + @inline + export function compare(vl: usize, vr: usize, n: usize): i32 { + return memcmp(vl, vr, n); } } diff --git a/std/assembly/number.ts b/std/assembly/number.ts index 20288e1913..bc97a3c174 100644 --- a/std/assembly/number.ts +++ b/std/assembly/number.ts @@ -1,18 +1,15 @@ -import { - itoa, - dtoa -} from "./internal/number"; +import { itoa, dtoa } from "./util/number"; +import { isNaN as builtin_isNaN, isFinite as builtin_isFinite } from "./builtins"; -import { - isNaN as builtin_isNaN, - isFinite as builtin_isFinite -} from "./builtins"; +@sealed export abstract class I8 { -@sealed -export abstract class I8 { + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: i8 = i8.MIN_VALUE; - @lazy static readonly MIN_VALUE: i8 = i8.MIN_VALUE; - @lazy static readonly MAX_VALUE: i8 = i8.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: i8 = i8.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i8 { return parseI32(value, radix); @@ -24,11 +21,15 @@ export abstract class I8 { } } -@sealed -export abstract class I16 { +@sealed export abstract class I16 { - @lazy static readonly MIN_VALUE: i16 = i16.MIN_VALUE; - @lazy static readonly MAX_VALUE: i16 = i16.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: i16 = i16.MIN_VALUE; + + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: i16 = i16.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i16 { return parseI32(value, radix); @@ -40,11 +41,15 @@ export abstract class I16 { } } -@sealed -export abstract class I32 { +@sealed export abstract class I32 { + + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: i32 = i32.MIN_VALUE; - @lazy static readonly MIN_VALUE: i32 = i32.MIN_VALUE; - @lazy static readonly MAX_VALUE: i32 = i32.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: i32 = i32.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i32 { return parseI32(value, radix); @@ -56,11 +61,15 @@ export abstract class I32 { } } -@sealed -export abstract class I64 { +@sealed export abstract class I64 { - @lazy static readonly MIN_VALUE: i64 = i64.MIN_VALUE; - @lazy static readonly MAX_VALUE: i64 = i64.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: i64 = i64.MIN_VALUE; + + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: i64 = i64.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): i64 { return parseI64(value, radix); @@ -72,11 +81,15 @@ export abstract class I64 { } } -@sealed -export abstract class Isize { +@sealed export abstract class Isize { + + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: isize = isize.MIN_VALUE; - @lazy static readonly MIN_VALUE: isize = isize.MIN_VALUE; - @lazy static readonly MAX_VALUE: isize = isize.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: isize = isize.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): isize { return parseI64(value, radix); @@ -88,11 +101,15 @@ export abstract class Isize { } } -@sealed -export abstract class U8 { +@sealed export abstract class U8 { - @lazy static readonly MIN_VALUE: u8 = u8.MIN_VALUE; - @lazy static readonly MAX_VALUE: u8 = u8.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: u8 = u8.MIN_VALUE; + + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: u8 = u8.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u8 { return parseI32(value, radix); @@ -104,11 +121,15 @@ export abstract class U8 { } } -@sealed -export abstract class U16 { +@sealed export abstract class U16 { + + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: u16 = u16.MIN_VALUE; - @lazy static readonly MIN_VALUE: u16 = u16.MIN_VALUE; - @lazy static readonly MAX_VALUE: u16 = u16.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: u16 = u16.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u16 { return parseI32(value, radix); @@ -120,11 +141,15 @@ export abstract class U16 { } } -@sealed -export abstract class U32 { +@sealed export abstract class U32 { + + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: u32 = u32.MIN_VALUE; - @lazy static readonly MIN_VALUE: u32 = u32.MIN_VALUE; - @lazy static readonly MAX_VALUE: u32 = u32.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: u32 = u32.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u32 { return parseI32(value, radix); @@ -136,11 +161,15 @@ export abstract class U32 { } } -@sealed -export abstract class U64 { +@sealed export abstract class U64 { - @lazy static readonly MIN_VALUE: u64 = u64.MIN_VALUE; - @lazy static readonly MAX_VALUE: u64 = u64.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: u64 = u64.MIN_VALUE; + + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: u64 = u64.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): u64 { return parseI64(value, radix); @@ -152,11 +181,15 @@ export abstract class U64 { } } -@sealed -export abstract class Usize { +@sealed export abstract class Usize { + + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: usize = usize.MIN_VALUE; - @lazy static readonly MIN_VALUE: usize = usize.MIN_VALUE; - @lazy static readonly MAX_VALUE: usize = usize.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: usize = usize.MAX_VALUE; static parseInt(value: string, radix: i32 = 0): usize { return parseI64(value, radix); @@ -168,11 +201,15 @@ export abstract class Usize { } } -@sealed -export abstract class Bool { +@sealed export abstract class Bool { + + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: bool = bool.MIN_VALUE; - @lazy static readonly MIN_VALUE: bool = bool.MIN_VALUE; - @lazy static readonly MAX_VALUE: bool = bool.MAX_VALUE; + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: bool = bool.MAX_VALUE; toString(this: bool): String { // TODO: radix? @@ -182,17 +219,39 @@ export abstract class Bool { export { Bool as Boolean }; -@sealed -export abstract class F32 { +@sealed export abstract class F32 { + + // @ts-ignore: decorator + @lazy + static readonly EPSILON: f32 = f32.EPSILON; + + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: f32 = f32.MIN_VALUE; + + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: f32 = f32.MAX_VALUE; - @lazy static readonly EPSILON: f32 = f32.EPSILON; - @lazy static readonly MIN_VALUE: f32 = f32.MIN_VALUE; - @lazy static readonly MAX_VALUE: f32 = f32.MAX_VALUE; - @lazy static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER; - @lazy static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER; - @lazy static readonly POSITIVE_INFINITY: f32 = Infinity; - @lazy static readonly NEGATIVE_INFINITY: f32 = -Infinity; - @lazy static readonly NaN: f32 = NaN; + // @ts-ignore: decorator + @lazy + static readonly MIN_SAFE_INTEGER: f32 = f32.MIN_SAFE_INTEGER; + + // @ts-ignore: decorator + @lazy + static readonly MAX_SAFE_INTEGER: f32 = f32.MAX_SAFE_INTEGER; + + // @ts-ignore: decorator + @lazy + static readonly POSITIVE_INFINITY: f32 = Infinity; + + // @ts-ignore: decorator + @lazy + static readonly NEGATIVE_INFINITY: f32 = -Infinity; + + // @ts-ignore: decorator + @lazy + static readonly NaN: f32 = NaN; static isNaN(value: f32): bool { return isNaN(value); @@ -224,17 +283,39 @@ export abstract class F32 { } } -@sealed -export abstract class F64 { - - @lazy static readonly EPSILON: f64 = f64.EPSILON; - @lazy static readonly MIN_VALUE: f64 = f64.MIN_VALUE; - @lazy static readonly MAX_VALUE: f64 = f64.MAX_VALUE; - @lazy static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER; - @lazy static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER; - @lazy static readonly POSITIVE_INFINITY: f64 = Infinity; - @lazy static readonly NEGATIVE_INFINITY: f64 = -Infinity; - @lazy static readonly NaN: f64 = NaN; +@sealed export abstract class F64 { + + // @ts-ignore: decorator + @lazy + static readonly EPSILON: f64 = f64.EPSILON; + + // @ts-ignore: decorator + @lazy + static readonly MIN_VALUE: f64 = f64.MIN_VALUE; + + // @ts-ignore: decorator + @lazy + static readonly MAX_VALUE: f64 = f64.MAX_VALUE; + + // @ts-ignore: decorator + @lazy + static readonly MIN_SAFE_INTEGER: f64 = f64.MIN_SAFE_INTEGER; + + // @ts-ignore: decorator + @lazy + static readonly MAX_SAFE_INTEGER: f64 = f64.MAX_SAFE_INTEGER; + + // @ts-ignore: decorator + @lazy + static readonly POSITIVE_INFINITY: f64 = Infinity; + + // @ts-ignore: decorator + @lazy + static readonly NEGATIVE_INFINITY: f64 = -Infinity; + + // @ts-ignore: decorator + @lazy + static readonly NaN: f64 = NaN; static isNaN(value: f64): bool { return builtin_isNaN(value); diff --git a/std/assembly/polyfills.ts b/std/assembly/polyfills.ts index 77228ec340..87b7bc4db4 100644 --- a/std/assembly/polyfills.ts +++ b/std/assembly/polyfills.ts @@ -1,4 +1,4 @@ -export function bswap(value: T): T { +export function bswap(value: T): T { if (isInteger()) { if (sizeof() == 2) { return ((value << 8) | ((value >> 8) & 0x00FF)); @@ -25,8 +25,7 @@ export function bswap(value: T): T { return value; } -@inline -export function bswap16(value: T): T { +export function bswap16(value: T): T { if (isInteger() && sizeof() <= 4) { if (sizeof() == 2) { return ((value << 8) | ((value >> 8) & 0x00FF)); diff --git a/std/assembly/rt/README.md b/std/assembly/rt/README.md new file mode 100644 index 0000000000..6e501d92d2 --- /dev/null +++ b/std/assembly/rt/README.md @@ -0,0 +1,36 @@ +The AssemblyScript Runtime +========================== + +The runtime provides the functionality necessary to dynamically allocate and deallocate memory of objects, arrays and buffers, as well as keep track of references that are no longer used. + +It is based on [the TLSF memory manager](./tlsf.ts) and [a pure reference counting garbage collector](./pure.ts). + +Interface +--------- + +* **__rt_allocate**(size: `usize`, id: `u32` = 0): `usize`
+ Dynamically allocates a chunk of memory of at least the specified size and returns its address. + Alignment is guaranteed to be 16 bytes to fit up to v128 values naturally. + +* **__rt_reallocate**(ref: `usize`, size: `usize`): `usize`
+ Dynamically changes the size of a chunk of memory, possibly moving it to a new address. + +* **__rt_free**(ref: `usize`): `void`
+ Frees a dynamically allocated chunk of memory by its address. + +* **__rt_retain**(ref: `usize`): `void`
+ Retains a reference. + +* **__rt_release**(ref: `usize`): `void`
+ Releases a reference. + +* **__rt_collect**(): `void`
+ Forces a full garbage collection cycle. + +* **__rt_typeinfo**(id: `u32`): `void`
+ Obtains the runtime type information for objects of the kind represented by the specified id. + +Stub +---- + +The fully functional yet minimal [stub implementation](./stub.ts) provides dynamic memory allocation only but doesn't include sophisticated support to deallocate objects. Useful for prototyping or very short-lived programs with hardly any memory footprint. diff --git a/std/assembly/rt/common.ts b/std/assembly/rt/common.ts new file mode 100644 index 0000000000..97af07d6b8 --- /dev/null +++ b/std/assembly/rt/common.ts @@ -0,0 +1,39 @@ +// Alignment guarantees + +// @ts-ignore: decorator +@inline export const AL_BITS: u32 = 4; // 16 bytes to fit up to v128 +// @ts-ignore: decorator +@inline export const AL_SIZE: usize = 1 << AL_BITS; +// @ts-ignore: decorator +@inline export const AL_MASK: usize = AL_SIZE - 1; + +// Extra debugging + +// @ts-ignore: decorator +@inline export const DEBUG = true; + +/** Common block structure. */ +@unmanaged export class CommonBlock { + /** Memory manager info. */ + mmInfo: usize; // WASM64 might need adaption + /** Garbage collector info. */ + gcInfo: u32; + /** Runtime class id. */ + rtId: u32; + /** Runtime object size. */ + rtSize: u32; +} + +/////////////////////////////////// Type information interface //////////////////////////////////// + +import { RTTI_BASE } from "../runtime"; +import { RTTIData } from "../common/rtti"; + +// @ts-ignore: decorator +@global @unsafe +function __rt_typeinfo(id: u32): u32 { + var ptr: usize = RTTI_BASE; + return !id || id > load(ptr) + ? unreachable() + : changetype(ptr + id * offsetof()).flags; +} diff --git a/std/assembly/rt/index.ts b/std/assembly/rt/index.ts new file mode 100644 index 0000000000..f9baadc79b --- /dev/null +++ b/std/assembly/rt/index.ts @@ -0,0 +1,58 @@ +import { AL_MASK, DEBUG } from "./common"; + +//////////////////////////////////// Memory manager interface ///////////////////////////////////// + +import { ROOT, Block, BLOCK_OVERHEAD, initializeRoot, allocateBlock, reallocateBlock, freeBlock } from "./tlsf"; + +// @ts-ignore: decorator +@global @unsafe +export function __rt_allocate(size: usize, id: u32): usize { + var root = ROOT; + if (!root) { + initializeRoot(); + root = ROOT; + } + var block = allocateBlock(root, size); + block.rtId = id; + return changetype(block) + BLOCK_OVERHEAD; +} + +// @ts-ignore: decorator +@global @unsafe +export function __rt_reallocate(ref: usize, size: usize): usize { + if (DEBUG) assert(ROOT); // must be initialized + assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned + return changetype(reallocateBlock(ROOT, changetype(ref - BLOCK_OVERHEAD), size)) + BLOCK_OVERHEAD; +} + +// @ts-ignore: decorator +@global @unsafe +export function __rt_free(ref: usize): void { + if (DEBUG) assert(ROOT); // must be initialized + assert(ref != 0 && !(ref & AL_MASK)); // must exist and be aligned + freeBlock(ROOT, changetype(ref - BLOCK_OVERHEAD)); +} + +/////////////////////////////////// Garbage collector interface /////////////////////////////////// + +import { increment, decrement, collectCycles } from "./pure"; + +// @ts-ignore: decorator +@global @unsafe +export function __rt_retain(ref: usize): void { + if (ref) increment(changetype(ref - BLOCK_OVERHEAD)); +} + +// @ts-ignore: decorator +@global @unsafe +export function __rt_release(ref: usize): void { + if (ref) decrement(changetype(ref - BLOCK_OVERHEAD)); +} + +// @ts-ignore: decorator +@global @unsafe +export function __rt_collect(): void { + collectCycles(); +} + +export { __rt_typeinfo }; diff --git a/std/assembly/rt/pure.ts b/std/assembly/rt/pure.ts new file mode 100644 index 0000000000..80c90dcf05 --- /dev/null +++ b/std/assembly/rt/pure.ts @@ -0,0 +1,239 @@ +import { DEBUG } from "./common"; +import { Block, freeBlock, ROOT } from "./tlsf"; + +/////////////////////////// A Pure Reference Counting Garbage Collector /////////////////////////// +// see: https://researcher.watson.ibm.com/researcher/files/us-bacon/Bacon03Pure.pdf + +// TODO: make visitors eat cookies so we can compile direct calls into a switch +function __rt_visit_members(s: Block, cookie: i32): void { unreachable(); } +function __rt_flags(classId: u32): u32 { return unreachable(); } +const ACYCLIC_FLAG: u32 = 0; + +// ╒══════════════════════ GC Info structure ══════════════════════╕ +// │ 3 2 1 │ +// │1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0│ +// ├─┼─┴─┴─┼─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ +// │B│color│ refCount │ +// └─┴─────┴───────────────────────────────────────────────────────┘ +// B: buffered + +// @ts-ignore: decorator +@inline const BUFFERED_MASK: u32 = 1 << (sizeof() * 8 - 1); +// @ts-ignore: decorator +@inline const COLOR_BITS = 3; +// @ts-ignore: decorator +@inline const COLOR_SHIFT: u32 = ctz(BUFFERED_MASK) - COLOR_BITS; +// @ts-ignore: decorator +@inline const COLOR_MASK: u32 = ((1 << COLOR_BITS) - 1) << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const REFCOUNT_MASK: u32 = (1 << COLOR_SHIFT) - 1; + +// ╒════════╤═══════════════════ Colors ═══════════════════════════╕ +// │ Color │ Meaning │ +// ├────────┼──────────────────────────────────────────────────────┤ +// │ BLACK │ In use or free │ +// │ GRAY │ Possible member of cycle │ +// │ WHITE │ Member of garbage cycle │ +// │ PURPLE │ Possible root of cycle │ +// │ RED │ Candidate cycle undergoing Σ-computation *concurrent │ +// │ ORANGE │ Candidate cycle awaiting epoch boundary *concurrent │ +// └────────┴──────────────────────────────────────────────────────┘ +// Acyclic detection has been decoupled, hence no GREEN. + +// @ts-ignore: decorator +@inline const COLOR_BLACK: u32 = 0 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_GRAY: u32 = 1 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_WHITE: u32 = 2 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_PURPLE: u32 = 3 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_RED: u32 = 4 << COLOR_SHIFT; +// @ts-ignore: decorator +@inline const COLOR_ORANGE: u32 = 5 << COLOR_SHIFT; + +// @ts-ignore: decorator +@inline const VISIT_DECREMENT = 1; // guard 0 +// @ts-ignore: decorator +@inline const VISIT_MARKGRAY = 2; +// @ts-ignore: decorator +@inline const VISIT_SCAN = 3; +// @ts-ignore: decorator +@inline const VISIT_SCANBLACK = 4; +// @ts-ignore: decorator +@inline const VISIT_COLLECTWHITE = 5; + +// @ts-ignore: decorator +@global +function __rt_visit(s: Block, cookie: i32): void { + switch (cookie) { + case VISIT_DECREMENT: { + decrement(s); + break; + } + case VISIT_MARKGRAY: { + if (DEBUG) assert((s.gcInfo & REFCOUNT_MASK) > 0); + s.gcInfo = s.gcInfo - 1; + markGray(s); + break; + } + case VISIT_SCAN: { + scan(s); + break; + } + case VISIT_SCANBLACK: { + let info = s.gcInfo; + assert((info & ~REFCOUNT_MASK) == ((info + 1) & ~REFCOUNT_MASK)); // overflow + s.gcInfo = info + 1; + if ((info & COLOR_MASK) != COLOR_BLACK) { + scanBlack(s); + } + break; + } + case VISIT_COLLECTWHITE: { + collectWhite(s); + break; + } + default: if (DEBUG) assert(false); + } +} + +/** Increments the reference count of the specified block by one.*/ +export function increment(s: Block): void { + var info = s.gcInfo; + assert((info & ~REFCOUNT_MASK) == ((info + 1) & ~REFCOUNT_MASK)); // overflow + s.gcInfo = info + 1; +} + +/** Decrements the reference count of the specified block by one, possibly freeing it. */ +export function decrement(s: Block): void { + var info = s.gcInfo; + var rc = info & REFCOUNT_MASK; + if (rc == 1) { + __rt_visit_members(s, VISIT_DECREMENT); + if (!(info & BUFFERED_MASK)) { + freeBlock(ROOT, s); + } else { + s.gcInfo = BUFFERED_MASK | COLOR_BLACK | 0; + } + } else { + if (DEBUG) assert(rc > 0); + if (!(__rt_flags(s.rtId) & ACYCLIC_FLAG)) { + s.gcInfo = BUFFERED_MASK | COLOR_PURPLE | (rc - 1); + if (!(info & BUFFERED_MASK)) { + appendRoot(s); + } + } else { + s.gcInfo = (info & ~REFCOUNT_MASK) | (rc - 1); + } + } +} + +/** Buffer of possible roots. */ +// @ts-ignore: decorator +@lazy var ROOTS: usize; +/** Current absolute offset into the `ROOTS` buffer. */ +// @ts-ignore: decorator +@lazy var CUR: usize = 0; +/** Current absolute end offset into the `ROOTS` buffer. */ +// @ts-ignore: decorator +@lazy var END: usize = 0; + +/** Appends a block to possible roots. */ +function appendRoot(s: Block): void { + var cur = CUR; + if (cur >= END) { + growRoots(); // TBD: either that or pick a default and force collection on overflow + cur = CUR; + } + store(cur, s); + CUR = cur + 1; +} + +/** Grows the roots buffer if it ran full. */ +function growRoots(): void { + var oldRoots = ROOTS; + var oldSize = CUR - oldRoots; + var newSize = max(oldSize * 2, 64 << alignof()); + var newRoots = memory.allocate(newSize); + memory.copy(newRoots, oldRoots, oldSize); + ROOTS = newRoots; + CUR = newRoots + oldSize; + END = newRoots + newSize; +} + +/** Collects cyclic garbage. */ +export function collectCycles(): void { + + // markRoots + var roots = ROOTS; + var cur = roots; + for (let pos = cur, end = CUR; pos < end; pos += sizeof()) { + let s = load(pos); + let info = s.gcInfo; + if ((info & COLOR_MASK) == COLOR_PURPLE && (info & REFCOUNT_MASK) > 0) { + markGray(s); + store(cur, s); + cur += sizeof(); + } else { + if ((info & COLOR_MASK) == COLOR_BLACK && !(info & REFCOUNT_MASK)) { + freeBlock(ROOT, s); + } else { + s.gcInfo = info & ~BUFFERED_MASK; + } + } + } + CUR = cur; + + // scanRoots + for (let pos = roots; pos < cur; pos += sizeof()) { + scan(load(pos)); + } + + // collectRoots + for (let pos = roots; pos < cur; pos += sizeof()) { + let s = load(pos); + s.gcInfo = s.gcInfo & ~BUFFERED_MASK; + collectWhite(s); + } + CUR = roots; +} + +/** Marks a block as gray (possible member of cycle) during the collection phase. */ +function markGray(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_MASK) != COLOR_GRAY) { + s.gcInfo = (info & ~COLOR_MASK) | COLOR_GRAY; + __rt_visit_members(s, VISIT_MARKGRAY); + } +} + +/** Scans a block during the collection phase, determining whether it is garbage or not. */ +function scan(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_MASK) == COLOR_GRAY) { + if ((info & REFCOUNT_MASK) > 0) { + scanBlack(s); + } else { + s.gcInfo = (info & ~COLOR_MASK) | COLOR_WHITE; + __rt_visit_members(s, VISIT_SCAN); + } + } +} + +/** Marks a block as black (in use) if it was found to be reachable during the collection phase. */ +function scanBlack(s: Block): void { + s.gcInfo = (s.gcInfo & ~COLOR_MASK) | COLOR_BLACK; + __rt_visit_members(s, VISIT_SCANBLACK); +} + +/** Collects all white (member of a garbage cycle) nodes when completing the collection phase. */ +function collectWhite(s: Block): void { + var info = s.gcInfo; + if ((info & COLOR_MASK) == COLOR_WHITE && !(info & BUFFERED_MASK)) { + // s.gcInfo = (info & ~COLOR_MASK) | COLOR_BLACK; + __rt_visit_members(s, VISIT_COLLECTWHITE); + } + freeBlock(ROOT, s); +} diff --git a/std/assembly/rt/stub.ts b/std/assembly/rt/stub.ts new file mode 100644 index 0000000000..0244d6cdb1 --- /dev/null +++ b/std/assembly/rt/stub.ts @@ -0,0 +1,85 @@ +import { AL_MASK, CommonBlock } from "./common"; + +// @ts-ignore: decorator +@inline +const BLOCK_OVERHEAD = (offsetof() + AL_MASK) & ~AL_MASK; + +// @ts-ignore: decorator +@inline +const BLOCK_MAXSIZE: usize = (1 << 30) - BLOCK_OVERHEAD; // match TLSF + +// @ts-ignore: decorator +@lazy +var startOffset: usize = (HEAP_BASE + AL_MASK) & ~AL_MASK; + +// @ts-ignore: decorator +@lazy +var offset: usize = startOffset; + +//////////////////////////////////// Memory manager interface ///////////////////////////////////// + +// @ts-ignore: decorator +@unsafe @global +export function __rt_allocate(size: usize, id: u32): usize { + if (size > BLOCK_MAXSIZE) unreachable(); + var ptr = offset + BLOCK_OVERHEAD; + var newPtr = (ptr + max(size, 1) + AL_MASK) & ~AL_MASK; + var pagesBefore = memory.size(); + if (newPtr > pagesBefore << 16) { + let pagesNeeded = ((newPtr - ptr + 0xffff) & ~0xffff) >>> 16; + let pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) unreachable(); // out of memory + } + } + offset = newPtr; + var block = changetype(ptr - BLOCK_OVERHEAD); + block.rtId = id; + block.rtSize = size; + return ptr; +} + +// @ts-ignore: decorator +@unsafe @global +export function __rt_reallocate(ref: usize, size: usize): usize { + var block = changetype(ref - BLOCK_OVERHEAD); + var oldSize = block.rtSize; + if (size > oldSize) { + let newRef = __rt_allocate(size, block.rtId); + memory.copy(newRef, ref, oldSize); + ref = newRef; + } else { + block.rtSize = size; + } + return ref; +} + +// @ts-ignore: decorator +@unsafe @global +export function __rt_free(ref: usize): void { +} + +// @ts-ignore: decorator +@unsafe @global +export function __rt_reset(): void { // special + offset = startOffset; +} + +/////////////////////////////////// Garbage collector interface /////////////////////////////////// + +// @ts-ignore: decorator +@global @unsafe +export function __rt_retain(ref: usize): void { +} + +// @ts-ignore: decorator +@global @unsafe +export function __rt_release(ref: usize): void { +} + +// @ts-ignore: decorator +@global @unsafe +export function __rt_collect(): void { +} + +export { __rt_typeinfo }; diff --git a/std/assembly/rt/tlsf.ts b/std/assembly/rt/tlsf.ts new file mode 100644 index 0000000000..8915ded0c0 --- /dev/null +++ b/std/assembly/rt/tlsf.ts @@ -0,0 +1,534 @@ +import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, CommonBlock } from "./common"; + +/////////////////////// The TLSF (Two-Level Segregate Fit) memory allocator /////////////////////// +// see: http://www.gii.upv.es/tlsf/ + +// - `ffs(x)` is equivalent to `ctz(x)` with x != 0 +// - `fls(x)` is equivalent to `sizeof(x) * 8 - clz(x) - 1` + +// ╒══════════════ Block size interpretation (32-bit) ═════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─╫─┴─┴─┴─┤ +// │ | FL │ SB = SL + AL │ ◄─ usize +// └───────────────────────────────────────────────┴───────╨───────┘ +// FL: first level, SL: second level, AL: alignment, SB: small block + +// @ts-ignore: decorator +@inline const SL_BITS: u32 = 4; +// @ts-ignore: decorator +@inline const SL_SIZE: usize = 1 << SL_BITS; + +// @ts-ignore: decorator +@inline const SB_BITS: usize = (SL_BITS + AL_BITS); +// @ts-ignore: decorator +@inline const SB_SIZE: usize = 1 << SB_BITS; + +// @ts-ignore: decorator +@inline const FL_BITS: u32 = 31 - SB_BITS; + +// [00]: < 256B (SB) [12]: < 1M +// [01]: < 512B [13]: < 2M +// [02]: < 1K [14]: < 4M +// [03]: < 2K [15]: < 8M +// [04]: < 4K [16]: < 16M +// [05]: < 8K [17]: < 32M +// [06]: < 16K [18]: < 64M +// [07]: < 32K [19]: < 128M +// [08]: < 64K [20]: < 256M +// [09]: < 128K [21]: < 512M +// [10]: < 256K [22]: <= 1G - OVERHEAD +// [11]: < 512K +// VMs limit to 2GB total (currently), making one 1G block max (or three 512M etc.) due to block overhead + +// Tags stored in otherwise unused alignment bits + +// @ts-ignore: decorator +@inline const FREE: usize = 1 << 0; +// @ts-ignore: decorator +@inline const LEFTFREE: usize = 1 << 1; +// @ts-ignore: decorator +@inline const TAGS_MASK: usize = FREE | LEFTFREE; // <= AL_MASK + +// ╒════════════════════ Block layout (32-bit) ════════════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┼─┼─┤ overhead ┐ +// │ size │0│L│F│ ◄─┐ info +// ├─────────────────────────────────────────────────────────┴─┴─┴─┤ │ +// │ │ │ +// │ ... additional runtime overhead ... │ │ +// │ │ │ +// ╞═══════════════════════════════════════════════════════════════╡ │ ┐ ┘ +// │ if free: ◄ prev │ ◄─┤ usize +// ├───────────────────────────────────────────────────────────────┤ │ +// │ if free: next ► │ ◄─┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ ... │ │ = 0 +// ├───────────────────────────────────────────────────────────────┤ │ +// │ if free: back ▲ │ ◄─┘ +// └───────────────────────────────────────────────────────────────┘ payload ┘ >= MIN SIZE +// F: FREE, L: LEFTFREE +@unmanaged export class Block extends CommonBlock { + + /** Previous free block, if any. Only valid if free, otherwise part of payload. */ + prev: Block | null; + /** Next free block, if any. Only valid if free, otherwise part of payload. */ + next: Block | null; + + // If the block is free, there is a 'back'reference at its end pointing at its start. +} + +// Block constants. Overhead is always present, no matter if free or used. Also, a block must have +// a minimum size of three pointers so it can hold `prev`, `next` and `back` if free. + +// @ts-ignore: decorator +@inline export const BLOCK_OVERHEAD: usize = (offsetof("prev") + AL_MASK) & ~AL_MASK; +// @ts-ignore: decorator +@inline const BLOCK_MINSIZE: usize = (3 * sizeof() + AL_MASK) & ~AL_MASK;// prev + next + back +// @ts-ignore: decorator +@inline const BLOCK_MAXSIZE: usize = 1 << (FL_BITS + SB_BITS - 1); // exclusive + +/** Gets the left block of a block. Only valid if the left block is free. */ +// @ts-ignore: decorator +@inline function GETFREELEFT(block: Block): Block { + return load(changetype(block) - sizeof()); +} + +/** Gets the right block of of a block by advancing to the right by its size. */ +// @ts-ignore: decorator +@inline function GETRIGHT(block: Block): Block { + return changetype(changetype(block) + BLOCK_OVERHEAD + (block.mmInfo & ~TAGS_MASK)); +} + +// ╒═════════════════════ Root layout (32-bit) ════════════════════╕ +// 3 2 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits +// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐ +// │ 0 | flMap S│ ◄────┐ +// ╞═══════════════════════════════════════════════════════════════╡ │ +// │ slMap[0] S │ ◄─┐ │ +// ├───────────────────────────────────────────────────────────────┤ │ │ +// │ slMap[1] │ ◄─┤ │ +// ├───────────────────────────────────────────────────────────────┤ u32 │ +// │ slMap[22] │ ◄─┘ │ +// ╞═══════════════════════════════════════════════════════════════╡ usize +// │ head[0] │ ◄────┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ ... │ ◄────┤ +// ├───────────────────────────────────────────────────────────────┤ │ +// │ head[367] │ ◄────┤ +// ╞═══════════════════════════════════════════════════════════════╡ │ +// │ tail │ ◄────┘ +// └───────────────────────────────────────────────────────────────┘ SIZE ┘ +// S: Small blocks map +@unmanaged class Root { + /** First level bitmap. */ + flMap: usize; +} + +// Root constants. Where stuff is stored inside of the root structure. + +// @ts-ignore: decorator +@inline const SL_START = sizeof(); +// @ts-ignore: decorator +@inline const SL_END = SL_START + (FL_BITS << alignof()); +// @ts-ignore: decorator +@inline const HL_START = (SL_END + AL_MASK) & ~AL_MASK; +// @ts-ignore: decorator +@inline const HL_END = HL_START + FL_BITS * SL_SIZE * sizeof(); +// @ts-ignore: decorator +@inline const ROOT_SIZE = HL_END + sizeof(); + +// @ts-ignore: decorator +@lazy export var ROOT: Root; + +/** Gets the second level map of the specified first level. */ +// @ts-ignore: decorator +@inline function GETSL(root: Root, fl: usize): u32 { + return load( + changetype(root) + (fl << alignof()), + SL_START + ); +} + +/** Sets the second level map of the specified first level. */ +// @ts-ignore: decorator +@inline function SETSL(root: Root, fl: usize, slMap: u32): void { + store( + changetype(root) + (fl << alignof()), + slMap, + SL_START + ); +} + +/** Gets the head of the free list for the specified combination of first and second level. */ +// @ts-ignore: decorator +@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null { + return load( + changetype(root) + (((fl << SL_BITS) + sl) << alignof()), + HL_START + ); +} + +/** Sets the head of the free list for the specified combination of first and second level. */ +// @ts-ignore: decorator +@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void { + store( + changetype(root) + (((fl << SL_BITS) + sl) << alignof()), + head, + HL_START + ); +} + +/** Gets the tail block.. */ +// @ts-ignore: decorator +@inline function GETTAIL(root: Root): Block { + return load( + changetype(root), + HL_END + ); +} + +/** Sets the tail block. */ +// @ts-ignore: decorator +@inline function SETTAIL(root: Root, tail: Block): void { + store( + changetype(root), + tail, + HL_END + ); +} + +/** Inserts a previously used block back into the free list. */ +function insertBlock(root: Root, block: Block): void { + if (DEBUG) assert(block); // cannot be null + var blockInfo = block.mmInfo; + if (DEBUG) assert(blockInfo & FREE); // must be free + + var right = GETRIGHT(block); + var rightInfo = right.mmInfo; + + // merge with right block if also free + if (rightInfo & FREE) { + let newSize = (blockInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); + if (newSize < BLOCK_MAXSIZE) { + removeBlock(root, right); + block.mmInfo = blockInfo = (blockInfo & TAGS_MASK) | newSize; + right = GETRIGHT(block); + rightInfo = right.mmInfo; + // 'back' is set below + } + } + + // merge with left block if also free + if (blockInfo & LEFTFREE) { + let left = GETFREELEFT(block); + let leftInfo = left.mmInfo; + if (DEBUG) assert(leftInfo & FREE); // must be free according to right tags + let newSize = (leftInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (blockInfo & ~TAGS_MASK); + if (newSize < BLOCK_MAXSIZE) { + removeBlock(root, left); + left.mmInfo = blockInfo = (leftInfo & TAGS_MASK) | newSize; + block = left; + // 'back' is set below + } + } + + right.mmInfo = rightInfo | LEFTFREE; + // right is no longer used now, hence rightInfo is not synced + + // we now know the size of the block + var size = blockInfo & ~TAGS_MASK; + if (DEBUG) assert(size >= BLOCK_MINSIZE && size < BLOCK_MAXSIZE); // must be a valid size + if (DEBUG) assert(changetype(block) + BLOCK_OVERHEAD + size == changetype(right)); // must match + + // set 'back' to itself at the end of block + store(changetype(right) - sizeof(), block); + + // mapping_insert + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size >> AL_BITS); + } else { + const inv: usize = sizeof() * 8 - 1; + fl = inv - clz(size); + sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range + + // perform insertion + var head = GETHEAD(root, fl, sl); + block.prev = null; + block.next = head; + if (head) head.prev = block; + SETHEAD(root, fl, sl, block); + + // update first and second level maps + root.flMap |= (1 << fl); + SETSL(root, fl, GETSL(root, fl) | (1 << sl)); +} + +/** Removes a free block from internal lists. */ +function removeBlock(root: Root, block: Block): void { + var blockInfo = block.mmInfo; + if (DEBUG) assert(blockInfo & FREE); // must be free + var size = blockInfo & ~TAGS_MASK; + if (DEBUG) assert(size >= BLOCK_MINSIZE && size < BLOCK_MAXSIZE); // must be valid + + // mapping_insert + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size >> AL_BITS); + } else { + const inv: usize = sizeof() * 8 - 1; + fl = inv - clz(size); + sl = ((size >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range + + // link previous and next free block + var prev = block.prev; + var next = block.next; + if (prev) prev.next = next; + if (next) next.prev = prev; + + // update head if we are removing it + if (block == GETHEAD(root, fl, sl)) { + SETHEAD(root, fl, sl, next); + + // clear second level map if head is empty now + if (!next) { + let slMap = GETSL(root, fl); + SETSL(root, fl, slMap &= ~(1 << sl)); + + // clear first level map if second level is empty now + if (!slMap) root.flMap &= ~(1 << fl); + } + } + // note: does not alter left/back because it is likely that splitting + // is performed afterwards, invalidating those changes. so, the caller + // must perform those updates. +} + +/** Searches for a free block of at least the specified size. */ +function searchBlock(root: Root, size: usize): Block | null { + // size was already asserted by caller + + // mapping_search + var fl: usize, sl: u32; + if (size < SB_SIZE) { + fl = 0; + sl = (size >> AL_BITS); + } else { + const halfMaxSize = BLOCK_MAXSIZE >> 1; // don't round last fl + const inv: usize = sizeof() * 8 - 1; + const invRound = inv - SL_BITS; + let requestSize = size < halfMaxSize + ? size + (1 << (invRound - clz(size))) - 1 + : size; + fl = inv - clz(requestSize); + sl = ((requestSize >> (fl - SL_BITS)) ^ (1 << SL_BITS)); + fl -= SB_BITS - 1; + } + if (DEBUG) assert(fl < FL_BITS && sl < SL_SIZE); // fl/sl out of range + + // search second level + var slMap = GETSL(root, fl) & (~0 << sl); + var head: Block | null; + if (!slMap) { + // search next larger first level + let flMap = root.flMap & (~0 << (fl + 1)); + if (!flMap) { + head = null; + } else { + fl = ctz(flMap); + slMap = GETSL(root, fl); + if (DEBUG) assert(slMap); // can't be zero if fl points here + head = GETHEAD(root, fl, ctz(slMap)); + } + } else { + head = GETHEAD(root, fl, ctz(slMap)); + } + return head; +} + +/** Prepares the specified block before (re-)use, possibly splitting it. */ +function prepareBlock(root: Root, block: Block, size: usize): void { + // size was already asserted by caller + + var blockInfo = block.mmInfo; + if (DEBUG) assert(!(size & AL_MASK)); // size must be aligned so the new block is + + // split if the block can hold another MINSIZE block incl. overhead + var remaining = (blockInfo & ~TAGS_MASK) - size; + if (remaining >= BLOCK_OVERHEAD + BLOCK_MINSIZE) { + block.mmInfo = size | (blockInfo & LEFTFREE); // also discards FREE + + let spare = changetype(changetype(block) + BLOCK_OVERHEAD + size); + spare.mmInfo = (remaining - BLOCK_OVERHEAD) | FREE; // not LEFTFREE + insertBlock(root, spare); // also sets 'back' + + // otherwise tag block as no longer FREE and right as no longer LEFTFREE + } else { + block.mmInfo = blockInfo & ~FREE; + GETRIGHT(block).mmInfo &= ~LEFTFREE; + } +} + +/** Adds more memory to the pool. */ +function addMemory(root: Root, start: usize, end: usize): bool { + if (DEBUG) { + assert( + start <= end && // must be valid + !(start & AL_MASK) && // must be aligned + !(end & AL_MASK) // must be aligned + ); + } + + var tail = GETTAIL(root); + var tailInfo: usize = 0; + if (tail) { // more memory + if (DEBUG) assert(start >= changetype(tail) + BLOCK_OVERHEAD); + + // merge with current tail if adjacent + if (start - BLOCK_OVERHEAD == changetype(tail)) { + start -= BLOCK_OVERHEAD; + tailInfo = tail.mmInfo; + } else { + // We don't do this, but a user might `memory.grow` manually + // leading to non-adjacent pages managed by TLSF. + } + + } else if (DEBUG) { // first memory + assert(start >= changetype(root) + ROOT_SIZE); // starts after root + } + + // check if size is large enough for a free block and the tail block + var size = end - start; + if (size < BLOCK_OVERHEAD + BLOCK_MINSIZE + BLOCK_OVERHEAD) { + return false; + } + + // left size is total minus its own and the zero-length tail's header + var leftSize = size - 2 * BLOCK_OVERHEAD; + var left = changetype(start); + left.mmInfo = leftSize | FREE | (tailInfo & LEFTFREE); + left.prev = null; + left.next = null; + + // tail is a zero-length used block + tail = changetype(start + size - BLOCK_OVERHEAD); + tail.mmInfo = 0 | LEFTFREE; + SETTAIL(root, tail); + + insertBlock(root, left); // also merges with free left before tail / sets 'back' + + return true; +} + +/** Grows memory to fit at least another block of the specified size. */ +function growMemory(root: Root, size: usize): void { + var pagesBefore = memory.size(); + var pagesNeeded = (((size + 0xffff) & ~0xffff) >>> 16); + var pagesWanted = max(pagesBefore, pagesNeeded); // double memory + if (memory.grow(pagesWanted) < 0) { + if (memory.grow(pagesNeeded) < 0) unreachable(); + } + var pagesAfter = memory.size(); + addMemory(root, pagesBefore << 16, pagesAfter << 16); +} + +/** Prepares and checks an allocation size. */ +function prepareSize(size: usize): usize { + if (size >= BLOCK_MAXSIZE) throw new Error("allocation too large"); + return max((size + AL_MASK) & ~AL_MASK, BLOCK_MINSIZE); // align and ensure min size +} + +/** Initilizes the root structure. */ +export function initializeRoot(): void { + var rootOffset = (HEAP_BASE + AL_MASK) & ~AL_MASK; + var pagesBefore = memory.size(); + var pagesNeeded = ((((rootOffset + ROOT_SIZE) + 0xffff) & ~0xffff) >>> 16); + if (pagesNeeded > pagesBefore && memory.grow(pagesNeeded - pagesBefore) < 0) unreachable(); + var root = changetype(rootOffset); + root.flMap = 0; + SETTAIL(root, changetype(0)); + for (let fl: usize = 0; fl < FL_BITS; ++fl) { + SETSL(root, fl, 0); + for (let sl: u32 = 0; sl < SL_SIZE; ++sl) { + SETHEAD(root, fl, sl, null); + } + } + addMemory(root, (rootOffset + ROOT_SIZE + AL_MASK) & ~AL_MASK, memory.size() << 16); + ROOT = root; +} + +/** Allocates a block of the specified size. */ +export function allocateBlock(root: Root, size: usize): Block { + var payloadSize = prepareSize(size); + var block = searchBlock(root, payloadSize); + if (!block) { + growMemory(root, payloadSize); + block = searchBlock(root, payloadSize); + if (DEBUG) assert(block); // must be found now + } + if (DEBUG) assert((block.mmInfo & ~TAGS_MASK) >= payloadSize); // must fit + block.gcInfo = 0; + block.rtId = 0; // not determined yet + block.rtSize = size; + removeBlock(root, block); + prepareBlock(root, block, payloadSize); + return block; +} + +/** Reallocates a block to the specified size. */ +export function reallocateBlock(root: Root, block: Block, size: usize): Block { + var payloadSize = prepareSize(size); + var blockInfo = block.mmInfo; + if (DEBUG) assert(!(blockInfo & FREE)); // must be used + + // possibly split and update runtime size if it still fits + if (payloadSize <= (blockInfo & ~TAGS_MASK)) { + prepareBlock(root, block, payloadSize); + block.rtSize = size; + return block; + } + + // merge with right free block if merger is large enough + var right = GETRIGHT(block); + var rightInfo = right.mmInfo; + if (rightInfo & FREE) { + let mergeSize = (blockInfo & ~TAGS_MASK) + BLOCK_OVERHEAD + (rightInfo & ~TAGS_MASK); + if (mergeSize >= payloadSize) { + removeBlock(root, right); + // TODO: this can yield an intermediate block larger than BLOCK_MAXSIZE, which + // is immediately split though. does this trigger any assertions / issues? + block.mmInfo = (blockInfo & TAGS_MASK) | mergeSize; + block.rtSize = size; + prepareBlock(root, block, payloadSize); + return block; + } + } + + // otherwise move the block + var newBlock = allocateBlock(root, size); + newBlock.gcInfo = block.gcInfo; + newBlock.rtId = block.rtId; + memory.copy(changetype(newBlock) + BLOCK_OVERHEAD, changetype(block) + BLOCK_OVERHEAD, size); + block.mmInfo = blockInfo | FREE; + insertBlock(root, block); + return newBlock; +} + +/** Frees a block. */ +export function freeBlock(root: Root, block: Block): void { + var blockInfo = block.mmInfo; + assert(!(blockInfo & FREE)); // must be used (user might call through to this) + block.mmInfo = blockInfo | FREE; + insertBlock(root, block); +} diff --git a/std/assembly/runtime.ts b/std/assembly/runtime.ts new file mode 100644 index 0000000000..6adfb1b26e --- /dev/null +++ b/std/assembly/runtime.ts @@ -0,0 +1,148 @@ +// The runtime provides common functionality that links runtime interfaces for memory management +// and garbage collection to the standard library, making sure it all plays well together. + +import { HEADER, HEADER_SIZE, allocate, register } from "./util/runtime"; +import { E_NOTIMPLEMENTED } from "./util/error"; +import { ArrayBufferView } from "./arraybuffer"; +import { RTTIFlags, RTTIData } from "./common/rtti"; + +// @ts-ignore: decorator +@builtin +export declare const RTTI_BASE: usize; + +/** Gets the computed unique id of a class type. */ +// @ts-ignore: decorator +@builtin +export declare function __runtime_id(): u32; + +/** Marks root objects when a tracing GC is present. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function __gc_mark_roots(): void; + +/** Marks class members when a tracing GC is present. */ +// @ts-ignore: decorator +@unsafe @builtin +export declare function __gc_mark_members(classId: u32, ref: usize): void; + +/** Runtime implementation. */ +@unmanaged +export class runtime { + private constructor() { return unreachable(); } + + /** Determines whether a managed object is considered to be an instance of the class represented by the specified runtime id. */ + static instanceof(ref: usize, superId: u32): bool { // keyword + var id = changetype
(ref - HEADER_SIZE).classId; + var ptr = RTTI_BASE; + if (id && id <= load(ptr)) { + do if (id == superId) return true; + while (id = changetype(ptr + id * offsetof()).base); + } + return false; + } +} +export namespace runtime { + + /** Gets the runtime flags of the managed type represented by the specified runtime id. */ + export function flags(id: u32): RTTIFlags { + var ptr = RTTI_BASE; + return !id || id > load(ptr) + ? unreachable() + : changetype(ptr + id * offsetof()).flags; + } + + /** Allocates and registers, but doesn't initialize the data of, a new managed object of the specified kind. */ + // @ts-ignore: decorator + @unsafe + export function newObject(payloadSize: u32, id: u32): usize { + return register(allocate(payloadSize), id); + } + + /** Allocates and registers, but doesn't initialize the data of, a new `String` of the specified length. */ + // @ts-ignore: decorator + @unsafe + export function newString(length: i32): usize { + return newObject(length << 1, __runtime_id()); + } + + /** Allocates and registers, but doesn't initialize the data of, a new `ArrayBuffer` of the specified byteLength. */ + // @ts-ignore: decorator + @unsafe + export function newArrayBuffer(byteLength: i32): usize { + return newObject(byteLength, __runtime_id()); + } + + /** Allocates and registers a new `Array` of the specified kind using the given backing buffer. */ + // @ts-ignore: decorator + @unsafe + export function newArray(id: u32, buffer: usize): usize { + var flags = runtime.flags(id); // traps if invalid + var alignLog2 = (flags / RTTIFlags.VALUE_ALIGN_0) & 31; + var byteLength: i32; + if (!buffer) buffer = newArrayBuffer(byteLength = 0); + else byteLength = changetype(buffer).byteLength; + var array = newObject(id, offsetof()); + changetype(array).data = changetype(buffer); // links + changetype(array).dataStart = buffer; + changetype(array).dataLength = byteLength; + store(changetype(array), byteLength >>> alignLog2, offsetof("length_")); + if (flags & RTTIFlags.VALUE_MANAGED) { + let cur = buffer; + let end = cur + byteLength; + while (cur < end) { + let ref = load(cur); + if (ref) { + if (isDefined(__ref_link)) __ref_link(ref, array); + else if (isDefined(__ref_retain)) __ref_retain(ref); + else assert(false); + } + cur += sizeof(); + } + } + return array; + } + + /** Retains a managed object externally, making sure that it doesn't become collected. */ + // @ts-ignore: decorator + @unsafe + export function retain(ref: usize): void { + if (isDefined(__ref_collect)) { + if (isDefined(__ref_link)) __ref_link(ref, changetype(ROOT)); + else if (isDefined(__ref_retain)) __ref_retain(ref); + } + } + + /** Releases a managed object externally, allowing it to become collected. */ + // @ts-ignore: decorator + @unsafe + export function release(ref: usize): void { + if (isDefined(__ref_collect)) { + if (isDefined(__ref_unlink)) __ref_unlink(ref, changetype(ROOT)); + else if (isDefined(__ref_release)) __ref_release(ref); + } + } + + /** Performs a full garbage collection cycle. */ + // @ts-ignore: decorator + @unsafe + export function collect(): void { + // FIXME: annotated unsafe because calling it in the middle of a function collects inner + // references prematurely with a tracing GC, which is pretty bad actually. + + // function explode(): Ref { + // var ref = new Ref(); + // gc.collect(); // collects ref + // return ref; + // } + + if (isDefined(__ref_collect)) __ref_collect(); + else throw new Error(E_NOTIMPLEMENTED); + } +} + +class Root {} + +/** A root object to retain managed objects on externally. */ +// @ts-ignore +@lazy +var ROOT = new Root(); diff --git a/std/assembly/runtime/README.md b/std/assembly/runtime/README.md new file mode 100644 index 0000000000..22d4f4ba50 --- /dev/null +++ b/std/assembly/runtime/README.md @@ -0,0 +1,38 @@ +AssemblyScript runtimes +======================= + +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 + +Trace +----- + +``` +$> asc ... +``` + +The [trace runtime](./trace.ts) adds support for dynamic memory management and garbage collection to your program. + +* [TLSF memory allocator](../allocator/tlsf.ts) +* [ITCM garbage collector](../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](../allocator/arena.ts) with `memory.reset()` +* No garbage collector diff --git a/std/assembly/runtime/arena.ts b/std/assembly/runtime/arena.ts new file mode 100644 index 0000000000..4d869414e0 --- /dev/null +++ b/std/assembly/runtime/arena.ts @@ -0,0 +1,3 @@ +import "allocator/arena"; + +export { runtime as $ }; diff --git a/std/assembly/runtime/none.ts b/std/assembly/runtime/none.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/std/assembly/runtime/trace.ts b/std/assembly/runtime/trace.ts new file mode 100644 index 0000000000..29be1ab678 --- /dev/null +++ b/std/assembly/runtime/trace.ts @@ -0,0 +1,4 @@ +import "allocator/tlsf"; +import "collector/itcm"; + +export { runtime as $ }; diff --git a/std/assembly/set.ts b/std/assembly/set.ts index e7f527ef4f..367e3b3d10 100644 --- a/std/assembly/set.ts +++ b/std/assembly/set.ts @@ -1,16 +1,21 @@ -import { - HEADER_SIZE as HEADER_SIZE_AB -} from "./internal/arraybuffer"; +/// -import { - HASH -} from "./internal/hash"; +import { HASH } from "./util/hash"; +import { __runtime_id, __gc_mark_members } from "./runtime"; // A deterministic hash set based on CloseTable from https://github.com/jorendorff/dht -@inline const INITIAL_CAPACITY = 4; -@inline const FILL_FACTOR: f64 = 8 / 3; -@inline const FREE_FACTOR: f64 = 3 / 4; +// @ts-ignore: decorator +@inline +const INITIAL_CAPACITY = 4; + +// @ts-ignore: decorator +@inline +const FILL_FACTOR: f64 = 8 / 3; + +// @ts-ignore: decorator +@inline +const FREE_FACTOR: f64 = 3 / 4; /** Structure of a set entry. */ @unmanaged class SetEntry { @@ -19,20 +24,28 @@ import { } /** Empty bit. */ -@inline const EMPTY: usize = 1 << 0; +// @ts-ignore: decorator +@inline +const EMPTY: usize = 1 << 0; /** Size of a bucket. */ -@inline const BUCKET_SIZE = sizeof(); +// @ts-ignore: decorator +@inline +const BUCKET_SIZE = sizeof(); /** Computes the alignment of an entry. */ -@inline function ENTRY_ALIGN(): usize { +// @ts-ignore: decorator +@inline +function ENTRY_ALIGN(): usize { // can align to 4 instead of 8 if 32-bit and K is <= 32-bits const align = (sizeof() > sizeof() ? sizeof() : sizeof()) - 1; return align; } /** Computes the aligned size of an entry. */ -@inline function ENTRY_SIZE(): usize { +// @ts-ignore: decorator +@inline +function ENTRY_SIZE(): usize { const align = ENTRY_ALIGN(); const size = (offsetof>() + align) & ~align; return size; @@ -59,7 +72,7 @@ export class Set { this.buckets = new ArrayBuffer(bucketsSize); this.bucketsMask = INITIAL_CAPACITY - 1; const entriesSize = INITIAL_CAPACITY * ENTRY_SIZE(); - this.entries = new ArrayBuffer(entriesSize, true); + this.entries = new ArrayBuffer(entriesSize); this.entriesCapacity = INITIAL_CAPACITY; this.entriesOffset = 0; this.entriesCount = 0; @@ -67,8 +80,7 @@ export class Set { private find(key: K, hashCode: u32): SetEntry | null { var entry = load>( - changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE, - HEADER_SIZE_AB + changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE ); while (entry) { if (!(entry.taggedNext & EMPTY) && entry.key == key) return entry; @@ -78,12 +90,12 @@ export class Set { } has(key: K): bool { - return this.find(key, HASH(key)) !== null; + return this.find(key, HASH(key)) !== null; } add(key: K): void { - var hashCode = HASH(key); - var entry = this.find(key, hashCode); + var hashCode = HASH(key); + var entry = this.find(key, hashCode); // unmanaged! if (!entry) { // check if rehashing is necessary if (this.entriesOffset == this.entriesCapacity) { @@ -95,22 +107,49 @@ export class Set { } // append new entry let entries = this.entries; - entry = changetype>( - changetype(entries) + HEADER_SIZE_AB + this.entriesOffset++ * ENTRY_SIZE() - ); + entry = changetype>(changetype(entries) + this.entriesOffset++ * ENTRY_SIZE()); entry.key = key; + // link with the set + if (isManaged()) { + if (isNullable()) { + if (key !== null) { + if (isDefined(__ref_link)) __ref_link(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(key)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) __ref_link(changetype(key), changetype(this)); + else if (isDefined(__ref_retain)) __ref_retain(changetype(key)); + else assert(false); + } + } ++this.entriesCount; // link with previous entry in bucket let bucketPtrBase = changetype(this.buckets) + (hashCode & this.bucketsMask) * BUCKET_SIZE; - entry.taggedNext = load(bucketPtrBase, HEADER_SIZE_AB); - store(bucketPtrBase, changetype(entry), HEADER_SIZE_AB); - if (isManaged()) __gc_link(changetype(this), changetype(key)); // tslint:disable-line + entry.taggedNext = load(bucketPtrBase); + store(bucketPtrBase, changetype(entry)); } } delete(key: K): bool { var entry = this.find(key, HASH(key)); if (!entry) return false; + if (isManaged()) { + key = entry.key; // exact, e.g. string + if (isNullable()) { + if (key !== null) { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(key), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(key)); + else assert(false); + } + } else { + if (isDefined(__ref_link)) { + if (isDefined(__ref_unlink)) __ref_unlink(changetype(key), changetype(this)); + } else if (isDefined(__ref_retain)) __ref_release(changetype(key)); + else assert(false); + } + } entry.taggedNext |= EMPTY; --this.entriesCount; // check if rehashing is appropriate @@ -126,12 +165,12 @@ export class Set { var newBucketsCapacity = (newBucketsMask + 1); var newBuckets = new ArrayBuffer(newBucketsCapacity * BUCKET_SIZE); var newEntriesCapacity = (newBucketsCapacity * FILL_FACTOR); - var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE(), true); + var newEntries = new ArrayBuffer(newEntriesCapacity * ENTRY_SIZE()); // copy old entries to new entries - var oldPtr = changetype(this.entries) + HEADER_SIZE_AB; + var oldPtr = changetype(this.entries); var oldEnd = oldPtr + this.entriesOffset * ENTRY_SIZE(); - var newPtr = changetype(newEntries) + HEADER_SIZE_AB; + var newPtr = changetype(newEntries); while (oldPtr != oldEnd) { let oldEntry = changetype>(oldPtr); if (!(oldEntry.taggedNext & EMPTY)) { @@ -139,8 +178,8 @@ export class Set { newEntry.key = oldEntry.key; let newBucketIndex = HASH(oldEntry.key) & newBucketsMask; let newBucketPtrBase = changetype(newBuckets) + newBucketIndex * BUCKET_SIZE; - newEntry.taggedNext = load(newBucketPtrBase, HEADER_SIZE_AB); - store(newBucketPtrBase, newPtr, HEADER_SIZE_AB); + newEntry.taggedNext = load(newBucketPtrBase); + store(newBucketPtrBase, newPtr); newPtr += ENTRY_SIZE(); } oldPtr += ENTRY_SIZE(); @@ -157,19 +196,30 @@ export class Set { return "[object Set]"; } - private __gc(): void { - __gc_mark(changetype(this.buckets)); // tslint:disable-line + // GC integration + + @unsafe private __traverse(): void { + __ref_mark(changetype(this.buckets)); var entries = this.entries; - __gc_mark(changetype(entries)); // tslint:disable-line + __ref_mark(changetype(entries)); if (isManaged()) { - let offset: usize = 0; - let end: usize = this.entriesOffset * ENTRY_SIZE(); - while (offset < end) { - let entry = changetype>( - changetype(entries) + HEADER_SIZE_AB + offset * ENTRY_SIZE() - ); - if (!(entry.taggedNext & EMPTY)) __gc_mark(changetype(entry.key)); // tslint:disable-line - offset += ENTRY_SIZE(); + let cur = changetype(entries); + let end = cur + this.entriesOffset * ENTRY_SIZE(); + while (cur < end) { + let entry = changetype>(cur); + if (!(entry.taggedNext & EMPTY)) { + let val = changetype(entry.key); + if (isNullable()) { + if (val) { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + } else { + __ref_mark(val); + __gc_mark_members(__runtime_id(), val); + } + } + cur += ENTRY_SIZE(); } } } diff --git a/std/assembly/string.ts b/std/assembly/string.ts index c1a343c224..98c8898a97 100644 --- a/std/assembly/string.ts +++ b/std/assembly/string.ts @@ -1,203 +1,151 @@ -import { - HEADER_SIZE, - MAX_LENGTH, - allocateUnsafe, - compareUnsafe, - repeatUnsafe, - copyUnsafe, - isWhiteSpaceOrLineTerminator, - CharCode, - parse -} from "./internal/string"; - -import { - STORE -} from "./internal/arraybuffer"; - -@sealed -export class String { - - readonly length: i32; // capped to [0, MAX_LENGTH] +/// + +import { MAX_SIZE_32 } from "./util/allocator"; +import { HEADER, HEADER_SIZE, allocate, register, NEWARRAY } from "./util/runtime"; +import { compareImpl, parse, CharCode, isWhiteSpaceOrLineTerminator } from "./util/string"; +import { E_INVALIDLENGTH } from "./util/error"; +import { __runtime_id } from "./runtime"; +import { ArrayBufferView } from "./arraybuffer"; + +@sealed export abstract class String { + + @lazy static readonly MAX_LENGTH: i32 = (MAX_SIZE_32 - HEADER_SIZE) >> alignof(); // TODO Add and handle second argument static fromCharCode(code: i32): String { - var out = allocateUnsafe(1); - store( - changetype(out), - code, - HEADER_SIZE - ); - return out; + var out = allocate(2); + store(out, code); + return changetype(register(out, __runtime_id())); } static fromCodePoint(code: i32): String { assert(code <= 0x10FFFF); var sur = code > 0xFFFF; - var out = allocateUnsafe(sur + 1); + var out = allocate((i32(sur) + 1) << 1); if (!sur) { - store( - changetype(out), - code, - HEADER_SIZE - ); + store(out, code); } else { code -= 0x10000; let hi: u32 = (code >>> 10) + 0xD800; let lo: u32 = (code & 0x3FF) + 0xDC00; - store( - changetype(out), - (hi << 16) | lo, - HEADER_SIZE - ); + store(out, (hi << 16) | lo); } - return out; + return changetype(register(out, __runtime_id())); } - @operator("[]") - charAt(pos: i32): String { - assert(this !== null); + // @ts-ignore: decorator + // @unsafe + // constructor(length: i32) { + // return changetype(register(allocate(length << 1), __runtime_id())); + // } - if (pos >= this.length) return changetype(""); + get length(): i32 { + return changetype
(changetype(this) - HEADER_SIZE).payloadSize >> 1; + } - var out = allocateUnsafe(1); - store( - changetype(out), - load( - changetype(this) + (pos << 1), - HEADER_SIZE - ), - HEADER_SIZE - ); - return out; + @operator("[]") charAt(pos: i32): String { + assert(this !== null); + if (pos >= this.length) return changetype(""); + var out = allocate(2); + store(out, load(changetype(this) + (pos << 1))); + return changetype(register(out, __runtime_id())); } charCodeAt(pos: i32): i32 { - assert(this !== null); if (pos >= this.length) return -1; // (NaN) - - return load( - changetype(this) + (pos << 1), - HEADER_SIZE - ); + return load(changetype(this) + (pos << 1)); } codePointAt(pos: i32): i32 { - assert(this !== null); if (pos >= this.length) return -1; // (undefined) - - var first = load( - changetype(this) + (pos << 1), - HEADER_SIZE - ); - if (first < 0xD800 || first > 0xDBFF || pos + 1 == this.length) { - return first; - } - var second = load( - changetype(this) + ((pos + 1) << 1), - HEADER_SIZE - ); + var first = load(changetype(this) + (pos << 1)); + if (first < 0xD800 || first > 0xDBFF || pos + 1 == this.length) return first; + var second = load(changetype(this) + ((pos + 1) << 1)); if (second < 0xDC00 || second > 0xDFFF) return first; return ((first - 0xD800) << 10) + (second - 0xDC00) + 0x10000; } - @operator("+") - private static __concat(left: String, right: String): String { - if (!changetype(left)) left = changetype("null"); - return left.concat(right); + @operator("+") private static __concat(left: String, right: String): String { + return select(left, changetype("null"), left !== null).concat(right); } concat(other: String): String { - assert(this !== null); if (other === null) other = changetype("null"); - - var thisLen: isize = this.length; - var otherLen: isize = other.length; - var outLen: usize = thisLen + otherLen; - if (outLen == 0) return changetype(""); - var out = allocateUnsafe(outLen); - copyUnsafe(out, 0, this, 0, thisLen); - copyUnsafe(out, thisLen, other, 0, otherLen); - return out; + var thisSize: isize = this.length << 1; + var otherSize: isize = other.length << 1; + var outSize: usize = thisSize + otherSize; + if (outSize == 0) return changetype(""); + var out = allocate(outSize); + memory.copy(out, changetype(this), thisSize); + memory.copy(out + thisSize, changetype(other), otherSize); + return changetype(register(out, __runtime_id())); } - endsWith(searchString: String, endPosition: i32 = MAX_LENGTH): bool { + endsWith(searchString: String, endPosition: i32 = String.MAX_LENGTH): bool { assert(this !== null); if (searchString === null) return false; var end = min(max(endPosition, 0), this.length); var searchLength: isize = searchString.length; var start: isize = end - searchLength; if (start < 0) return false; - return !compareUnsafe(this, start, searchString, 0, searchLength); + // @ts-ignore: string <-> String + return !compareImpl(this, start, searchString, 0, searchLength); } - @operator("==") - private static __eq(left: String, right: String): bool { + @operator("==") private static __eq(left: String | null, right: String | null): bool { if (left === right) return true; if (left === null || right === null) return false; - var leftLength = left.length; if (leftLength != right.length) return false; - - return !compareUnsafe(left, 0, right, 0, leftLength); + // @ts-ignore: string <-> String + return !compareImpl(left, 0, right, 0, leftLength); } @operator.prefix("!") - private static __not(str: String): bool { + private static __not(str: String | null): bool { return str === null || !str.length; } @operator("!=") - private static __ne(left: String, right: String): bool { + private static __ne(left: String | null, right: String | null): bool { return !this.__eq(left, right); } - @operator(">") - private static __gt(left: String, right: String): bool { + @operator(">") private static __gt(left: String | null, right: String | null): bool { if (left === right || left === null || right === null) return false; - var leftLength = left.length; var rightLength = right.length; - if (!leftLength) return false; if (!rightLength) return true; - - var length = min(leftLength, rightLength); - return compareUnsafe(left, 0, right, 0, length) > 0; + // @ts-ignore: string <-> String + return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) > 0; } - @operator(">=") - private static __gte(left: String, right: String): bool { + @operator(">=") private static __gte(left: String, right: String): bool { return !this.__lt(left, right); } - @operator("<") - private static __lt(left: String, right: String): bool { + @operator("<") private static __lt(left: String, right: String): bool { if (left === right || left === null || right === null) return false; - var leftLength = left.length; var rightLength = right.length; - if (!rightLength) return false; if (!leftLength) return true; - - var length = min(leftLength, rightLength); - return compareUnsafe(left, 0, right, 0, length) < 0; + // @ts-ignore: string <-> String + return compareImpl(left, 0, right, 0, min(leftLength, rightLength)) < 0; } - @operator("<=") - private static __lte(left: String, right: String): bool { + @operator("<=") private static __lte(left: String, right: String): bool { return !this.__gt(left, right); } - @inline - includes(searchString: String, position: i32 = 0): bool { + @inline includes(searchString: String, position: i32 = 0): bool { return this.indexOf(searchString, position) != -1; } indexOf(searchString: String, fromIndex: i32 = 0): i32 { assert(this !== null); if (searchString === null) searchString = changetype("null"); - var searchLen: isize = searchString.length; if (!searchLen) return 0; var len: isize = this.length; @@ -205,7 +153,8 @@ export class String { var start = min(max(fromIndex, 0), len); len -= searchLen; for (let k: isize = start; k <= len; ++k) { - if (!compareUnsafe(this, k, searchString, 0, searchLen)) return k; + // @ts-ignore: string <-> String + if (!compareImpl(this, k, searchString, 0, searchLen)) return k; } return -1; } @@ -213,14 +162,14 @@ export class String { lastIndexOf(searchString: String, fromIndex: i32 = i32.MAX_VALUE): i32 { assert(this !== null); if (searchString === null) searchString = changetype("null"); - var len: isize = this.length; var searchLen: isize = searchString.length; if (!searchLen) return len; if (!len) return -1; var start = min(max(fromIndex, 0), len - searchLen); for (let k = start; k >= 0; --k) { - if (!compareUnsafe(this, k, searchString, 0, searchLen)) return k; + // @ts-ignore: string <-> String + if (!compareImpl(this, k, searchString, 0, searchLen)) return k; } return -1; } @@ -228,13 +177,13 @@ export class String { startsWith(searchString: String, position: i32 = 0): bool { assert(this !== null); if (searchString === null) searchString = changetype("null"); - var pos: isize = position; var len: isize = this.length; var start = min(max(pos, 0), len); var searchLength: isize = searchString.length; if (searchLength + start > len) return false; - return !compareUnsafe(this, start, searchString, 0, searchLength); + // @ts-ignore: string <-> String + return !compareImpl(this, start, searchString, 0, searchLength); } substr(start: i32, length: i32 = i32.MAX_VALUE): String { @@ -245,52 +194,52 @@ export class String { if (intStart < 0) intStart = max(size + intStart, 0); var resultLength = min(max(end, 0), size - intStart); if (resultLength <= 0) return changetype(""); - var out = allocateUnsafe(resultLength); - copyUnsafe(out, 0, this, intStart, resultLength); - return out; + var out = allocate(resultLength << 1); + memory.copy(out, changetype(this) + intStart, resultLength); + return changetype(register(out, __runtime_id())); } substring(start: i32, end: i32 = i32.MAX_VALUE): String { assert(this !== null); - var len = this.length; - var finalStart = min(max(start, 0), len); - var finalEnd = min(max(end, 0), len); - var from = min(finalStart, finalEnd); - var to = max(finalStart, finalEnd); - len = to - from; + var len: isize = this.length; + var finalStart = min(max(start, 0), len); + var finalEnd = min(max(end, 0), len); + var fromPos = min(finalStart, finalEnd) << 1; + var toPos = max(finalStart, finalEnd) << 1; + len = toPos - fromPos; if (!len) return changetype(""); - if (!from && to == this.length) return this; - var out = allocateUnsafe(len); - copyUnsafe(out, 0, this, from, len); - return out; + if (!fromPos && toPos == this.length << 1) return this; + var out = allocate(len); + memory.copy(out, changetype(this) + fromPos, len); + return changetype(register(out, __runtime_id())); } trim(): String { assert(this !== null); - var length: usize = this.length; - + var length = this.length; + var size: usize = length << 1; while ( - length && + size && isWhiteSpaceOrLineTerminator( - load(changetype(this) + (length << 1), HEADER_SIZE) + load(changetype(this) + size) ) ) { - --length; + size -= 2; } - var start: usize = 0; + var offset: usize = 0; while ( - start < length && + offset < size && isWhiteSpaceOrLineTerminator( - load(changetype(this) + (start << 1), HEADER_SIZE) + load(changetype(this) + offset) ) ) { - ++start, --length; + offset += 2; size -= 2; } - if (!length) return changetype(""); - if (!start && length == this.length) return this; - var out = allocateUnsafe(length); - copyUnsafe(out, 0, this, start, length); - return out; + if (!size) return changetype(""); + if (!start && size == length << 1) return this; + var out = allocate(size); + memory.copy(out, changetype(this) + offset, size); + return changetype(register(out, __runtime_id())); } @inline @@ -305,80 +254,83 @@ export class String { trimStart(): String { assert(this !== null); - var start: isize = 0; - var len: isize = this.length; + var size = this.length << 1; + var offset: usize = 0; while ( - start < len && + offset < size && isWhiteSpaceOrLineTerminator( - load(changetype(this) + (start << 1), HEADER_SIZE) + load(changetype(this) + offset) ) ) { - ++start; + offset += 2; } - if (!start) return this; - var outLen = len - start; - if (!outLen) return changetype(""); - var out = allocateUnsafe(outLen); - copyUnsafe(out, 0, this, start, outLen); - return out; + if (!offset) return this; + size -= offset; + if (!size) return changetype(""); + var out = allocate(size); + memory.copy(out, changetype(this) + offset, size); + return changetype(register(out, __runtime_id())); } trimEnd(): String { assert(this !== null); - var len: isize = this.length; + var originalSize = this.length << 1; + var size = originalSize; while ( - len > 0 && + size && isWhiteSpaceOrLineTerminator( - load(changetype(this) + (len << 1), HEADER_SIZE) + load(changetype(this) + size) ) ) { - --len; + size -= 2; } - if (len <= 0) return changetype(""); - if (len == this.length) return this; - var out = allocateUnsafe(len); - copyUnsafe(out, 0, this, 0, len); - return out; + if (!size) return changetype(""); + if (size == originalSize) return this; + var out = allocate(size); + memory.copy(out, changetype(this), size); + return changetype(register(out, __runtime_id())); } - padStart(targetLength: i32, padString: String = changetype(" ")): String { + padStart(targetLength: i32, padString: string = " "): String { assert(this !== null); - var length = this.length; - var padLen = padString.length; - if (targetLength < length || !padLen) return this; - var len = targetLength - length; - var out = allocateUnsafe(targetLength); - if (len > padLen) { - let count = (len - 1) / padLen; - let base = count * padLen; - let rest = len - base; - repeatUnsafe(out, 0, padString, count); - if (rest) copyUnsafe(out, base, padString, 0, rest); + var thisSize = this.length << 1; + var targetSize = targetLength << 1; + var padSize = padString.length << 1; + if (targetSize < thisSize || !padSize) return this; + var prependSize = targetSize - thisSize; + var out = allocate(targetSize); + if (prependSize > padSize) { + let repeatCount = (prependSize - 2) / padSize; + let restBase = repeatCount * padSize; + let restSize = prependSize - restBase; + memory.repeat(out, changetype(padString), padSize, repeatCount); + memory.copy(out + restBase, changetype(padString), restSize); } else { - copyUnsafe(out, 0, padString, 0, len); + memory.copy(out, changetype(padString), prependSize); } - if (length) copyUnsafe(out, len, this, 0, length); - return out; + memory.copy(out + prependSize, changetype(this), thisSize); + return changetype(register(out, __runtime_id())); } - padEnd(targetLength: i32, padString: String = changetype(" ")): String { + padEnd(targetLength: i32, padString: string = " "): String { assert(this !== null); - var length = this.length; - var padLen = padString.length; - if (targetLength < length || !padLen) return this; - var len = targetLength - length; - var out = allocateUnsafe(targetLength); - if (length) copyUnsafe(out, 0, this, 0, length); - if (len > padLen) { - let count = (len - 1) / padLen; - let base = count * padLen; - let rest = len - base; - repeatUnsafe(out, length, padString, count); - if (rest) copyUnsafe(out, base + length, padString, 0, rest); + var thisSize = this.length << 1; + var targetSize = targetLength << 1; + var padSize = padString.length << 1; + if (targetSize < thisSize || !padSize) return this; + var appendSize = targetSize - thisSize; + var out = allocate(targetSize); + memory.copy(out, changetype(this), thisSize); + if (appendSize > padSize) { + let repeatCount = (appendSize - 2) / padSize; + let restBase = repeatCount * padSize; + let restSize = appendSize - restBase; + memory.repeat(out + thisSize, changetype(padString), padSize, repeatCount); + memory.copy(out + thisSize + restBase, changetype(padString), restSize); } else { - copyUnsafe(out, length, padString, 0, len); + memory.copy(out + thisSize, changetype(padString), appendSize); } - return out; + return changetype(register(out, __runtime_id())); } repeat(count: i32 = 0): String { @@ -386,16 +338,15 @@ export class String { var length = this.length; // Most browsers can't handle strings 1 << 28 chars or longer - if (count < 0 || length * count > (1 << 28)) { - throw new RangeError("Invalid count value"); + if (count < 0 || length * count > (1 << 28)) { + throw new RangeError(E_INVALIDLENGTH); } if (count == 0 || !length) return changetype(""); if (count == 1) return this; - - var result = allocateUnsafe(length * count); - repeatUnsafe(result, 0, this, count); - return result; + var out = allocate((length * count) << 1); + memory.repeat(out, changetype(this), length << 1, count); + return changetype(register(out, __runtime_id())); } slice(beginIndex: i32, endIndex: i32 = i32.MAX_VALUE): String { @@ -404,50 +355,48 @@ export class String { var end = endIndex < 0 ? max(endIndex + len, 0) : min(endIndex, len); len = end - begin; if (len <= 0) return changetype(""); - var out = allocateUnsafe(len); - copyUnsafe(out, 0, this, begin, len); - return out; + var out = allocate(len << 1); + memory.copy(out, changetype(this) + (begin << 1), len << 1); + return changetype(register(out, __runtime_id())); } - split(separator: String = null, limit: i32 = i32.MAX_VALUE): String[] { + split(separator: String | null = null, limit: i32 = i32.MAX_VALUE): String[] { assert(this !== null); - if (!limit) return new Array(); + if (!limit) return NEWARRAY(0); if (separator === null) return [this]; var length: isize = this.length; var sepLen: isize = separator.length; if (limit < 0) limit = i32.MAX_VALUE; if (!sepLen) { - if (!length) return new Array(); + if (!length) return NEWARRAY(0); // split by chars length = min(length, limit); - let result = new Array(length); - let buffer = result.buffer_; + let result = NEWARRAY(length); + let resultStart = changetype(result).dataStart; for (let i: isize = 0; i < length; ++i) { - let char = allocateUnsafe(1); - store( - changetype(char), - load( - changetype(this) + (i << 1), - HEADER_SIZE - ), - HEADER_SIZE - ); - STORE(buffer, i, char); + let charStr = allocate(2); + store(charStr, load(changetype(this) + (i << 1))); + store(resultStart + (i << alignof()), charStr); // result[i] = charStr + register(charStr, __runtime_id()); + if (isManaged()) { + if (isDefined(__ref_link)) __ref_link(changetype(charStr), changetype(result)); + if (isDefined(__ref_retain)) __ref_retain(changetype(charStr)); + } } return result; } else if (!length) { - let result = new Array(1); - unchecked(result[0] = changetype("")); + let result = NEWARRAY(1); + store(changetype(result).dataStart, ""); // no need to register/link return result; } - var result = new Array(); + var result = NEWARRAY(0); var end = 0, start = 0, i = 0; while ((end = this.indexOf(separator, start)) != -1) { let len = end - start; if (len > 0) { - let out = allocateUnsafe(len); - copyUnsafe(out, 0, this, start, len); - result.push(out); + let out = allocate(len << 1); + memory.copy(out, changetype(this) + (start << 1), len << 1); + result.push(changetype(register(out, __runtime_id()))); } else { result.push(changetype("")); } @@ -455,15 +404,15 @@ export class String { start = end + sepLen; } if (!start) { - let result = new Array(1); + let result = NEWARRAY(1); unchecked(result[0] = this); return result; } var len = length - start; if (len > 0) { - let out = allocateUnsafe(len); - copyUnsafe(out, 0, this, start, len); - result.push(out); + let out = allocate(len << 1); + memory.copy(out, changetype(this) + (start << 1), len << 1); + result.push(changetype(register(out, __runtime_id()))); } else { result.push(changetype("")); } @@ -479,7 +428,7 @@ export class String { var pos: usize = 0; var end = this.length; while (pos < end) { - let c = load(changetype(this) + (pos << 1), HEADER_SIZE); + let c = load(changetype(this) + (pos << 1)); if (c < 128) { len += 1; ++pos; } else if (c < 2048) { @@ -487,7 +436,7 @@ export class String { } else { if ( (c & 0xFC00) == 0xD800 && pos + 1 < end && - (load(changetype(this) + ((pos + 1) << 1), HEADER_SIZE) & 0xFC00) == 0xDC00 + (load(changetype(this) + ((pos + 1) << 1)) & 0xFC00) == 0xDC00 ) { len += 4; pos += 2; } else { @@ -535,10 +484,10 @@ export class String { } } assert(ptrPos == len); - var str = allocateUnsafe((bufPos >> 1)); - memory.copy(changetype(str) + HEADER_SIZE, buf, bufPos); + var out = allocate(bufPos); + memory.copy(changetype(out), buf, bufPos); memory.free(buf); - return str; + return changetype(register(out, __runtime_id())); } toUTF8(): usize { @@ -547,7 +496,7 @@ export class String { var end = this.length; var off: usize = 0; while (pos < end) { - let c1 = load(changetype(this) + (pos << 1), HEADER_SIZE); + let c1 = load(changetype(this) + (pos << 1)); if (c1 < 128) { store(buf + off, c1); ++off; ++pos; @@ -559,7 +508,7 @@ export class String { } else { let ptr = buf + off; if ((c1 & 0xFC00) == 0xD800 && pos + 1 < end) { - let c2 = load(changetype(this) + ((pos + 1) << 1), HEADER_SIZE); + let c2 = load(changetype(this) + ((pos + 1) << 1)); if ((c2 & 0xFC00) == 0xDC00) { c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); store(ptr, c1 >> 18 | 240); @@ -581,17 +530,21 @@ export class String { } } +// @ts-ignore: nolib export type string = String; export function parseInt(str: String, radix: i32 = 0): f64 { + // @ts-ignore: string <-> String return parse(str, radix); } export function parseI32(str: String, radix: i32 = 0): i32 { + // @ts-ignore: string <-> String return parse(str, radix); } export function parseI64(str: String, radix: i32 = 0): i64 { + // @ts-ignore: string <-> String return parse(str, radix); } @@ -601,17 +554,17 @@ export function parseFloat(str: String): f64 { if (!len) return NaN; var ptr = changetype(str) /* + HEAD -> offset */; - var code = load(ptr, HEADER_SIZE); + var code = load(ptr); // determine sign var sign: f64; if (code == CharCode.MINUS) { if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); + code = load(ptr += 2); sign = -1; } else if (code == CharCode.PLUS) { if (!--len) return NaN; - code = load(ptr += 2, HEADER_SIZE); + code = load(ptr += 2); sign = 1; } else { sign = 1; @@ -620,12 +573,12 @@ export function parseFloat(str: String): f64 { // calculate value var num: f64 = 0; while (len--) { - code = load(ptr, HEADER_SIZE); + code = load(ptr); if (code == CharCode.DOT) { ptr += 2; let fac: f64 = 0.1; // precision :( while (len--) { - code = load(ptr, HEADER_SIZE); + code = load(ptr); if (code == CharCode.E || code == CharCode.e) { assert(false); // TODO } diff --git a/std/assembly/symbol.ts b/std/assembly/symbol.ts index 625b2c0b90..97baef4d58 100644 --- a/std/assembly/symbol.ts +++ b/std/assembly/symbol.ts @@ -1,10 +1,87 @@ import { Map } from "./map"; -@lazy var stringToId: Map; -@lazy var idToString: Map; -@lazy var nextId: usize = 12; // Symbol.unscopables + 1 +// @ts-ignore: decorator +@lazy +var stringToId: Map; + +// @ts-ignore: decorator +@lazy +var idToString: Map; + +// @ts-ignore: decorator +@lazy +var nextId: usize = 12; // Symbol.unscopables + 1 + +@unmanaged @sealed abstract class _Symbol { + + // TODO: all of the following default symbols are unused currently yet add to + // binary size if #toString becomes compiled. Ultimately we'll most likely want + // to remove the unsupported ones and only keep what's actually supported. + + // @ts-ignore: decorator + @lazy + static readonly hasInstance: symbol = changetype(1); + + // @ts-ignore: decorator + @lazy + static readonly isConcatSpreadable: symbol = changetype(2); + + // @ts-ignore: decorator + @lazy + static readonly isRegExp: symbol = changetype(3); + + // @ts-ignore: decorator + @lazy + static readonly iterator: symbol = changetype(3); + + // @ts-ignore: decorator + @lazy + static readonly match: symbol = changetype(4); + + // @ts-ignore: decorator + @lazy + static readonly replace: symbol = changetype(5); + + // @ts-ignore: decorator + @lazy + static readonly search: symbol = changetype(6); + + // @ts-ignore: decorator + @lazy + static readonly species: symbol = changetype(7); + + // @ts-ignore: decorator + @lazy + static readonly split: symbol = changetype(8); + + // @ts-ignore: decorator + @lazy + static readonly toPrimitive: symbol = changetype(9); + + // @ts-ignore: decorator + @lazy + static readonly toStringTag: symbol = changetype(10); + + // @ts-ignore: decorator + @lazy + static readonly unscopables: symbol = changetype(11); + + static for(key: string): symbol { + if (!stringToId) { stringToId = new Map(); idToString = new Map(); } + else if (stringToId.has(key)) return changetype(stringToId.get(key)); + var id = nextId++; + if (!id) unreachable(); // out of ids + stringToId.set(key, id); + idToString.set(id, key); + return changetype(id); + } + + static keyFor(sym: symbol): string | null { + return idToString !== null && idToString.has(changetype(sym)) + ? idToString.get(changetype(sym)) + : null; + } -@unmanaged export class symbol { toString(): string { var id = changetype(this); var str = ""; @@ -35,37 +112,7 @@ export function Symbol(description: string | null = null): symbol { return changetype(id); } -export namespace Symbol { - - // well-known symbols - @lazy export const hasInstance = changetype(1); - @lazy export const isConcatSpreadable = changetype(2); - @lazy export const isRegExp = changetype(3); - @lazy export const iterator = changetype(3); - @lazy export const match = changetype(4); - @lazy export const replace = changetype(5); - @lazy export const search = changetype(6); - @lazy export const species = changetype(7); - @lazy export const split = changetype(8); - @lazy export const toPrimitive = changetype(9); - @lazy export const toStringTag = changetype(10); - @lazy export const unscopables = changetype(11); - - /* tslint:disable */// not valid TS - export function for(key: string): symbol { - if (!stringToId) { stringToId = new Map(); idToString = new Map(); } - else if (stringToId.has(key)) return changetype(stringToId.get(key)); - var id = nextId++; - if (!id) unreachable(); // out of ids - stringToId.set(key, id); - idToString.set(id, key); - return changetype(id); - } - /* tslint:enable */ +export type Symbol = _Symbol; - export function keyFor(sym: symbol): string | null { - return idToString !== null && idToString.has(changetype(sym)) - ? idToString.get(changetype(sym)) - : null; - } -} +// @ts-ignore: nolib +export type symbol = _Symbol; diff --git a/std/assembly/table.ts b/std/assembly/table.ts index b0f9c1cdda..5598bc88ae 100644 --- a/std/assembly/table.ts +++ b/std/assembly/table.ts @@ -1,16 +1,16 @@ -export namespace table { +import { E_NOTIMPLEMENTED } from "./util/error"; - // export function copy(dst: u32, src: u32, n: u32): void { - // __table_copy(dst, src, n); - // } +export namespace table { - // Passive elements + export function copy(dst: u32, src: u32, n: u32): void { + throw new Error(E_NOTIMPLEMENTED); + } - // export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void { - // __table_init(elementIndex, srcOffset, dstOffset, n); - // } + export function init(elementIndex: u32, srcOffset: u32, dstOffset: u32, n: u32): void { + throw new Error(E_NOTIMPLEMENTED); + } - // export function drop(elementIndex: u32): void { - // __table_drop(elementIndex); - // } + export function drop(elementIndex: u32): void { + throw new Error(E_NOTIMPLEMENTED); + } } diff --git a/std/assembly/typedarray.ts b/std/assembly/typedarray.ts index 216a5a1475..eed65f0e1c 100644 --- a/std/assembly/typedarray.ts +++ b/std/assembly/typedarray.ts @@ -1,28 +1,39 @@ -import { - TypedArray, - FILL, - SORT, - SUBARRAY, - REDUCE, - REDUCE_RIGHT, - MAP, - FIND_INDEX, - SOME, - EVERY, - FOREACH, - REVERSE, -} from "./internal/typedarray"; - -import { - COMPARATOR -} from "./internal/sort"; - -function clampToByte(value: i32): i32 { - return ~(value >> 31) & (((255 - value) >> 31) | value); // & 255 -} +import { allocate, register } from "./util/runtime"; +import { COMPARATOR, SORT as SORT_IMPL } from "./util/sort"; +import { E_INDEXOUTOFRANGE } from "./util/error"; +import { __runtime_id } from "./runtime"; +import { ArrayBufferView } from "./arraybuffer"; + +export class Int8Array extends ArrayBufferView { + [key: number]: i8; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength; + } -export class Int8Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); + @operator("[]") // unchecked is built-in + private __get(index: i32): i8 { + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + index); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + index, value); + } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int8Array { return FILL(this, value, start, end); @@ -75,8 +86,36 @@ export class Int8Array extends TypedArray { } } -export class Uint8Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Uint8Array extends ArrayBufferView { + [key: number]: u8; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength; + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): u8 { + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + index); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + index, value); + } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8Array { return FILL(this, value, start, end); @@ -129,25 +168,43 @@ export class Uint8Array extends TypedArray { } } -export class Uint8ClampedArray extends Uint8Array { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Uint8ClampedArray extends ArrayBufferView { + [key: number]: u8; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength; + } - @inline @operator("[]=") - protected __set(index: i32, value: i32): void { - super.__set(index, clampToByte(value)); + @operator("[]") // unchecked is built-in + private __get(index: i32): u8 { + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + index); } - @inline @operator("{}=") - protected __unchecked_set(index: i32, value: i32): void { - super.__unchecked_set(index, clampToByte(value)); + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + index, ~(value >> 31) & (((255 - value) >> 31) | value)); } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint8ClampedArray { - return changetype(super.fill(value, start, end)); // safe because '.fill' reuses 'this' + return FILL(this, value, start, end); } sort(comparator: (a: u8, b: u8) => i32 = COMPARATOR()): Uint8ClampedArray { - return changetype(super.sort(comparator)); // safe because '.sort' reuses 'this' + return SORT(this, comparator); } subarray(begin: i32 = 0, end: i32 = 0x7fffffff): Uint8ClampedArray { @@ -193,8 +250,36 @@ export class Uint8ClampedArray extends Uint8Array { } } -export class Int16Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Int16Array extends ArrayBufferView { + [key: number]: i16; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> alignof(); + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): i16 { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + (index << alignof()), value); + } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int16Array { return FILL(this, value, start, end); @@ -247,8 +332,36 @@ export class Int16Array extends TypedArray { } } -export class Uint16Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Uint16Array extends ArrayBufferView { + [key: number]: u16; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> alignof(); + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): u16 { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: native): void { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + (index << alignof()), value); + } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint16Array { return FILL(this, value, start, end); @@ -301,8 +414,36 @@ export class Uint16Array extends TypedArray { } } -export class Int32Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Int32Array extends ArrayBufferView { + [key: number]: i32; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> alignof(); + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): i32 { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: i32): void { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + (index << alignof()), value); + } fill(value: i32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int32Array { return FILL(this, value, start, end); @@ -355,8 +496,36 @@ export class Int32Array extends TypedArray { } } -export class Uint32Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Uint32Array extends ArrayBufferView { + [key: number]: u32; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> alignof(); + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): u32 { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: u32): void { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + (index << alignof()), value); + } fill(value: u32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint32Array { return FILL(this, value, start, end); @@ -409,8 +578,36 @@ export class Uint32Array extends TypedArray { } } -export class Int64Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Int64Array extends ArrayBufferView { + [key: number]: i64; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> alignof(); + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): i64 { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: i64): void { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + (index << alignof()), value); + } fill(value: i64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Int64Array { return FILL(this, value, start, end); @@ -463,8 +660,36 @@ export class Int64Array extends TypedArray { } } -export class Uint64Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Uint64Array extends ArrayBufferView { + [key: number]: u64; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> alignof(); + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): u64 { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: u64): void { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + (index << alignof()), value); + } fill(value: u64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Uint64Array { return FILL(this, value, start, end); @@ -517,8 +742,36 @@ export class Uint64Array extends TypedArray { } } -export class Float32Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Float32Array extends ArrayBufferView { + [key: number]: f32; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> alignof(); + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): f32 { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: f32): void { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + (index << alignof()), value); + } fill(value: f32, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float32Array { return FILL(this, value, start, end); @@ -571,8 +824,36 @@ export class Float32Array extends TypedArray { } } -export class Float64Array extends TypedArray { - @lazy static readonly BYTES_PER_ELEMENT: usize = sizeof(); +export class Float64Array extends ArrayBufferView { + [key: number]: f64; + + // @ts-ignore: decorator + @lazy + static readonly BYTES_PER_ELEMENT: usize = sizeof(); + + constructor(length: i32) { + super(length, alignof()); + } + + get buffer(): ArrayBuffer { + return this.data; + } + + get length(): i32 { + return this.byteLength >>> alignof(); + } + + @operator("[]") // unchecked is built-in + private __get(index: i32): f64 { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + return load(this.dataStart + (index << alignof())); + } + + @operator("[]=") // unchecked is built-in + private __set(index: i32, value: f64): void { + if (index >= this.dataLength >>> alignof()) throw new RangeError(E_INDEXOUTOFRANGE); + store(this.dataStart + (index << alignof()), value); + } fill(value: f64, start: i32 = 0, end: i32 = i32.MAX_VALUE): Float64Array { return FILL(this, value, start, end); @@ -624,3 +905,181 @@ export class Float64Array extends TypedArray { return REVERSE(this); } } + +// @ts-ignore: decorator +@inline +function FILL( + array: TArray, + value: native, + start: i32, + end: i32 +): TArray { + var dataStart = array.dataStart; + var length = array.length; + start = start < 0 ? max(length + start, 0) : min(start, length); + end = end < 0 ? max(length + end, 0) : min(end, length); + if (sizeof() == 1) { + if (start < end) memory.fill(dataStart + start, value, (end - start)); + } else { + for (; start < end; ++start) { + store(dataStart + (start << alignof()), value); + } + } + return array; +} + +// @ts-ignore: decorator +@inline +function SORT( + array: TArray, + comparator: (a: T, b: T) => i32 +): TArray { + var length = array.length; + if (length <= 1) return array; + var base = array.dataStart; + if (length == 2) { + let a: T = load(base, sizeof()); // a = arr[1] + let b: T = load(base); // b = arr[0] + if (comparator(a, b) < 0) { + store(base, b, sizeof()); // arr[1] = b + store(base, a); // arr[0] = a + } + return array; + } + SORT_IMPL(base, length, comparator); + return array; +} + +// @ts-ignore: decorator +@inline +function SUBARRAY( + array: TArray, + begin: i32, + end: i32 +): TArray { + var length = array.length; + if (begin < 0) begin = max(length + begin, 0); + else begin = min(begin, length); + if (end < 0) end = max(length + end, begin); + else end = max(min(end, length), begin); + var out = allocate(offsetof()); + var data = array.data; + var dataStart = array.dataStart; + changetype(out).data = data; // links + changetype(out).dataStart = dataStart + (begin << alignof()); + changetype(out).dataLength = (end - begin) << alignof(); + return changetype(register(out, __runtime_id())); +} + +// @ts-ignore: decorator +@inline +function REDUCE( + array: TArray, + callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, + initialValue: TRet +): TRet { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + initialValue = callbackfn(initialValue, load(dataStart + (i << alignof())), i, array); + } + return initialValue; +} + +// @ts-ignore: decorator +@inline +function REDUCE_RIGHT( + array: TArray, + callbackfn: (accumulator: TRet, value: T, index: i32, array: TArray) => TRet, + initialValue: TRet +): TRet { + var dataStart = array.dataStart; + for (let i = array.length - 1; i >= 0; i--) { + initialValue = callbackfn(initialValue, load(dataStart + (i << alignof())), i, array); + } + return initialValue; +} + +// @ts-ignore: decorator +@inline +function MAP( + array: TArray, + callbackfn: (value: T, index: i32, self: TArray) => T, +): TArray { + var length = array.length; + var dataStart = array.dataStart; + var out = instantiate(length); + var outDataStart = out.dataStart; + for (let i = 0; i < length; i++) { + store( + outDataStart + (i << alignof()), + callbackfn(load(dataStart + (i << alignof())), i, array) + ); + } + return out; +} + +// @ts-ignore: decorator +@inline +function FIND_INDEX( + array: TArray, + callbackfn: (value: T, index: i32, array: TArray) => bool, +): i32 { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(dataStart + (i << alignof())), i, array)) return i; + } + return -1; +} + +// @ts-ignore: decorator +@inline +function SOME( + array: TArray, + callbackfn: (value: T, index: i32, array: TArray) => bool, +): bool { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(dataStart + (i << alignof())), i, array)) return true; + } + return false; +} + +// @ts-ignore: decorator +@inline +function EVERY( + array: TArray, + callbackfn: (value: T, index: i32, array: TArray) => bool, +): bool { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + if (callbackfn(load(dataStart + (i << alignof())), i, array)) continue; + return false; + } + return true; +} + +// @ts-ignore: decorator +@inline +function FOREACH( + array: TArray, + callbackfn: (value: T, index: i32, array: TArray) => void, +): void { + var dataStart = array.dataStart; + for (let i = 0, k = array.length; i < k; i++) { + callbackfn(load(dataStart + (i << alignof())), i, array); + } +} + +// @ts-ignore: decorator +@inline +export function REVERSE(array: TArray): TArray { + var dataStart = array.dataStart; + for (let front = 0, back = array.length - 1; front < back; ++front, --back) { + let frontPtr = dataStart + (front << alignof()); + let backPtr = dataStart + (back << alignof()); + let temp = load(frontPtr); + store(frontPtr, load(backPtr)); + store(backPtr, temp); + } + return array; +} diff --git a/std/assembly/util/allocator.ts b/std/assembly/util/allocator.ts new file mode 100644 index 0000000000..c0c2fdbe5c --- /dev/null +++ b/std/assembly/util/allocator.ts @@ -0,0 +1,19 @@ +/** Number of alignment bits. */ +// @ts-ignore: decorator +@inline +export const AL_BITS: u32 = 3; + +/** Number of possible alignment values. */ +// @ts-ignore: decorator +@inline +export const AL_SIZE: usize = 1 << AL_BITS; + +/** Mask to obtain just the alignment bits. */ +// @ts-ignore: decorator +@inline +export const AL_MASK: usize = AL_SIZE - 1; + +/** Maximum 32-bit allocation size. */ +// @ts-ignore: decorator +@inline +export const MAX_SIZE_32: usize = 1 << 30; // 1GB diff --git a/std/assembly/util/error.ts b/std/assembly/util/error.ts new file mode 100644 index 0000000000..cbee8cbffa --- /dev/null +++ b/std/assembly/util/error.ts @@ -0,0 +1,22 @@ +// Common error messages for use accross the standard library. Keeping error messages compact +// and reusing them where possible ensures minimal static data in binaries. + +// @ts-ignore: decorator +@lazy @inline +export const E_INDEXOUTOFRANGE: string = "Index out of range"; + +// @ts-ignore: decorator +@lazy @inline +export const E_INVALIDLENGTH: string = "Invalid length"; + +// @ts-ignore: decorator +@lazy @inline +export const E_EMPTYARRAY: string = "Array is empty"; + +// @ts-ignore: decorator +@lazy @inline +export const E_HOLEYARRAY: string = "Element type must be nullable if array is holey"; + +// @ts-ignore: decorator +@lazy @inline +export const E_NOTIMPLEMENTED: string = "Not implemented"; diff --git a/std/assembly/internal/hash.ts b/std/assembly/util/hash.ts similarity index 63% rename from std/assembly/internal/hash.ts rename to std/assembly/util/hash.ts index dd7c740325..2d58d92909 100644 --- a/std/assembly/internal/hash.ts +++ b/std/assembly/util/hash.ts @@ -1,32 +1,32 @@ -import { - HEADER_SIZE -} from "./string"; - -/** Computes the 32-bit hash of a value of any type. */ +// @ts-ignore: decorator @inline export function HASH(key: T): u32 { - // branch-level tree-shaking makes this a `(return (call ...))` - if (isString(key)) { - return hashStr(key); + if (isString()) { + return hashStr(changetype(key)); } else if (isReference()) { if (sizeof() == 4) return hash32(changetype(key)); if (sizeof() == 8) return hash64(changetype(key)); } else if (isFloat()) { - if (sizeof() == 4) return hash32(reinterpret(key)); - if (sizeof() == 8) return hash64(reinterpret(key)); + if (sizeof() == 4) return hash32(reinterpret(f32(key))); + if (sizeof() == 8) return hash64(reinterpret(f64(key))); } else { - if (sizeof() == 1) return hash8 (key); - if (sizeof() == 2) return hash16(key); - if (sizeof() == 4) return hash32(key); - if (sizeof() == 8) return hash64(key); + if (sizeof() == 1) return hash8 (u32(key)); + if (sizeof() == 2) return hash16(u32(key)); + if (sizeof() == 4) return hash32(u32(key)); + if (sizeof() == 8) return hash64(u64(key)); } - unreachable(); + return unreachable(); } // FNV-1a 32-bit as a starting point, see: http://isthe.com/chongo/tech/comp/fnv/ -@inline const FNV_OFFSET: u32 = 2166136261; -@inline const FNV_PRIME: u32 = 16777619; +// @ts-ignore: decorator +@inline +const FNV_OFFSET: u32 = 2166136261; + +// @ts-ignore: decorator +@inline +const FNV_PRIME: u32 = 16777619; function hash8(key: u32): u32 { return (FNV_OFFSET ^ key) * FNV_PRIME; @@ -65,8 +65,10 @@ function hash64(key: u64): u32 { function hashStr(key: string): u32 { var v = FNV_OFFSET; - for (let i: usize = 0, k: usize = key.length << 1; i < k; ++i) { - v = (v ^ load(changetype(key) + i, HEADER_SIZE)) * FNV_PRIME; + if (key !== null) { + for (let i: usize = 0, k: usize = key.length << 1; i < k; ++i) { + v = (v ^ load(changetype(key) + i)) * FNV_PRIME; + } } return v; } diff --git a/std/assembly/util/memory.ts b/std/assembly/util/memory.ts new file mode 100644 index 0000000000..c9e4a82c02 --- /dev/null +++ b/std/assembly/util/memory.ts @@ -0,0 +1,257 @@ +// export function memcpy(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memcpy.c +// var w: u32, x: u32; + +// // copy 1 byte each until src is aligned to 4 bytes +// while (n && (src & 3)) { +// store(dest++, load(src++)); +// n--; +// } + +// // if dst is aligned to 4 bytes as well, copy 4 bytes each +// if ((dest & 3) == 0) { +// while (n >= 16) { +// store(dest , load(src )); +// store(dest + 4, load(src + 4)); +// store(dest + 8, load(src + 8)); +// store(dest + 12, load(src + 12)); +// src += 16; dest += 16; n -= 16; +// } +// if (n & 8) { +// store(dest , load(src )); +// store(dest + 4, load(src + 4)); +// dest += 8; src += 8; +// } +// if (n & 4) { +// store(dest, load(src)); +// dest += 4; src += 4; +// } +// if (n & 2) { // drop to 2 bytes each +// store(dest, load(src)); +// dest += 2; src += 2; +// } +// if (n & 1) { // drop to 1 byte +// store(dest++, load(src++)); +// } +// return; +// } + +// // if dst is not aligned to 4 bytes, use alternating shifts to copy 4 bytes each +// // doing shifts if faster when copying enough bytes (here: 32 or more) +// if (n >= 32) { +// switch (dest & 3) { +// // known to be != 0 +// case 1: { +// w = load(src); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// n -= 3; +// while (n >= 17) { +// x = load(src + 1); +// store(dest, w >> 24 | x << 8); +// w = load(src + 5); +// store(dest + 4, x >> 24 | w << 8); +// x = load(src + 9); +// store(dest + 8, w >> 24 | x << 8); +// w = load(src + 13); +// store(dest + 12, x >> 24 | w << 8); +// src += 16; dest += 16; n -= 16; +// } +// break; +// } +// case 2: { +// w = load(src); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// n -= 2; +// while (n >= 18) { +// x = load(src + 2); +// store(dest, w >> 16 | x << 16); +// w = load(src + 6); +// store(dest + 4, x >> 16 | w << 16); +// x = load(src + 10); +// store(dest + 8, w >> 16 | x << 16); +// w = load(src + 14); +// store(dest + 12, x >> 16 | w << 16); +// src += 16; dest += 16; n -= 16; +// } +// break; +// } +// case 3: { +// w = load(src); +// store(dest++, load(src++)); +// n -= 1; +// while (n >= 19) { +// x = load(src + 3); +// store(dest, w >> 8 | x << 24); +// w = load(src + 7); +// store(dest + 4, x >> 8 | w << 24); +// x = load(src + 11); +// store(dest + 8, w >> 8 | x << 24); +// w = load(src + 15); +// store(dest + 12, x >> 8 | w << 24); +// src += 16; dest += 16; n -= 16; +// } +// break; +// } +// } +// } + +// // copy remaining bytes one by one +// if (n & 16) { +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// } +// if (n & 8) { +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// } +// if (n & 4) { +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// } +// if (n & 2) { +// store(dest++, load(src++)); +// store(dest++, load(src++)); +// } +// if (n & 1) { +// store(dest++, load(src++)); +// } +// } + +// @ts-ignore: decorator +@inline +export function memmove(dest: usize, src: usize, n: usize): void { // see: musl/src/string/memmove.c + if (dest === src) return; + // if (src + n <= dest || dest + n <= src) { + // memcpy(dest, src, n); + // return; + // } + if (dest < src) { + if ((src & 7) == (dest & 7)) { + while (dest & 7) { + if (!n) return; + --n; + store(dest++, load(src++)); + } + while (n >= 8) { + store(dest, load(src)); + n -= 8; + dest += 8; + src += 8; + } + } + while (n) { + store(dest++, load(src++)); + --n; + } + } else { + if ((src & 7) == (dest & 7)) { + while ((dest + n) & 7) { + if (!n) return; + store(dest + --n, load(src + n)); + } + while (n >= 8) { + n -= 8; + store(dest + n, load(src + n)); + } + } + while (n) { + store(dest + --n, load(src + n)); + } + } +} + +// @ts-ignore: decorator +@inline +export function memset(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset + + // fill head and tail with minimal branching + if (!n) return; + store(dest, c); + store(dest + n - 1, c); + if (n <= 2) return; + + store(dest + 1, c); + store(dest + 2, c); + store(dest + n - 2, c); + store(dest + n - 3, c); + if (n <= 6) return; + store(dest + 3, c); + store(dest + n - 4, c); + if (n <= 8) return; + + // advance pointer to align it at 4-byte boundary + var k: usize = -dest & 3; + dest += k; + n -= k; + n &= -4; + + var c32: u32 = -1 / 255 * c; + + // fill head/tail up to 28 bytes each in preparation + store(dest, c32); + store(dest + n - 4, c32); + if (n <= 8) return; + store(dest + 4, c32); + store(dest + 8, c32); + store(dest + n - 12, c32); + store(dest + n - 8, c32); + if (n <= 24) return; + store(dest + 12, c32); + store(dest + 16, c32); + store(dest + 20, c32); + store(dest + 24, c32); + store(dest + n - 28, c32); + store(dest + n - 24, c32); + store(dest + n - 20, c32); + store(dest + n - 16, c32); + + // align to a multiple of 8 + k = 24 + (dest & 4); + dest += k; + n -= k; + + // copy 32 bytes each + var c64: u64 = c32 | (c32 << 32); + while (n >= 32) { + store(dest, c64); + store(dest + 8, c64); + store(dest + 16, c64); + store(dest + 24, c64); + n -= 32; + dest += 32; + } +} + +// @ts-ignore: decorator +@inline +export function memcmp(vl: usize, vr: usize, n: usize): i32 { // see: musl/src/string/memcmp.c + if (vl == vr) return 0; + while (n != 0 && load(vl) == load(vr)) { + n--; vl++; vr++; + } + return n ? load(vl) - load(vr) : 0; +} diff --git a/std/assembly/internal/number.ts b/std/assembly/util/number.ts similarity index 72% rename from std/assembly/internal/number.ts rename to std/assembly/util/number.ts index e254aecea5..61d9143e2c 100644 --- a/std/assembly/internal/number.ts +++ b/std/assembly/util/number.ts @@ -1,17 +1,15 @@ -import { - CharCode, - allocateUnsafe as allocateUnsafeString, - freeUnsafe as freeUnsafeString, - HEADER_SIZE as STRING_HEADER_SIZE -} from "./string"; +import { allocate, register, discard } from "./runtime"; +import { CharCode } from "./string"; +import { __runtime_id } from "../runtime"; +import { ArrayBufferView } from "../arraybuffer"; -import { - LOAD -} from "./arraybuffer"; - -@inline export const MAX_DOUBLE_LENGTH = 28; +// @ts-ignore: decorator +@inline +export const MAX_DOUBLE_LENGTH = 28; -@lazy @inline const POWERS10: u32[] = [ +// @ts-ignore: decorator +@lazy @inline +const POWERS10: u32[] = [ 1, 10, 100, @@ -38,7 +36,9 @@ import { "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99" */ -@lazy @inline const DIGITS: u32[] = [ +// @ts-ignore: decorator +@lazy @inline +const DIGITS: u32[] = [ 0x00300030, 0x00310030, 0x00320030, 0x00330030, 0x00340030, 0x00350030, 0x00360030, 0x00370030, 0x00380030, 0x00390030, 0x00300031, 0x00310031, 0x00320031, 0x00330031, 0x00340031, @@ -61,7 +61,9 @@ import { 0x00350039, 0x00360039, 0x00370039, 0x00380039, 0x00390039 ]; -@lazy @inline const EXP_POWERS: i16[] = [ +// @ts-ignore: decorator +@lazy @inline +const EXP_POWERS: i16[] = [ -1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980, -954, -927, -901, -874, -847, -821, -794, -768, -741, -715, -688, -661, -635, -608, -582, -555, -529, -502, -475, -449, @@ -74,7 +76,9 @@ import { ]; // 1e-348, 1e-340, ..., 1e340 -@lazy @inline const FRC_POWERS: u64[] = [ +// @ts-ignore: decorator +@lazy @inline +const FRC_POWERS: u64[] = [ 0xFA8FD5A0081C0288, 0xBAAEE17FA23EBF76, 0x8B16FB203055AC76, 0xCF42894A5DCE35EA, 0x9A6BB0AA55653B2D, 0xE61ACF033D1A45DF, 0xAB70FE17C79AC6CA, 0xFF77B1FCBEBCDC4F, 0xBE5691EF416BD60C, 0x8DD01FAD907FFC3C, 0xD3515C2831559A83, 0x9D71AC8FADA6C9B5, @@ -106,9 +110,8 @@ export function decimalCount32(value: u32): u32 { let l: u32 = 32 - clz(value); // log2 let t = l * 1233 >>> 12; // log10 - let lutbuf = POWERS10.buffer_; - let power = LOAD(lutbuf, t); - t -= (value < power); + let power = unchecked(POWERS10[t]); + t -= u32(value < power); return t + 1; } else { if (value < 100000) { @@ -136,9 +139,8 @@ export function decimalCount64(value: u64): u32 { let l: u32 = 64 - clz(value); // log2 let t = l * 1233 >>> 12; // log10 - let lutbuf = POWERS10.buffer_; - let power = LOAD(lutbuf, t - 10); - t -= (value < 10000000000 * power); + let power = unchecked(POWERS10[t]); + t -= u32(value < 10000000000 * power); return t + 1; } else { if (value < 1000000000000000) { @@ -160,8 +162,7 @@ export function decimalCount64(value: u64): u32 { } function utoa32_lut(buffer: usize, num: u32, offset: usize): void { - var lutbuf = DIGITS.buffer_; - + var lut = changetype(DIGITS).dataStart; while (num >= 10000) { // in most VMs i32/u32 div and modulo by constant can be shared and simplificate let t = num / 10000; @@ -171,11 +172,11 @@ function utoa32_lut(buffer: usize, num: u32, offset: usize): void { let d1 = r / 100; let d2 = r % 100; - let digits1 = LOAD(lutbuf, d1); - let digits2 = LOAD(lutbuf, d2); + let digits1 = load(lut + (d1 << alignof())); + let digits2 = load(lut + (d2 << alignof())); offset -= 4; - store(buffer + (offset << 1), digits1 | (digits2 << 32), STRING_HEADER_SIZE); + store(buffer + (offset << 1), digits1 | (digits2 << 32)); } if (num >= 100) { @@ -183,24 +184,23 @@ function utoa32_lut(buffer: usize, num: u32, offset: usize): void { let d1 = num % 100; num = t; offset -= 2; - let digits = LOAD(lutbuf, d1); - store(buffer + (offset << 1), digits, STRING_HEADER_SIZE); + let digits = load(lut + (d1 << alignof())); + store(buffer + (offset << 1), digits); } if (num >= 10) { offset -= 2; - let digits = LOAD(lutbuf, num); - store(buffer + (offset << 1), digits, STRING_HEADER_SIZE); + let digits = load(lut + (num << alignof())); + store(buffer + (offset << 1), digits); } else { offset -= 1; let digit = CharCode._0 + num; - store(buffer + (offset << 1), digit, STRING_HEADER_SIZE); + store(buffer + (offset << 1), digit); } } function utoa64_lut(buffer: usize, num: u64, offset: usize): void { - var lutbuf = DIGITS.buffer_; - + var lut = changetype(DIGITS).dataStart; while (num >= 100000000) { let t = num / 100000000; let r = (num - t * 100000000); @@ -214,32 +214,33 @@ function utoa64_lut(buffer: usize, num: u64, offset: usize): void { let c1 = c / 100; let c2 = c % 100; - let digits1 = LOAD(lutbuf, c1); - let digits2 = LOAD(lutbuf, c2); + let digits1 = load(lut + (c1 << alignof())); + let digits2 = load(lut + (c2 << alignof())); offset -= 4; - store(buffer + (offset << 1), digits1 | (digits2 << 32), STRING_HEADER_SIZE); + store(buffer + (offset << 1), digits1 | (digits2 << 32)); - digits1 = LOAD(lutbuf, b1); - digits2 = LOAD(lutbuf, b2); + digits1 = load(lut + (b1 << alignof())); + digits2 = load(lut + (b2 << alignof())); offset -= 4; - store(buffer + (offset << 1), digits1 | (digits2 << 32), STRING_HEADER_SIZE); + store(buffer + (offset << 1), digits1 | (digits2 << 32)); } utoa32_lut(buffer, num, offset); } -function utoa_simple(buffer: usize, num: T, offset: usize): void { +function utoa_simple(buffer: usize, num: T, offset: usize): void { do { let t = num / 10; let r = (num % 10); - num = t; + num = changetype(t); offset -= 1; - store(buffer + (offset << 1), CharCode._0 + r, STRING_HEADER_SIZE); + store(buffer + (offset << 1), CharCode._0 + r); } while (num); } +// @ts-ignore: decorator @inline export function utoa32_core(buffer: usize, num: u32, offset: u32): void { if (ASC_SHRINK_LEVEL >= 1) { @@ -249,6 +250,7 @@ export function utoa32_core(buffer: usize, num: u32, offset: u32): void { } } +// @ts-ignore: decorator @inline export function utoa64_core(buffer: usize, num: u64, offset: u32): void { if (ASC_SHRINK_LEVEL >= 1) { @@ -262,10 +264,10 @@ export function utoa32(value: u32): String { if (!value) return "0"; var decimals = decimalCount32(value); - var buffer = allocateUnsafeString(decimals); + var out = allocate(decimals << 1); - utoa32_core(changetype(buffer), value, decimals); - return buffer; + utoa32_core(changetype(out), value, decimals); + return changetype(register(out, __runtime_id())); } export function itoa32(value: i32): String { @@ -274,30 +276,30 @@ export function itoa32(value: i32): String { var sign = value < 0; if (sign) value = -value; - var decimals = decimalCount32(value) + sign; - var buffer = allocateUnsafeString(decimals); + var decimals = decimalCount32(value) + u32(sign); + var out = allocate(decimals << 1); - utoa32_core(changetype(buffer), value, decimals); - if (sign) store(changetype(buffer), CharCode.MINUS, STRING_HEADER_SIZE); + utoa32_core(changetype(out), value, decimals); + if (sign) store(changetype(out), CharCode.MINUS); - return buffer; + return changetype(register(out, __runtime_id())); } export function utoa64(value: u64): String { if (!value) return "0"; - var buffer: String; + var out: usize; if (value <= u32.MAX_VALUE) { let val32 = value; let decimals = decimalCount32(val32); - buffer = allocateUnsafeString(decimals); - utoa32_core(changetype(buffer), val32, decimals); + out = allocate(decimals << 1); + utoa32_core(out, val32, decimals); } else { let decimals = decimalCount64(value); - buffer = allocateUnsafeString(decimals); - utoa64_core(changetype(buffer), value, decimals); + out = allocate(decimals << 1); + utoa64_core(changetype(out), value, decimals); } - return buffer; + return changetype(register(out, __runtime_id())); } export function itoa64(value: i64): String { @@ -306,50 +308,68 @@ export function itoa64(value: i64): String { var sign = value < 0; if (sign) value = -value; - var buffer: String; + var out: usize; if (value <= u32.MAX_VALUE) { let val32 = value; - let decimals = decimalCount32(val32) + sign; - buffer = allocateUnsafeString(decimals); - utoa32_core(changetype(buffer), val32, decimals); + let decimals = decimalCount32(val32) + u32(sign); + out = allocate(decimals << 1); + utoa32_core(changetype(out), val32, decimals); } else { - let decimals = decimalCount64(value) + sign; - buffer = allocateUnsafeString(decimals); - utoa64_core(changetype(buffer), value, decimals); + let decimals = decimalCount64(value) + u32(sign); + out = allocate(decimals << 1); + utoa64_core(changetype(out), value, decimals); } - if (sign) store(changetype(buffer), CharCode.MINUS, STRING_HEADER_SIZE); + if (sign) store(changetype(out), CharCode.MINUS); - return buffer; + return changetype(register(out, __runtime_id())); } -export function itoa(value: T): String { - if (!isInteger()) { - assert(false); // unexpecteble non-integer generic type +export function itoa(value: T): String { + if (!isInteger()) ERROR("integer type expected"); + if (isSigned()) { + if (sizeof() <= 4) { + return itoa32(value); + } else { + return itoa64(value); + } } else { - if (isSigned()) { - if (sizeof() <= 4) { - return itoa32(value); - } else { - return itoa64(value); - } + if (sizeof() <= 4) { + return utoa32(value); } else { - if (sizeof() <= 4) { - return utoa32(value); - } else { - return utoa64(value); - } + return utoa64(value); } } } -@lazy var _K: i32 = 0; -// @lazy var _frc: u64 = 0; -@lazy var _exp: i32 = 0; -@lazy var _frc_minus: u64 = 0; -@lazy var _frc_plus: u64 = 0; -@lazy var _frc_pow: u64 = 0; -@lazy var _exp_pow: i32 = 0; +// @ts-ignore: decorator +@lazy +var _K: i32 = 0; + +// // @ts-ignore: decorator +// @lazy +// var _frc: u64 = 0; + +// @ts-ignore: decorator +@lazy +var _exp: i32 = 0; + +// @ts-ignore: decorator +@lazy +var _frc_minus: u64 = 0; + +// @ts-ignore: decorator +@lazy +var _frc_plus: u64 = 0; + +// @ts-ignore: decorator +@lazy +var _frc_pow: u64 = 0; + +// @ts-ignore: decorator +@lazy +var _exp_pow: i32 = 0; +// @ts-ignore: decorator @inline function umul64f(u: u64, v: u64): u64 { var u0 = u & 0xFFFFFFFF; @@ -370,11 +390,13 @@ function umul64f(u: u64, v: u64): u64 { return u1 * v1 + t + w; } +// @ts-ignore: decorator @inline function umul64e(e1: i32, e2: i32): i32 { return e1 + e2 + 64; // where 64 is significand size } +// @ts-ignore: decorator @inline function normalizedBoundaries(f: u64, e: i32): void { var frc = (f << 1) + 1; @@ -383,17 +405,18 @@ function normalizedBoundaries(f: u64, e: i32): void { frc <<= off; exp -= off; - var m = 1 + (f == 0x0010000000000000); + var m = 1 + i32(f == 0x0010000000000000); _frc_plus = frc; _frc_minus = ((f << m) - 1) << e - m - exp; _exp = exp; } +// @ts-ignore: decorator @inline function grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u64, wp_w: u64): void { var lastp = buffer + ((len - 1) << 1); - var digit = load(lastp, STRING_HEADER_SIZE); + var digit = load(lastp); while ( rest < wp_w && delta - rest >= ten_kappa && ( @@ -404,24 +427,24 @@ function grisuRound(buffer: usize, len: i32, delta: u64, rest: u64, ten_kappa: u --digit; rest += ten_kappa; } - store(lastp, digit, STRING_HEADER_SIZE); + store(lastp, digit); } +// @ts-ignore: decorator @inline function getCachedPower(minExp: i32): void { const c = reinterpret(0x3FD34413509F79FE); // 1 / lg(10) = 0.30102999566398114 var dk = (-61 - minExp) * c + 347; // dk must be positive, so can do ceiling in positive var k = dk; - k += (k != dk); // conversion with ceil + k += i32(k != dk); // conversion with ceil var index = (k >> 3) + 1; _K = 348 - (index << 3); // decimal exponent no need lookup table - var frcPowers = FRC_POWERS.buffer_; - var expPowers = EXP_POWERS.buffer_; - _frc_pow = LOAD(frcPowers, index); - _exp_pow = LOAD(expPowers, index); + _frc_pow = unchecked(FRC_POWERS[index]); + _exp_pow = unchecked(EXP_POWERS[index]); } +// @ts-ignore: decorator @inline function grisu2(value: f64, buffer: usize, sign: i32): i32 { @@ -429,7 +452,7 @@ function grisu2(value: f64, buffer: usize, sign: i32): i32 { var uv = reinterpret(value); var exp = ((uv & 0x7FF0000000000000) >>> 52); var sid = uv & 0x000FFFFFFFFFFFFF; - var frc = ((exp != 0) << 52) + sid; + var frc = (u64(exp != 0) << 52) + sid; exp = select(exp, 1, exp != 0) - (0x3FF + 52); normalizedBoundaries(frc, exp); @@ -469,7 +492,7 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i var kappa = decimalCount32(p1); var len = sign; - var powers10 = POWERS10.buffer_; + var lut = changetype(POWERS10).dataStart; while (kappa > 0) { let d: u32; @@ -487,13 +510,13 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i default: { d = 0; break; } } - if (d | len) store(buffer + (len++ << 1), CharCode._0 + d, STRING_HEADER_SIZE); + if (d | len) store(buffer + (len++ << 1), CharCode._0 + d); --kappa; let tmp = ((p1) << one_exp) + p2; if (tmp <= delta) { _K += kappa; - grisuRound(buffer, len, delta, tmp, LOAD(powers10, kappa) << one_exp, wp_w_frc); + grisuRound(buffer, len, delta, tmp, load(lut + (kappa << alignof())) << one_exp, wp_w_frc); return len; } } @@ -503,13 +526,13 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i delta *= 10; let d = p2 >> one_exp; - if (d | len) store(buffer + (len++ << 1), CharCode._0 + d, STRING_HEADER_SIZE); + if (d | len) store(buffer + (len++ << 1), CharCode._0 + d); p2 &= mask; --kappa; if (p2 < delta) { _K += kappa; - wp_w_frc *= LOAD(powers10, -kappa); + wp_w_frc *= load(lut + (-kappa << alignof())); grisuRound(buffer, len, delta, p2, one_frc, wp_w_frc); return len; } @@ -518,19 +541,20 @@ function genDigits(buffer: usize, w_frc: u64, w_exp: i32, mp_frc: u64, mp_exp: i return len; } +// @ts-ignore: decorator @inline function genExponent(buffer: usize, k: i32): i32 { var sign = k < 0; if (sign) k = -k; var decimals = decimalCount32(k) + 1; utoa32_core(buffer, k, decimals); - store(buffer, select(CharCode.MINUS, CharCode.PLUS, sign), STRING_HEADER_SIZE); + store(buffer, select(CharCode.MINUS, CharCode.PLUS, sign)); return decimals; } function prettify(buffer: usize, length: i32, k: i32): i32 { if (!k) { - store(buffer + (length << 1), CharCode.DOT | (CharCode._0 << 16), STRING_HEADER_SIZE); + store(buffer + (length << 1), CharCode.DOT | (CharCode._0 << 16)); return length + 2; } @@ -538,57 +562,57 @@ function prettify(buffer: usize, length: i32, k: i32): i32 { if (length <= kk && kk <= 21) { // 1234e7 -> 12340000000 for (let i = length; i < kk; ++i) { - store(buffer + (i << 1), CharCode._0, STRING_HEADER_SIZE); + store(buffer + (i << 1), CharCode._0); } - store(buffer + (kk << 1), CharCode.DOT | (CharCode._0 << 16), STRING_HEADER_SIZE); + store(buffer + (kk << 1), CharCode.DOT | (CharCode._0 << 16)); return kk + 2; } else if (kk > 0 && kk <= 21) { // 1234e-2 -> 12.34 let ptr = buffer + (kk << 1); memory.copy( - ptr + STRING_HEADER_SIZE + 2, - ptr + STRING_HEADER_SIZE, + ptr + 2, + ptr, -k << 1 ); - store(buffer + (kk << 1), CharCode.DOT, STRING_HEADER_SIZE); + store(buffer + (kk << 1), CharCode.DOT); return length + 1; } else if (-6 < kk && kk <= 0) { // 1234e-6 -> 0.001234 let offset = 2 - kk; memory.copy( - buffer + STRING_HEADER_SIZE + (offset << 1), - buffer + STRING_HEADER_SIZE, + buffer + (offset << 1), + buffer, length << 1 ); - store(buffer, CharCode._0 | (CharCode.DOT << 16), STRING_HEADER_SIZE); + store(buffer, CharCode._0 | (CharCode.DOT << 16)); for (let i = 2; i < offset; ++i) { - store(buffer + (i << 1), CharCode._0, STRING_HEADER_SIZE); + store(buffer + (i << 1), CharCode._0); } return length + offset; } else if (length == 1) { // 1e30 - store(buffer, CharCode.e, STRING_HEADER_SIZE + 2); + store(buffer, CharCode.e, 2); length = genExponent(buffer + 4, kk - 1); return length + 2; } else { let len = length << 1; memory.copy( - buffer + STRING_HEADER_SIZE + 4, - buffer + STRING_HEADER_SIZE + 2, + buffer + 4, + buffer + 2, len - 2 ); - store(buffer, CharCode.DOT, STRING_HEADER_SIZE + 2); - store(buffer + len, CharCode.e, STRING_HEADER_SIZE + 2); + store(buffer, CharCode.DOT, 2); + store(buffer + len, CharCode.e, 2); length += genExponent(buffer + len + 4, kk - 1); return length + 2; } } export function dtoa_core(buffer: usize, value: f64): i32 { - var sign = (value < 0); + var sign = i32(value < 0); if (sign) { value = -value; - store(buffer, CharCode.MINUS, STRING_HEADER_SIZE); + store(buffer, CharCode.MINUS); } // assert(value > 0 && value <= 1.7976931348623157e308); var len = grisu2(value, buffer, sign); @@ -598,27 +622,27 @@ export function dtoa_core(buffer: usize, value: f64): i32 { export function dtoa(value: f64): String { if (value == 0) return "0.0"; - if (!isFinite(value)) { - if (isNaN(value)) return "NaN"; + if (!isFinite(value)) { + if (isNaN(value)) return "NaN"; return select("-Infinity", "Infinity", value < 0); } - var buffer = allocateUnsafeString(MAX_DOUBLE_LENGTH); - var length = dtoa_core(changetype(buffer), value); - var result = buffer.substring(0, length); - freeUnsafeString(buffer); + var temp = allocate(MAX_DOUBLE_LENGTH << 1); + var length = dtoa_core(temp, value); + var result = changetype(temp).substring(0, length); // registers + discard(temp); return result; } -export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { +export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { buffer += (offset << 1); if (!value) { - store(buffer, CharCode._0, STRING_HEADER_SIZE); + store(buffer, CharCode._0); return 1; } var decimals: u32 = 0; if (isSigned()) { - let sign = value < 0; - if (sign) value = -value; + let sign = i32(value < 0); + if (sign) value = changetype(-value); if (sizeof() <= 4) { decimals = decimalCount32(value) + sign; utoa32_core(buffer, value, decimals); @@ -632,7 +656,7 @@ export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { utoa64_core(buffer, value, decimals); } } - if (sign) store(buffer, CharCode.MINUS, STRING_HEADER_SIZE); + if (sign) store(buffer, CharCode.MINUS); } else { if (sizeof() <= 4) { decimals = decimalCount32(value); @@ -654,22 +678,22 @@ export function itoa_stream(buffer: usize, offset: usize, value: T): u32 { export function dtoa_stream(buffer: usize, offset: usize, value: f64): u32 { buffer += (offset << 1); if (value == 0.0) { - store(buffer, CharCode._0, STRING_HEADER_SIZE + 0); - store(buffer, CharCode.DOT, STRING_HEADER_SIZE + 2); - store(buffer, CharCode._0, STRING_HEADER_SIZE + 4); + store(buffer, CharCode._0); + store(buffer, CharCode.DOT, 2); + store(buffer, CharCode._0, 4); return 3; } - if (!isFinite(value)) { - if (isNaN(value)) { - store(buffer, CharCode.N, STRING_HEADER_SIZE + 0); - store(buffer, CharCode.a, STRING_HEADER_SIZE + 2); - store(buffer, CharCode.N, STRING_HEADER_SIZE + 4); + if (!isFinite(value)) { + if (isNaN(value)) { + store(buffer, CharCode.N); + store(buffer, CharCode.a, 2); + store(buffer, CharCode.N, 4); return 3; } else { - let sign = (value < 0); + let sign = i32(value < 0); let len = 8 + sign; let source = changetype(select("-Infinity", "Infinity", sign)); - memory.copy(buffer + STRING_HEADER_SIZE, source + STRING_HEADER_SIZE, len << 1); + memory.copy(buffer, source, len << 1); return len; } } diff --git a/std/assembly/util/runtime.ts b/std/assembly/util/runtime.ts new file mode 100644 index 0000000000..b3512c0c80 --- /dev/null +++ b/std/assembly/util/runtime.ts @@ -0,0 +1,158 @@ +import { AL_MASK, MAX_SIZE_32 } from "./allocator"; +import { __runtime_id } from "../runtime"; +import { Array } from "../array"; +import { ArrayBufferView } from "../arraybuffer"; + +/** + * The common runtime object header prepended to all managed objects. Has a size of 16 bytes in + * WASM32 and contains a classId (e.g. for instanceof checks), the allocation size (e.g. for + * .byteLength and .length computation) and additional reserved fields to be used by GC. If no + * GC is present, the HEADER is cut into half excluding the reserved fields, as indicated by + * HEADER_SIZE. +*/ +@unmanaged export class HEADER { + /** Unique id of the respective class or a magic value if not yet registered.*/ + classId: u32; + /** Size of the allocated payload. */ + payloadSize: u32; + /** Reserved field for use by GC. */ + reserved1: usize; // itcm: tagged next + /** Reserved field for use by GC. */ + reserved2: usize; // itcm: prev +} + +/** Common runtime header size. */ +// @ts-ignore: decorator +@lazy +export const HEADER_SIZE: usize = (offsetof
() + AL_MASK) & ~AL_MASK; + +/** Common runtime header magic. Used to assert registered/unregistered status. */ +// @ts-ignore: decorator +@lazy +export const HEADER_MAGIC: u32 = 0xA55E4B17; + +/** Maximum byte length of any buffer-like object. */ +// @ts-ignore +@lazy +export const MAX_BYTELENGTH: i32 = MAX_SIZE_32 - HEADER_SIZE; + +/** Adjusts an allocation to actual block size. Primarily targets TLSF. */ +export function adjust(payloadSize: usize): usize { + // round up to power of 2, e.g. with HEADER_SIZE=8: + // 0 -> 2^3 = 8 + // 1..8 -> 2^4 = 16 + // 9..24 -> 2^5 = 32 + // ... + // MAX_LENGTH -> 2^30 = 0x40000000 (MAX_SIZE_32) + return 1 << (32 - clz(payloadSize + HEADER_SIZE - 1)); +} + +/** Allocates the memory necessary to represent a managed object of the specified size. */ +// @ts-ignore: decorator +@unsafe +export function allocate(payloadSize: usize): usize { + var header = changetype
(memory.allocate(adjust(payloadSize))); + header.classId = HEADER_MAGIC; + header.payloadSize = payloadSize; + if (isDefined(__ref_collect)) { + header.reserved1 = 0; + header.reserved2 = 0; + } + return changetype(header) + HEADER_SIZE; +} + +/** Reallocates the memory of a managed object that turned out to be too small or too large. */ +// @ts-ignore: decorator +@unsafe +export function reallocate(ref: usize, newPayloadSize: usize): usize { + // Background: When managed objects are allocated these aren't immediately registered with GC + // but can be used as scratch objects while unregistered. This is useful in situations where + // the object must be reallocated multiple times because its final size isn't known beforehand, + // e.g. in Array#filter, with only the final object making it into GC'ed userland. + var header = changetype
(ref - HEADER_SIZE); + var payloadSize = header.payloadSize; + if (payloadSize < newPayloadSize) { + let newAdjustedSize = adjust(newPayloadSize); + if (select(adjust(payloadSize), 0, ref > HEAP_BASE) < newAdjustedSize) { + // move if the allocation isn't large enough or not a heap object + let newHeader = changetype
(memory.allocate(newAdjustedSize)); + newHeader.classId = header.classId; + if (isDefined(__ref_collect)) { + newHeader.reserved1 = 0; + newHeader.reserved2 = 0; + } + let newRef = changetype(newHeader) + HEADER_SIZE; + memory.copy(newRef, ref, payloadSize); + memory.fill(newRef + payloadSize, 0, newPayloadSize - payloadSize); + if (header.classId == HEADER_MAGIC) { + // free right away if not registered yet + assert(ref > HEAP_BASE); // static objects aren't scratch objects + memory.free(changetype(header)); + } else if (isDefined(__ref_collect)) { + // if previously registered, register again + // @ts-ignore: stub + __ref_register(ref); + } + header = newHeader; + ref = newRef; + } else { + // otherwise just clear additional memory within this block + memory.fill(ref + payloadSize, 0, newPayloadSize - payloadSize); + } + } else { + // if the size is the same or less, just update the header accordingly. + // unused space is cleared when grown, so no need to do this here. + } + header.payloadSize = newPayloadSize; + return ref; +} + +/** Discards the memory of a managed object that hasn't been registered yet. */ +// @ts-ignore: decorator +@unsafe +export function discard(ref: usize): void { + if (!ASC_NO_ASSERT) { + assert(ref > HEAP_BASE); // must be a heap object + let header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); + memory.free(changetype(header)); + } else { + memory.free(changetype(ref - HEADER_SIZE)); + } +} + +/** Registers a managed object of the kind represented by the specified runtime id. */ +// @ts-ignore: decorator +@unsafe +export function register(ref: usize, id: u32): usize { + if (!ASC_NO_ASSERT) { + assert(ref > HEAP_BASE); // must be a heap object + let header = changetype
(ref - HEADER_SIZE); + assert(header.classId == HEADER_MAGIC); + header.classId = id; + } else { + changetype
(ref - HEADER_SIZE).classId = id; + } + if (isDefined(__ref_register)) __ref_register(ref); + return ref; +} + +// @ts-ignore: decorator +@unsafe +export function makeArray(length: i32, alignLog2: usize, id: u32, data: usize = 0): usize { + var array = register(allocate(offsetof()), id); + var bufferSize = length << alignLog2; + var buffer = register(allocate(bufferSize), __runtime_id()); + changetype(array).data = changetype(buffer); // links + changetype(array).dataStart = buffer; + changetype(array).dataLength = bufferSize; + store(changetype(array), length, offsetof("length_")); + if (data) memory.copy(buffer, data, bufferSize); + return array; +} + +// @ts-ignore: decorator +@inline +export function NEWARRAY(length: i32): Array { + return changetype>(makeArray(length, alignof(), __runtime_id>(), 0)); +} diff --git a/std/assembly/internal/sort.ts b/std/assembly/util/sort.ts similarity index 50% rename from std/assembly/internal/sort.ts rename to std/assembly/util/sort.ts index 8d50efb115..528c9864fc 100644 --- a/std/assembly/internal/sort.ts +++ b/std/assembly/util/sort.ts @@ -1,97 +1,86 @@ -import { - LOAD, - STORE -} from "./arraybuffer"; +import { compareImpl } from "./string"; -import { - compareUnsafe -} from "./string"; - -/** Obtains the default comparator for the specified value type. */ +// @ts-ignore: decorator @inline export function COMPARATOR(): (a: T, b: T) => i32 { if (isInteger()) { if (isSigned() && sizeof() <= 4) { - return (a: T, b: T): i32 => ((a - b)); + return (a: T, b: T): i32 => (i32(a) - i32(b)); } else { - return (a: T, b: T): i32 => ((a > b) - (a < b)); + return (a: T, b: T): i32 => (i32(a > b) - i32(a < b)); } } else if (isFloat()) { if (sizeof() == 4) { return (a: T, b: T): i32 => { - var ia = reinterpret(a); - var ib = reinterpret(b); + var ia = reinterpret(f32(a)); + var ib = reinterpret(f32(b)); ia ^= (ia >> 31) >>> 1; ib ^= (ib >> 31) >>> 1; - return (ia > ib) - (ia < ib); + return i32(ia > ib) - i32(ia < ib); }; } else { return (a: T, b: T): i32 => { - var ia = reinterpret(a); - var ib = reinterpret(b); + var ia = reinterpret(f64(a)); + var ib = reinterpret(f64(b)); ia ^= (ia >> 63) >>> 1; ib ^= (ib >> 63) >>> 1; - return (ia > ib) - (ia < ib); + return i32(ia > ib) - i32(ia < ib); }; } } else if (isString()) { return (a: T, b: T): i32 => { if (a === b || a === null || b === null) return 0; - var alen = (a).length; - var blen = (b).length; + var alen = changetype(a).length; + var blen = changetype(b).length; if (!alen && !blen) return 0; if (!alen) return -1; if (!blen) return 1; - return compareUnsafe(a, 0, b, 0, min(alen, blen)); + return compareImpl(changetype(a), 0, changetype(b), 0, min(alen, blen)); }; } else { - return (a: T, b: T): i32 => ((a > b) - (a < b)); + return (a: T, b: T): i32 => (i32(a > b) - i32(a < b)); } } +// @ts-ignore: decorator @inline export function SORT( - buffer: ArrayBuffer, - byteOffset: i32, + dataStart: usize, length: i32, comparator: (a: T, b: T) => i32 ): void { if (isReference()) { // TODO replace this to faster stable sort (TimSort) when it implemented - insertionSort(buffer, byteOffset, length, comparator); + insertionSort(dataStart, length, comparator); } else { if (length < 256) { - insertionSort(buffer, byteOffset, length, comparator); + insertionSort(dataStart, length, comparator); } else { - weakHeapSort(buffer, byteOffset, length, comparator); + weakHeapSort(dataStart, length, comparator); } } } -/** Sorts an Array with the 'Insertion Sort' algorithm. */ function insertionSort( - buffer: ArrayBuffer, - byteOffset: i32, + dataStart: usize, length: i32, comparator: (a: T, b: T) => i32 ): void { for (let i = 0; i < length; i++) { - let a = LOAD(buffer, i, byteOffset); // a = arr[i] + let a: T = load(dataStart + (i << alignof())); // a = arr[i] let j = i - 1; while (j >= 0) { - let b = LOAD(buffer, j, byteOffset); // b = arr[j] + let b: T = load(dataStart + (j << alignof())); // b = arr[j] if (comparator(a, b) < 0) { - STORE(buffer, j-- + 1, b, byteOffset); // arr[j + 1] = b + store(dataStart + ((j-- + 1) << alignof()), b); // arr[j + 1] = b } else break; } - STORE(buffer, j + 1, a, byteOffset); // arr[j + 1] = a + store(dataStart + ((j + 1) << alignof()), a); // arr[j + 1] = a } } -/** Sorts an Array with the 'Weak Heap Sort' algorithm. */ function weakHeapSort( - buffer: ArrayBuffer, - byteOffset: i32, + dataStart: usize, length: i32, comparator: (a: T, b: T) => i32 ): void { @@ -108,37 +97,37 @@ function weakHeapSort( while ((j & 1) == (load(bitset + (j >> 6 << shift32)) >> (j >> 1 & 31) & 1)) j >>= 1; let p = j >> 1; - let a = LOAD(buffer, p, byteOffset); // a = arr[p] - let b = LOAD(buffer, i, byteOffset); // b = arr[i] + let a: T = load(dataStart + (p << alignof())); // a = arr[p] + let b: T = load(dataStart + (i << alignof())); // b = arr[i] if (comparator(a, b) < 0) { store( bitset + (i >> 5 << shift32), load(bitset + (i >> 5 << shift32)) ^ (1 << (i & 31)) ); - STORE(buffer, i, a, byteOffset); // arr[i] = a - STORE(buffer, p, b, byteOffset); // arr[p] = b + store(dataStart + (i << alignof()), a); // arr[i] = a + store(dataStart + (p << alignof()), b); // arr[p] = b } } for (let i = length - 1; i >= 2; i--) { - let a = LOAD(buffer, 0, byteOffset); - STORE(buffer, 0, LOAD(buffer, i, byteOffset), byteOffset); - STORE(buffer, i, a, byteOffset); + let a: T = load(dataStart); // a = arr[0] + store(dataStart, load(dataStart + (i << alignof()))); // arr[0] = arr[i] + store(dataStart + (i << alignof()), a); // arr[i] = a let x = 1, y: i32; while ((y = (x << 1) + ((load(bitset + (x >> 5 << shift32)) >> (x & 31)) & 1)) < i) x = y; while (x > 0) { - a = LOAD(buffer, 0, byteOffset); // a = arr[0] - let b = LOAD(buffer, x, byteOffset); // b = arr[x] + a = load(dataStart); // a = arr[0] + let b: T = load(dataStart + (x << alignof())); // b = arr[x] if (comparator(a, b) < 0) { store( bitset + (x >> 5 << shift32), load(bitset + (x >> 5 << shift32)) ^ (1 << (x & 31)) ); - STORE(buffer, x, a, byteOffset); // arr[x] = a - STORE(buffer, 0, b, byteOffset); // arr[0] = b + store(dataStart + (x << alignof()), a); // arr[x] = a + store(dataStart, b); // arr[0] = b } x >>= 1; } @@ -146,7 +135,7 @@ function weakHeapSort( memory.free(bitset); - var t = LOAD(buffer, 1, byteOffset); // t = arr[1] - STORE(buffer, 1, LOAD(buffer, 0, byteOffset), byteOffset); - STORE(buffer, 0, t, byteOffset); // arr[0] = t + var t: T = load(dataStart, sizeof()); // t = arr[1] + store(dataStart, load(dataStart), sizeof()); // arr[1] = arr[0] + store(dataStart, t); // arr[0] = t } diff --git a/std/assembly/util/string.ts b/std/assembly/util/string.ts new file mode 100644 index 0000000000..e9d3a2d7db --- /dev/null +++ b/std/assembly/util/string.ts @@ -0,0 +1,136 @@ +export function compareImpl(str1: string, index1: usize, str2: string, index2: usize, len: usize): i32 { + var result: i32 = 0; + var ptr1 = changetype(str1) + (index1 << 1); + var ptr2 = changetype(str2) + (index2 << 1); + while (len && !(result = load(ptr1) - load(ptr2))) { + --len, ptr1 += 2, ptr2 += 2; + } + return result; +} + +// @ts-ignore: decorator +@inline +export const enum CharCode { + PLUS = 0x2B, + MINUS = 0x2D, + DOT = 0x2E, + _0 = 0x30, + _1 = 0x31, + _2 = 0x32, + _3 = 0x33, + _4 = 0x34, + _5 = 0x35, + _6 = 0x36, + _7 = 0x37, + _8 = 0x38, + _9 = 0x39, + A = 0x41, + B = 0x42, + E = 0x45, + N = 0x4E, + O = 0x4F, + X = 0x58, + Z = 0x5a, + a = 0x61, + b = 0x62, + e = 0x65, + n = 0x6E, + o = 0x6F, + x = 0x78, + z = 0x7A +} + +export function isWhiteSpaceOrLineTerminator(c: u16): bool { + switch (c) { + case 9: // + case 10: // + case 13: // + case 11: // + case 12: // + case 32: // + case 160: // + case 8232: // + case 8233: // + case 65279: return true; // + default: return false; + } +} + +/** Parses a string to an integer (usually), using the specified radix. */ +export function parse(str: string, radix: i32 = 0): T { + var len: i32 = str.length; + // @ts-ignore: cast + if (!len) return NaN; + + var ptr = changetype(str) /* + HEAD -> offset */; + var code = load(ptr); + + // determine sign + var sign: T; + if (code == CharCode.MINUS) { + // @ts-ignore: cast + if (!--len) return NaN; + code = load(ptr += 2); + // @ts-ignore: type + sign = -1; + } else if (code == CharCode.PLUS) { + // @ts-ignore: cast + if (!--len) return NaN; + code = load(ptr += 2); + // @ts-ignore: type + sign = 1; + } else { + // @ts-ignore: type + sign = 1; + } + + // determine radix + if (!radix) { + if (code == CharCode._0 && len > 2) { + switch (load(ptr + 2)) { + case CharCode.B: + case CharCode.b: { + ptr += 4; len -= 2; + radix = 2; + break; + } + case CharCode.O: + case CharCode.o: { + ptr += 4; len -= 2; + radix = 8; + break; + } + case CharCode.X: + case CharCode.x: { + ptr += 4; len -= 2; + radix = 16; + break; + } + default: radix = 10; + } + } else radix = 10; + } else if (radix < 2 || radix > 36) { + // @ts-ignore: cast + return NaN; + } + + // calculate value + // @ts-ignore: type + var num: T = 0; + while (len--) { + code = load(ptr); + if (code >= CharCode._0 && code <= CharCode._9) { + code -= CharCode._0; + } else if (code >= CharCode.A && code <= CharCode.Z) { + code -= CharCode.A - 10; + } else if (code >= CharCode.a && code <= CharCode.z) { + code -= CharCode.a - 10; + } else break; + if (code >= radix) break; + // @ts-ignore: type + num = (num * radix) + code; + ptr += 2; + } + // @ts-ignore: type + return sign * num; +} diff --git a/std/assembly/vector.ts b/std/assembly/vector.ts index 0b264a39ca..6aceaf4674 100644 --- a/std/assembly/vector.ts +++ b/std/assembly/vector.ts @@ -1,3 +1,3 @@ -@sealed -export abstract class V128 { +/** Vector abstraction. */ +@sealed export class V128 { } diff --git a/std/portable/index.d.ts b/std/portable/index.d.ts index 1fbc7e41e0..b42237c2bc 100644 --- a/std/portable/index.d.ts +++ b/std/portable/index.d.ts @@ -130,7 +130,7 @@ declare function fmod(x: f64, y: f64): f64; declare function fmodf(x: f32, y: f32): f32; /** Converts any other numeric value to an 8-bit signed integer. */ -declare function i8(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i8; +declare function i8(value: any): i8; declare namespace i8 { /** Smallest representable value. */ export const MIN_VALUE: i8; @@ -142,7 +142,7 @@ declare namespace i8 { export function parseInt(string: string, radix?: i32): i8; } /** Converts any other numeric value to a 16-bit signed integer. */ -declare function i16(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i8; +declare function i16(value: any): i16; declare namespace i16 { /** Smallest representable value. */ export const MIN_VALUE: i16; @@ -154,7 +154,7 @@ declare namespace i16 { export function parseInt(string: string, radix?: i32): i16; } /** Converts any other numeric value to a 32-bit signed integer. */ -declare function i32(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i32; +declare function i32(value: any): i32; declare namespace i32 { /** Smallest representable value. */ export const MIN_VALUE: i32; @@ -166,7 +166,7 @@ declare namespace i32 { export function parseInt(string: string, radix?: i32): i32; } /** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) signed integer. */ -declare function isize(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): isize; +declare function isize(value: any): isize; declare namespace isize { /** Smallest representable value. */ export const MIN_VALUE: isize; @@ -178,7 +178,7 @@ declare namespace isize { export function parseInt(string: string, radix?: i32): isize; } /** Converts any other numeric value to an 8-bit unsigned integer. */ -declare function u8(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i8; +declare function u8(value: any): u8; declare namespace u8 { /** Smallest representable value. */ export const MIN_VALUE: u8; @@ -190,7 +190,7 @@ declare namespace u8 { export function parseInt(string: string, radix?: i32): u8; } /** Converts any other numeric value to a 16-bit unsigned integer. */ -declare function u16(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i8; +declare function u16(value: any): u16; declare namespace u16 { /** Smallest representable value. */ export const MIN_VALUE: u16; @@ -202,7 +202,7 @@ declare namespace u16 { export function parseInt(string: string, radix?: i32): u16; } /** Converts any other numeric value to a 32-bit unsigned integer. */ -declare function u32(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): i32; +declare function u32(value: any): u32; declare namespace u32 { /** Smallest representable value. */ export const MIN_VALUE: u32; @@ -214,7 +214,7 @@ declare namespace u32 { export function parseInt(string: string, radix?: i32): u32; } /** Converts any other numeric value to a 32-bit (in WASM32) respectivel 64-bit (in WASM64) unsigned integer. */ -declare function usize(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): isize; +declare function usize(value: any): isize; declare namespace usize { /** Smallest representable value. */ export const MIN_VALUE: usize; @@ -226,7 +226,7 @@ declare namespace usize { export function parseInt(string: string, radix?: i32): usize; } /** Converts any other numeric value to a 1-bit unsigned integer. */ -declare function bool(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): bool; +declare function bool(value: any): bool; declare namespace bool { /** Smallest representable value. */ export const MIN_VALUE: bool; @@ -234,7 +234,7 @@ declare namespace bool { export const MAX_VALUE: bool; } /** Converts any other numeric value to a 32-bit float. */ -declare function f32(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): f32; +declare function f32(value: any): f32; declare namespace f32 { /** Smallest representable value. */ export const MIN_VALUE: f32; @@ -262,7 +262,7 @@ declare namespace f32 { export function parseInt(string: string, radix?: i32): f32; } /** Converts any other numeric value to a 64-bit float. */ -declare function f64(value: i8 | i16 | i32 | isize | u8 | u16 | u32 | usize | bool | f32 | f64): f64; +declare function f64(value: any): f64; declare namespace f64 { /** Smallest representable value. */ export const MIN_VALUE: f64; @@ -376,6 +376,7 @@ declare class DataView { declare class Array { static isArray(value: any): value is Array; + static create(capacity?: i32): Array; [key: number]: T; length: i32; @@ -643,3 +644,6 @@ declare namespace console { /** @deprecated */ function log(message: string): void; } + +/** Annotates a class as being unmanaged with limited capabilities. */ +declare function unmanaged(constructor: Function): void; diff --git a/std/portable/index.js b/std/portable/index.js index 00aa35e1af..1c8173ce13 100644 --- a/std/portable/index.js +++ b/std/portable/index.js @@ -2,7 +2,7 @@ var globalScope = typeof window !== "undefined" && window || typeof global !== "undefined" && global || self; -globalScope.ASC_TARGET = 0; // JS +globalScope.ASC_TARGET = 2; // Target.JS globalScope.ASC_NO_ASSERT = false; globalScope.ASC_MEMORY_BASE = 0; globalScope.ASC_OPTIMIZE_LEVEL = 3; @@ -229,7 +229,13 @@ globalScope["isArrayLike"] = function isArrayLike(expr) { && typeof expr.length === 'number' && expr.length >= 0 && Math.trunc(expr.length) === expr.length; -} +}; + +Array.create = function(capacity) { + var arr = new Array(capacity); + arr.length = 0; + return arr; +}; globalScope["isDefined"] = function isDefined(expr) { return typeof expr !== "undefined"; @@ -305,3 +311,5 @@ globalScope["store"] = globalScope["__store"] || function store(ptr, value, offs globalScope["load"] = globalScope["__load"] || function load(ptr, offset) { return HEAP[(ptr | 0) + (offset | 0)]; }; + +globalScope["unmanaged"] = function() {}; diff --git a/tests/allocators/arena/optimized.wat b/tests/allocators/arena/optimized.wat index 0756cb695a..16b995f91a 100644 --- a/tests/allocators/arena/optimized.wat +++ b/tests/allocators/arena/optimized.wat @@ -1,77 +1,45 @@ (module - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $i_ (func (param i32))) - (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") + (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $~lib/internal/memory/memcmp (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 24 + i32.const 46 + i32.const 4 + call $~lib/builtins/abort + unreachable ) - (func $~lib/memory/memory.compare (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 24 + i32.const 53 + i32.const 4 + call $~lib/builtins/abort + unreachable ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $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) @@ -82,8 +50,6 @@ if unreachable end - global.get $~lib/allocator/arena/offset - local.tee $2 local.get $0 i32.const 1 local.tee $1 @@ -91,21 +57,23 @@ local.get $1 i32.gt_u select + global.get $~lib/allocator/arena/offset + local.tee $0 i32.add i32.const 7 i32.add i32.const -8 i32.and - local.tee $3 - current_memory local.tee $1 + current_memory + local.tee $2 i32.const 16 i32.shl i32.gt_u if - local.get $1 - local.get $3 local.get $2 + local.get $1 + local.get $0 i32.sub i32.const 65535 i32.add @@ -113,9 +81,9 @@ i32.and i32.const 16 i32.shr_u - local.tee $0 + local.tee $3 local.tee $4 - local.get $1 + local.get $2 local.get $4 i32.gt_s select @@ -123,7 +91,7 @@ i32.const 0 i32.lt_s if - local.get $0 + local.get $3 grow_memory i32.const 0 i32.lt_s @@ -132,28 +100,273 @@ end end end - local.get $3 + local.get $1 global.set $~lib/allocator/arena/offset - local.get $2 + local.get $0 ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $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/__memory_allocate + call $~lib/allocator/arena/__mem_allocate ) - (func $~lib/memory/memory.free (; 4 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.reset (; 5 ;) (type $_) + (func $~lib/memory/memory.reset (; 6 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $start (; 6 ;) (type $_) - i32.const 8 + (func $~lib/memory/memory.copy (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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|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 $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/memory/memory.repeat (; 8 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + local.get $2 + local.get $3 + i32.mul + local.set $3 + loop $continue|0 + local.get $4 + local.get $3 + i32.lt_u + if + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $4 + br $continue|0 + end + end + ) + (func $~lib/memory/memory.compare (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 0 + else + loop $continue|0 + local.get $2 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.eq + else + i32.const 0 + end + if + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $2 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $start (; 10 ;) (type $FUNCSIG$v) + i32.const 56 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 7 ;) (type $_) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/arena/package.json b/tests/allocators/arena/package.json index 68fede664c..dc760bf282 100644 --- a/tests/allocators/arena/package.json +++ b/tests/allocators/arena/package.json @@ -2,7 +2,7 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --validate --sourceMap --measure", - "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --validate --sourceMap --measure --noAssert --optimize" + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" } } diff --git a/tests/allocators/arena/untouched.wat b/tests/allocators/arena/untouched.wat index 664649377e..e912ce6161 100644 --- a/tests/allocators/arena/untouched.wat +++ b/tests/allocators/arena/untouched.wat @@ -1,97 +1,47 @@ (module - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $i_ (func (param i32))) - (memory $0 0) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 52)) (export "memory" (memory $0)) - (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $_) - 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/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 24 + i32.const 46 + i32.const 4 + call $~lib/builtins/abort + unreachable ) - (func $start:assembly/index (; 1 ;) (type $_) - call $start:~lib/allocator/arena + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 24 + i32.const 53 + i32.const 4 + call $~lib/builtins/abort + unreachable ) - (func $~lib/internal/memory/memcmp (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - block $break|0 - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - block - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end - ) - (func $~lib/memory/memory.compare (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $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) @@ -170,30 +120,341 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $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/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/allocator/arena/__memory_free (; 6 ;) (type $i_) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/memory/memory.free (; 7 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/allocator/arena/__memory_free - return + call $~lib/allocator/arena/__mem_free ) - (func $~lib/allocator/arena/__memory_reset (; 8 ;) (type $_) + (func $~lib/allocator/arena/__mem_reset (; 7 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $~lib/memory/memory.reset (; 9 ;) (type $_) - call $~lib/allocator/arena/__memory_reset - return + (func $~lib/memory/memory.reset (; 8 ;) (type $FUNCSIG$v) + call $~lib/allocator/arena/__mem_reset + ) + (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/memory/memory.repeat (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $4 + local.get $2 + local.get $3 + i32.mul + local.set $5 + block $break|0 + loop $continue|0 + local.get $4 + local.get $5 + i32.lt_u + if + block + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $4 + local.get $2 + i32.add + local.set $4 + end + br $continue|0 + end + end + end ) - (func $start (; 10 ;) (type $_) - call $start:assembly/index + (func $~lib/memory/memory.compare (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memcmp|inlined.0 (result i32) + local.get $0 + local.set $5 + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $5 + local.get $4 + i32.eq + if + i32.const 0 + br $~lib/util/memory/memcmp|inlined.0 + end + block $break|0 + loop $continue|0 + local.get $3 + i32.const 0 + i32.ne + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.eq + else + i32.const 0 + end + if + block + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $5 + i32.const 1 + i32.add + local.set $5 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + local.get $3 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $start (; 12 ;) (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 $null (; 11 ;) (type $_) + (func $null (; 13 ;) (type $FUNCSIG$v) ) ) diff --git a/std/assembly/allocator/buddy.ts b/tests/allocators/buddy/assembly/buddy.ts similarity index 98% rename from std/assembly/allocator/buddy.ts rename to tests/allocators/buddy/assembly/buddy.ts index 2aea2240ba..52cff567cc 100644 --- a/std/assembly/allocator/buddy.ts +++ b/tests/allocators/buddy/assembly/buddy.ts @@ -1,8 +1,3 @@ -/** - * Buddy Memory Allocator. - * @module std/assembly/allocator/buddy - *//***/ - /* Copyright 2018 Evan Wallace @@ -340,7 +335,7 @@ function lower_bucket_limit(bucket: usize): u32 { // Memory allocator interface -@global export function __memory_allocate(request: usize): usize { +@global export function __mem_allocate(request: usize): usize { var original_bucket: usize, bucket: usize; /* @@ -474,7 +469,7 @@ function lower_bucket_limit(bucket: usize): u32 { return 0; } -@global export function __memory_free(ptr: usize): void { +@global export function __mem_free(ptr: usize): void { var bucket: usize, i: usize; /* diff --git a/tests/allocators/buddy/assembly/index.ts b/tests/allocators/buddy/assembly/index.ts index 2fe5eda08a..b850ffb0e2 100644 --- a/tests/allocators/buddy/assembly/index.ts +++ b/tests/allocators/buddy/assembly/index.ts @@ -1,2 +1,2 @@ -import "allocator/buddy"; +import "./buddy"; export { memory }; diff --git a/tests/allocators/buddy/optimized.wat b/tests/allocators/buddy/optimized.wat index 234ec45d80..a0be6bb9ad 100644 --- a/tests/allocators/buddy/optimized.wat +++ b/tests/allocators/buddy/optimized.wat @@ -1,87 +1,56 @@ (module - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $i_ (func (param i32))) - (type $ii_ (func (param i32 i32))) - (type $iii (func (param i32 i32) (result i32))) - (memory $0 0) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (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$iiii (func (param i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/buddy/BUCKETS_START (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/BUCKETS_END (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/bucket_limit (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/NODE_IS_SPLIT_START (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/base_ptr (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/max_ptr (mut i32) (i32.const 0)) + (global $assembly/buddy/BUCKETS_START (mut i32) (i32.const 0)) + (global $assembly/buddy/BUCKETS_END (mut i32) (i32.const 0)) + (global $assembly/buddy/bucket_limit (mut i32) (i32.const 0)) + (global $assembly/buddy/NODE_IS_SPLIT_START (mut i32) (i32.const 0)) + (global $assembly/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) + (global $assembly/buddy/base_ptr (mut i32) (i32.const 0)) + (global $assembly/buddy/max_ptr (mut i32) (i32.const 0)) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $~lib/internal/memory/memcmp (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 16 + i32.const 46 + i32.const 4 + call $~lib/env/abort + unreachable ) - (func $~lib/memory/memory.compare (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 16 + i32.const 53 + i32.const 4 + call $~lib/env/abort + unreachable ) - (func $~lib/allocator/buddy/update_max_ptr (; 2 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) + (func $assembly/buddy/update_max_ptr (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/allocator/buddy/max_ptr + global.get $assembly/buddy/max_ptr i32.gt_u if local.get $0 @@ -91,7 +60,7 @@ i32.and i32.const 16 i32.shr_u - local.tee $1 + local.tee $0 current_memory i32.sub grow_memory @@ -101,21 +70,21 @@ i32.const 0 return end - local.get $1 + local.get $0 i32.const 16 i32.shl - global.set $~lib/allocator/buddy/max_ptr + global.set $assembly/buddy/max_ptr end i32.const 1 ) - (func $~lib/allocator/buddy/buckets$get (; 3 ;) (type $ii) (param $0 i32) (result i32) - global.get $~lib/allocator/buddy/BUCKETS_START + (func $assembly/buddy/buckets$get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + global.get $assembly/buddy/BUCKETS_START local.get $0 i32.const 3 i32.shl i32.add ) - (func $~lib/allocator/buddy/list_init (; 4 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/list_init (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store @@ -123,7 +92,7 @@ local.get $0 i32.store offset=4 ) - (func $~lib/allocator/buddy/list_push (; 5 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $assembly/buddy/list_push (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 local.get $0 @@ -140,7 +109,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/buddy/bucket_for_request (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/bucket_for_request (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) i32.const 26 @@ -165,12 +134,12 @@ end local.get $1 ) - (func $~lib/allocator/buddy/node_for_ptr (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/buddy/node_for_ptr (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 1 local.get $1 i32.shl local.get $0 - global.get $~lib/allocator/buddy/base_ptr + global.get $assembly/buddy/base_ptr i32.sub i32.const 30 local.get $1 @@ -180,13 +149,13 @@ i32.const 1 i32.sub ) - (func $~lib/allocator/buddy/node_is_split$get (; 8 ;) (type $ii) (param $0 i32) (result i32) - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + (func $assembly/buddy/node_is_split$get (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $0 i32.add i32.load8_u ) - (func $~lib/allocator/buddy/parent_is_split (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/parent_is_split (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.sub @@ -195,7 +164,7 @@ local.tee $0 i32.const 8 i32.div_u - call $~lib/allocator/buddy/node_is_split$get + call $assembly/buddy/node_is_split$get local.get $0 i32.const 7 i32.and @@ -205,7 +174,7 @@ i32.const 1 i32.eq ) - (func $~lib/allocator/buddy/list_remove (; 10 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/list_remove (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.load @@ -218,8 +187,8 @@ local.get $1 i32.store ) - (func $~lib/allocator/buddy/ptr_for_node (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/allocator/buddy/base_ptr + (func $assembly/buddy/ptr_for_node (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $assembly/buddy/base_ptr local.get $0 i32.const 1 local.get $1 @@ -233,7 +202,7 @@ i32.shl i32.add ) - (func $~lib/allocator/buddy/flip_parent_is_split (; 12 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/flip_parent_is_split (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -247,7 +216,7 @@ local.tee $1 local.set $2 local.get $1 - call $~lib/allocator/buddy/node_is_split$get + call $assembly/buddy/node_is_split$get i32.const 1 local.get $0 i32.const 7 @@ -255,71 +224,73 @@ i32.shl i32.xor local.set $0 - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $2 i32.add local.get $0 i32.store8 ) - (func $~lib/allocator/buddy/lower_bucket_limit (; 13 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/lower_bucket_limit (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) loop $continue|0 local.get $0 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.lt_u if - global.get $~lib/allocator/buddy/base_ptr - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/node_for_ptr + global.get $assembly/buddy/base_ptr + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/node_for_ptr local.tee $1 - call $~lib/allocator/buddy/parent_is_split + call $assembly/buddy/parent_is_split i32.eqz if - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_remove + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_remove block (result i32) - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/bucket_limit + local.tee $1 + global.set $assembly/buddy/bucket_limit + local.get $1 end - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/buckets$get - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_push + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/buckets$get + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_push br $continue|0 end local.get $1 i32.const 1 i32.add - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/ptr_for_node + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/ptr_for_node local.tee $2 i32.const 8 i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if i32.const 0 return end - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/buckets$get + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/buckets$get local.get $2 - call $~lib/allocator/buddy/list_push + call $assembly/buddy/list_push block (result i32) - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/bucket_limit + local.tee $2 + global.set $assembly/buddy/bucket_limit + local.get $2 end - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init local.get $1 i32.const 1 i32.sub @@ -328,29 +299,28 @@ local.tee $1 if local.get $1 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split end br $continue|0 end end i32.const 1 ) - (func $~lib/allocator/buddy/list_pop (; 14 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) + (func $assembly/buddy/list_pop (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.tee $1 local.get $0 + i32.load + local.tee $0 i32.eq if i32.const 0 return end - local.get $1 - call $~lib/allocator/buddy/list_remove - local.get $1 + local.get $0 + call $assembly/buddy/list_remove + local.get $0 ) - (func $~lib/allocator/buddy/__memory_allocate (; 15 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/__mem_allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -361,42 +331,42 @@ if unreachable end - global.get $~lib/allocator/buddy/base_ptr + global.get $assembly/buddy/base_ptr i32.eqz if - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_END + global.get $assembly/buddy/NODE_IS_SPLIT_END i32.const 7 i32.add i32.const -8 i32.and - global.set $~lib/allocator/buddy/base_ptr + global.set $assembly/buddy/base_ptr current_memory i32.const 16 i32.shl - global.set $~lib/allocator/buddy/max_ptr + global.set $assembly/buddy/max_ptr i32.const 26 - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/base_ptr + global.set $assembly/buddy/bucket_limit + global.get $assembly/buddy/base_ptr i32.const 8 i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if i32.const 0 return end i32.const 26 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init i32.const 26 - call $~lib/allocator/buddy/buckets$get - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_push + call $assembly/buddy/buckets$get + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_push end local.get $0 i32.const 8 i32.add - call $~lib/allocator/buddy/bucket_for_request + call $assembly/buddy/bucket_for_request local.tee $1 local.set $4 loop $continue|0 @@ -405,20 +375,20 @@ i32.ne if local.get $1 - call $~lib/allocator/buddy/lower_bucket_limit + call $assembly/buddy/lower_bucket_limit i32.eqz if i32.const 0 return end local.get $1 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_pop + call $assembly/buddy/buckets$get + call $assembly/buddy/list_pop local.tee $2 i32.eqz if local.get $1 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.ne local.tee $2 if (result i32) @@ -437,15 +407,15 @@ local.get $1 i32.const 1 i32.sub - call $~lib/allocator/buddy/lower_bucket_limit + call $assembly/buddy/lower_bucket_limit i32.eqz if i32.const 0 return end local.get $1 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_pop + call $assembly/buddy/buckets$get + call $assembly/buddy/list_pop local.set $2 end i32.const 1 @@ -468,23 +438,23 @@ end local.get $2 i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if local.get $1 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $2 - call $~lib/allocator/buddy/list_push + call $assembly/buddy/list_push i32.const 0 return end local.get $2 local.get $1 - call $~lib/allocator/buddy/node_for_ptr + call $assembly/buddy/node_for_ptr local.tee $3 if local.get $3 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split end loop $continue|1 local.get $1 @@ -497,18 +467,18 @@ i32.const 1 i32.add local.tee $3 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split local.get $1 i32.const 1 i32.add local.tee $1 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $3 i32.const 1 i32.add local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_push + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_push br $continue|1 end end @@ -523,11 +493,11 @@ end i32.const 0 ) - (func $~lib/memory/memory.allocate (; 16 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/buddy/__memory_allocate + call $assembly/buddy/__mem_allocate ) - (func $~lib/allocator/buddy/__memory_free (; 17 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/__mem_free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -538,86 +508,1262 @@ local.get $0 i32.const 8 i32.sub - local.tee $0 + local.tee $1 i32.load i32.const 8 i32.add - call $~lib/allocator/buddy/bucket_for_request - local.set $1 - local.get $0 - local.get $1 - call $~lib/allocator/buddy/node_for_ptr + call $assembly/buddy/bucket_for_request local.set $0 + local.get $1 + local.get $0 + call $assembly/buddy/node_for_ptr + local.set $1 loop $continue|0 - local.get $0 + local.get $1 if block $break|0 - local.get $0 - call $~lib/allocator/buddy/flip_parent_is_split - local.get $0 - call $~lib/allocator/buddy/parent_is_split + local.get $1 + call $assembly/buddy/flip_parent_is_split + local.get $1 + call $assembly/buddy/parent_is_split local.tee $2 if (result i32) local.get $2 else - local.get $1 - global.get $~lib/allocator/buddy/bucket_limit + local.get $0 + global.get $assembly/buddy/bucket_limit i32.eq end br_if $break|0 - local.get $0 + local.get $1 i32.const 1 i32.sub i32.const 1 i32.xor i32.const 1 i32.add - local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_remove local.get $0 + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_remove + local.get $1 i32.const 1 i32.sub i32.const 2 i32.div_u - local.set $0 - local.get $1 + local.set $1 + local.get $0 i32.const 1 i32.sub - local.set $1 + local.set $0 br $continue|0 end end end - local.get $1 - call $~lib/allocator/buddy/buckets$get local.get $0 + call $assembly/buddy/buckets$get local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_push + local.get $0 + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_push ) - (func $~lib/memory/memory.free (; 18 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/allocator/buddy/__memory_free + call $assembly/buddy/__mem_free ) - (func $~lib/memory/memory.reset (; 19 ;) (type $_) + (func $~lib/memory/memory.reset (; 20 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 16 + i32.const 77 + i32.const 9 + call $~lib/env/abort unreachable ) - (func $start (; 20 ;) (type $_) - i32.const 8 - global.set $~lib/allocator/buddy/BUCKETS_START - global.get $~lib/allocator/buddy/BUCKETS_START + (func $~lib/util/memory/memcpy (; 21 ;) (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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 + block $case0|2 + local.get $0 + i32.const 3 + i32.and + i32.const 1 + i32.sub + br_table $case0|2 $case1|2 $case2|2 $break|2 + end + local.get $1 + i32.load + local.set $4 + local.get $0 + local.get $1 + i32.load8_u + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.tee $0 + i32.const 1 + i32.add + local.set $3 + local.get $0 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $0 + i32.const 1 + i32.add + local.set $5 + local.get $0 + i32.load8_u + end + i32.store8 + local.get $3 + i32.const 1 + i32.add + local.set $0 + local.get $5 + i32.const 1 + i32.add + local.set $1 + local.get $3 + local.get $5 + 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 $4 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 5 + i32.add + i32.load + local.tee $4 + i32.const 8 + i32.shl + local.get $3 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 9 + i32.add + i32.load + local.tee $3 + i32.const 8 + i32.shl + local.get $4 + i32.const 24 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 13 + i32.add + i32.load + local.tee $4 + 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 $4 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $4 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 6 + i32.add + i32.load + local.tee $4 + i32.const 16 + i32.shl + local.get $3 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 10 + i32.add + i32.load + local.tee $3 + i32.const 16 + i32.shl + local.get $4 + i32.const 16 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 14 + i32.add + i32.load + local.tee $4 + 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 $4 + local.get $0 + local.tee $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $4 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.const 7 + i32.add + i32.load + local.tee $4 + i32.const 24 + i32.shl + local.get $3 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.const 11 + i32.add + i32.load + local.tee $3 + i32.const 24 + i32.shl + local.get $4 + i32.const 8 + i32.shr_u + i32.or + i32.store + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.const 15 + i32.add + i32.load + local.tee $4 + 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 $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $3 + i32.const 1 + i32.add + local.set $0 + local.get $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + i32.store8 + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $3 + block (result i32) + local.get $1 + i32.const 1 + i32.add + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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/memory/memory.copy (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + 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/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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|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 $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/memory/memory.repeat (; 23 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + local.get $2 + local.get $3 + i32.mul + local.set $3 + loop $continue|0 + local.get $4 + local.get $3 + i32.lt_u + if + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $4 + br $continue|0 + end + end + ) + (func $~lib/memory/memory.compare (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 0 + else + loop $continue|0 + local.get $2 + i32.const 0 + i32.ne + local.tee $3 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.eq + else + local.get $3 + end + if + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $2 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $start (; 25 ;) (type $FUNCSIG$v) + i32.const 44 + global.set $assembly/buddy/BUCKETS_START + global.get $assembly/buddy/BUCKETS_START i32.const 216 i32.add - global.set $~lib/allocator/buddy/BUCKETS_END - global.get $~lib/allocator/buddy/BUCKETS_END - global.set $~lib/allocator/buddy/NODE_IS_SPLIT_START - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + global.set $assembly/buddy/BUCKETS_END + global.get $assembly/buddy/BUCKETS_END + global.set $assembly/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START i32.const 8388608 i32.add - global.set $~lib/allocator/buddy/NODE_IS_SPLIT_END + global.set $assembly/buddy/NODE_IS_SPLIT_END ) - (func $null (; 21 ;) (type $_) + (func $null (; 26 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/buddy/package.json b/tests/allocators/buddy/package.json index 68fede664c..dc760bf282 100644 --- a/tests/allocators/buddy/package.json +++ b/tests/allocators/buddy/package.json @@ -2,7 +2,7 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --validate --sourceMap --measure", - "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --validate --sourceMap --measure --noAssert --optimize" + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" } } diff --git a/tests/allocators/buddy/untouched.wat b/tests/allocators/buddy/untouched.wat index b67987cb56..1d9e0dff66 100644 --- a/tests/allocators/buddy/untouched.wat +++ b/tests/allocators/buddy/untouched.wat @@ -1,125 +1,89 @@ (module - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $iiii_ (func (param i32 i32 i32 i32))) - (type $i_ (func (param i32))) - (type $ii_ (func (param i32 i32))) - (type $iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (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$iiii (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\17\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00b\00u\00d\00d\00y\00.\00t\00s\00") + (data (i32.const 8) "\01\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 48) "\01\00\00\00\"\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00b\00u\00d\00d\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/allocator/buddy/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/allocator/buddy/MIN_ALLOC_LOG2 i32 (i32.const 4)) - (global $~lib/allocator/buddy/MIN_ALLOC i32 (i32.const 16)) - (global $~lib/allocator/buddy/MAX_ALLOC_LOG2 i32 (i32.const 30)) - (global $~lib/allocator/buddy/MAX_ALLOC i32 (i32.const 1073741824)) - (global $~lib/allocator/buddy/BUCKET_COUNT i32 (i32.const 27)) - (global $~lib/allocator/buddy/List.SIZE i32 (i32.const 8)) - (global $~lib/allocator/buddy/BUCKETS_START (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/BUCKETS_END (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/bucket_limit (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/SPLIT_COUNT i32 (i32.const 8388608)) - (global $~lib/allocator/buddy/NODE_IS_SPLIT_START (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/base_ptr (mut i32) (i32.const 0)) - (global $~lib/allocator/buddy/max_ptr (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (global $assembly/buddy/HEADER_SIZE i32 (i32.const 8)) + (global $assembly/buddy/MIN_ALLOC_LOG2 i32 (i32.const 4)) + (global $assembly/buddy/MIN_ALLOC i32 (i32.const 16)) + (global $assembly/buddy/MAX_ALLOC_LOG2 i32 (i32.const 30)) + (global $assembly/buddy/MAX_ALLOC i32 (i32.const 1073741824)) + (global $assembly/buddy/BUCKET_COUNT i32 (i32.const 27)) + (global $assembly/buddy/List.SIZE i32 (i32.const 8)) + (global $assembly/buddy/BUCKETS_START (mut i32) (i32.const 0)) + (global $assembly/buddy/BUCKETS_END (mut i32) (i32.const 0)) + (global $assembly/buddy/bucket_limit (mut i32) (i32.const 0)) + (global $assembly/buddy/SPLIT_COUNT i32 (i32.const 8388608)) + (global $assembly/buddy/NODE_IS_SPLIT_START (mut i32) (i32.const 0)) + (global $assembly/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0)) + (global $assembly/buddy/base_ptr (mut i32) (i32.const 0)) + (global $assembly/buddy/max_ptr (mut i32) (i32.const 0)) + (global $~lib/memory/memory.implemented i32 (i32.const 1)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 92)) (export "memory" (memory $0)) (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) (start $start) - (func $start:~lib/allocator/buddy (; 1 ;) (type $_) + (func $start:assembly/buddy (; 1 ;) (type $FUNCSIG$v) global.get $~lib/memory/HEAP_BASE - global.set $~lib/allocator/buddy/BUCKETS_START - global.get $~lib/allocator/buddy/BUCKETS_START - global.get $~lib/allocator/buddy/BUCKET_COUNT - global.get $~lib/allocator/buddy/List.SIZE + global.set $assembly/buddy/BUCKETS_START + global.get $assembly/buddy/BUCKETS_START + global.get $assembly/buddy/BUCKET_COUNT + global.get $assembly/buddy/List.SIZE i32.mul i32.add - global.set $~lib/allocator/buddy/BUCKETS_END - global.get $~lib/allocator/buddy/BUCKETS_END - global.set $~lib/allocator/buddy/NODE_IS_SPLIT_START - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START - global.get $~lib/allocator/buddy/SPLIT_COUNT + global.set $assembly/buddy/BUCKETS_END + global.get $assembly/buddy/BUCKETS_END + global.set $assembly/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/SPLIT_COUNT i32.const 1 i32.mul i32.add - global.set $~lib/allocator/buddy/NODE_IS_SPLIT_END + global.set $assembly/buddy/NODE_IS_SPLIT_END ) - (func $start:assembly/index (; 2 ;) (type $_) - call $start:~lib/allocator/buddy + (func $start:assembly/index (; 2 ;) (type $FUNCSIG$v) + call $start:assembly/buddy ) - (func $~lib/internal/memory/memcmp (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - block $break|0 - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - block - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (func $~lib/memory/memory.init (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 16 + i32.const 46 + i32.const 4 + call $~lib/env/abort + unreachable ) - (func $~lib/memory/memory.compare (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 16 + i32.const 53 + i32.const 4 + call $~lib/env/abort + unreachable ) - (func $~lib/allocator/buddy/update_max_ptr (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/update_max_ptr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - global.get $~lib/allocator/buddy/max_ptr + global.get $assembly/buddy/max_ptr i32.gt_u if current_memory @@ -140,8 +104,8 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 181 + i32.const 56 + i32.const 176 i32.const 4 call $~lib/env/abort unreachable @@ -159,30 +123,30 @@ local.get $2 i32.const 16 i32.shl - global.set $~lib/allocator/buddy/max_ptr + global.set $assembly/buddy/max_ptr end i32.const 1 ) - (func $~lib/allocator/buddy/buckets$get (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/buckets$get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/allocator/buddy/BUCKET_COUNT + global.get $assembly/buddy/BUCKET_COUNT i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 101 + i32.const 56 + i32.const 96 i32.const 2 call $~lib/env/abort unreachable end - global.get $~lib/allocator/buddy/BUCKETS_START + global.get $assembly/buddy/BUCKETS_START local.get $0 - global.get $~lib/allocator/buddy/List.SIZE + global.get $assembly/buddy/List.SIZE i32.mul i32.add ) - (func $~lib/allocator/buddy/list_init (; 7 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/list_init (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 local.get $0 i32.store @@ -190,7 +154,7 @@ local.get $0 i32.store offset=4 ) - (func $~lib/allocator/buddy/list_push (; 8 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $assembly/buddy/list_push (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 i32.load @@ -208,14 +172,14 @@ local.get $1 i32.store ) - (func $~lib/allocator/buddy/bucket_for_request (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/bucket_for_request (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - global.get $~lib/allocator/buddy/BUCKET_COUNT + global.get $assembly/buddy/BUCKET_COUNT i32.const 1 i32.sub local.set $1 - global.get $~lib/allocator/buddy/MIN_ALLOC + global.get $assembly/buddy/MIN_ALLOC local.set $2 block $break|0 loop $continue|0 @@ -239,11 +203,11 @@ end local.get $1 ) - (func $~lib/allocator/buddy/node_for_ptr (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/buddy/node_for_ptr (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - global.get $~lib/allocator/buddy/base_ptr + global.get $assembly/buddy/base_ptr i32.sub - global.get $~lib/allocator/buddy/MAX_ALLOC_LOG2 + global.get $assembly/buddy/MAX_ALLOC_LOG2 local.get $1 i32.sub i32.shr_u @@ -254,25 +218,25 @@ i32.const 1 i32.sub ) - (func $~lib/allocator/buddy/node_is_split$get (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/node_is_split$get (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - global.get $~lib/allocator/buddy/SPLIT_COUNT + global.get $assembly/buddy/SPLIT_COUNT i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 147 + i32.const 56 + i32.const 142 i32.const 2 call $~lib/env/abort unreachable end - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $0 i32.add i32.load8_u ) - (func $~lib/allocator/buddy/parent_is_split (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/parent_is_split (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1 i32.sub @@ -282,7 +246,7 @@ local.get $0 i32.const 8 i32.div_u - call $~lib/allocator/buddy/node_is_split$get + call $assembly/buddy/node_is_split$get local.get $0 i32.const 8 i32.rem_u @@ -292,7 +256,7 @@ i32.const 1 i32.eq ) - (func $~lib/allocator/buddy/list_remove (; 13 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/list_remove (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -308,8 +272,8 @@ local.get $1 i32.store ) - (func $~lib/allocator/buddy/ptr_for_node (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - global.get $~lib/allocator/buddy/base_ptr + (func $assembly/buddy/ptr_for_node (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $assembly/buddy/base_ptr local.get $0 i32.const 1 local.get $1 @@ -317,32 +281,32 @@ i32.sub i32.const 1 i32.add - global.get $~lib/allocator/buddy/MAX_ALLOC_LOG2 + global.get $assembly/buddy/MAX_ALLOC_LOG2 local.get $1 i32.sub i32.shl i32.add ) - (func $~lib/allocator/buddy/node_is_split$set (; 15 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $assembly/buddy/node_is_split$set (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - global.get $~lib/allocator/buddy/SPLIT_COUNT + global.get $assembly/buddy/SPLIT_COUNT i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 152 + i32.const 56 + i32.const 147 i32.const 2 call $~lib/env/abort unreachable end - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_START + global.get $assembly/buddy/NODE_IS_SPLIT_START local.get $0 i32.add local.get $1 i32.store8 ) - (func $~lib/allocator/buddy/flip_parent_is_split (; 16 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/flip_parent_is_split (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 1 @@ -356,78 +320,81 @@ local.set $1 local.get $1 local.get $1 - call $~lib/allocator/buddy/node_is_split$get + call $assembly/buddy/node_is_split$get i32.const 1 local.get $0 i32.const 8 i32.rem_u i32.shl i32.xor - call $~lib/allocator/buddy/node_is_split$set + call $assembly/buddy/node_is_split$set ) - (func $~lib/allocator/buddy/lower_bucket_limit (; 17 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/lower_bucket_limit (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) block $break|0 loop $continue|0 local.get $0 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.lt_u if block - global.get $~lib/allocator/buddy/base_ptr - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/node_for_ptr + global.get $assembly/buddy/base_ptr + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/node_for_ptr local.set $1 local.get $1 - call $~lib/allocator/buddy/parent_is_split + call $assembly/buddy/parent_is_split i32.eqz if - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_remove + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_remove block (result i32) - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/bucket_limit + local.tee $3 + global.set $assembly/buddy/bucket_limit + local.get $3 end - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/buckets$get - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_push + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/buckets$get + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_push br $continue|0 end local.get $1 i32.const 1 i32.add - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/ptr_for_node + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/ptr_for_node local.set $2 local.get $2 - global.get $~lib/allocator/buddy/List.SIZE + global.get $assembly/buddy/List.SIZE i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if i32.const 0 return end - global.get $~lib/allocator/buddy/bucket_limit - call $~lib/allocator/buddy/buckets$get + global.get $assembly/buddy/bucket_limit + call $assembly/buddy/buckets$get local.get $2 - call $~lib/allocator/buddy/list_push + call $assembly/buddy/list_push block (result i32) - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/bucket_limit + local.tee $3 + global.set $assembly/buddy/bucket_limit + local.get $3 end - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init local.get $1 i32.const 1 i32.sub @@ -439,7 +406,7 @@ i32.ne if local.get $1 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split end end br $continue|0 @@ -448,7 +415,7 @@ end i32.const 1 ) - (func $~lib/allocator/buddy/list_pop (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/list_pop (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load @@ -461,10 +428,10 @@ return end local.get $1 - call $~lib/allocator/buddy/list_remove + call $assembly/buddy/list_remove local.get $1 ) - (func $~lib/allocator/buddy/__memory_allocate (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/buddy/__mem_allocate (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -473,58 +440,58 @@ (local $6 i32) (local $7 i32) local.get $0 - global.get $~lib/allocator/buddy/MAX_ALLOC - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/MAX_ALLOC + global.get $assembly/buddy/HEADER_SIZE i32.sub i32.gt_u if unreachable end - global.get $~lib/allocator/buddy/base_ptr + global.get $assembly/buddy/base_ptr i32.const 0 i32.eq if - global.get $~lib/allocator/buddy/NODE_IS_SPLIT_END + global.get $assembly/buddy/NODE_IS_SPLIT_END i32.const 7 i32.add i32.const 7 i32.const -1 i32.xor i32.and - global.set $~lib/allocator/buddy/base_ptr + global.set $assembly/buddy/base_ptr current_memory i32.const 16 i32.shl - global.set $~lib/allocator/buddy/max_ptr - global.get $~lib/allocator/buddy/BUCKET_COUNT + global.set $assembly/buddy/max_ptr + global.get $assembly/buddy/BUCKET_COUNT i32.const 1 i32.sub - global.set $~lib/allocator/buddy/bucket_limit - global.get $~lib/allocator/buddy/base_ptr - global.get $~lib/allocator/buddy/List.SIZE + global.set $assembly/buddy/bucket_limit + global.get $assembly/buddy/base_ptr + global.get $assembly/buddy/List.SIZE i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if i32.const 0 return end - global.get $~lib/allocator/buddy/BUCKET_COUNT + global.get $assembly/buddy/BUCKET_COUNT i32.const 1 i32.sub - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_init - global.get $~lib/allocator/buddy/BUCKET_COUNT + call $assembly/buddy/buckets$get + call $assembly/buddy/list_init + global.get $assembly/buddy/BUCKET_COUNT i32.const 1 i32.sub - call $~lib/allocator/buddy/buckets$get - global.get $~lib/allocator/buddy/base_ptr - call $~lib/allocator/buddy/list_push + call $assembly/buddy/buckets$get + global.get $assembly/buddy/base_ptr + call $assembly/buddy/list_push end local.get $0 - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/HEADER_SIZE i32.add - call $~lib/allocator/buddy/bucket_for_request + call $assembly/buddy/bucket_for_request local.set $2 local.get $2 local.set $1 @@ -537,21 +504,21 @@ i32.ne if local.get $2 - call $~lib/allocator/buddy/lower_bucket_limit + call $assembly/buddy/lower_bucket_limit i32.eqz if i32.const 0 return end local.get $2 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_pop + call $assembly/buddy/buckets$get + call $assembly/buddy/list_pop local.set $6 local.get $6 i32.eqz if local.get $2 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.ne local.tee $7 if (result i32) @@ -571,19 +538,19 @@ local.get $2 i32.const 1 i32.sub - call $~lib/allocator/buddy/lower_bucket_limit + call $assembly/buddy/lower_bucket_limit i32.eqz if i32.const 0 return end local.get $2 - call $~lib/allocator/buddy/buckets$get - call $~lib/allocator/buddy/list_pop + call $assembly/buddy/buckets$get + call $assembly/buddy/list_pop local.set $6 end i32.const 1 - global.get $~lib/allocator/buddy/MAX_ALLOC_LOG2 + global.get $assembly/buddy/MAX_ALLOC_LOG2 local.get $2 i32.sub i32.shl @@ -595,7 +562,7 @@ local.get $3 i32.const 2 i32.div_u - global.get $~lib/allocator/buddy/List.SIZE + global.get $assembly/buddy/List.SIZE i32.add else local.get $3 @@ -604,26 +571,26 @@ local.get $6 local.get $4 i32.add - call $~lib/allocator/buddy/update_max_ptr + call $assembly/buddy/update_max_ptr i32.eqz if local.get $2 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $6 - call $~lib/allocator/buddy/list_push + call $assembly/buddy/list_push i32.const 0 return end local.get $6 local.get $2 - call $~lib/allocator/buddy/node_for_ptr + call $assembly/buddy/node_for_ptr local.set $5 local.get $5 i32.const 0 i32.ne if local.get $5 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split end block $break|1 loop $continue|1 @@ -643,15 +610,15 @@ i32.add local.set $2 local.get $5 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split local.get $2 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $5 i32.const 1 i32.add local.get $2 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_push + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_push end br $continue|1 end @@ -661,7 +628,7 @@ local.get $0 i32.store local.get $6 - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/HEADER_SIZE i32.add return end @@ -669,12 +636,12 @@ end i32.const 0 ) - (func $~lib/memory/memory.allocate (; 20 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/buddy/__memory_allocate + call $assembly/buddy/__mem_allocate return ) - (func $~lib/allocator/buddy/__memory_free (; 21 ;) (type $i_) (param $0 i32) + (func $assembly/buddy/__mem_free (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -684,18 +651,18 @@ return end local.get $0 - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/HEADER_SIZE i32.sub local.set $0 local.get $0 i32.load - global.get $~lib/allocator/buddy/HEADER_SIZE + global.get $assembly/buddy/HEADER_SIZE i32.add - call $~lib/allocator/buddy/bucket_for_request + call $assembly/buddy/bucket_for_request local.set $1 local.get $0 local.get $1 - call $~lib/allocator/buddy/node_for_ptr + call $assembly/buddy/node_for_ptr local.set $2 block $break|0 loop $continue|0 @@ -705,15 +672,15 @@ if block local.get $2 - call $~lib/allocator/buddy/flip_parent_is_split + call $assembly/buddy/flip_parent_is_split local.get $2 - call $~lib/allocator/buddy/parent_is_split + call $assembly/buddy/parent_is_split local.tee $3 if (result i32) local.get $3 else local.get $1 - global.get $~lib/allocator/buddy/bucket_limit + global.get $assembly/buddy/bucket_limit i32.eq end if @@ -727,8 +694,8 @@ i32.const 1 i32.add local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_remove + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_remove local.get $2 i32.const 1 i32.sub @@ -745,23 +712,1556 @@ end end local.get $1 - call $~lib/allocator/buddy/buckets$get + call $assembly/buddy/buckets$get local.get $2 local.get $1 - call $~lib/allocator/buddy/ptr_for_node - call $~lib/allocator/buddy/list_push + call $assembly/buddy/ptr_for_node + call $assembly/buddy/list_push ) - (func $~lib/memory/memory.free (; 22 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/allocator/buddy/__memory_free - return + call $assembly/buddy/__mem_free ) - (func $~lib/memory/memory.reset (; 23 ;) (type $_) + (func $~lib/memory/memory.reset (; 23 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 16 + i32.const 77 + i32.const 9 + call $~lib/env/abort unreachable ) - (func $start (; 24 ;) (type $_) + (func $~lib/util/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/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $1 + local.get $2 + i32.add + local.get $0 + i32.le_u + local.tee $5 + if (result i32) + local.get $5 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + i32.le_u + end + if + local.get $0 + local.get $1 + local.get $2 + call $~lib/util/memory/memcpy + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/memory/memory.repeat (; 26 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $4 + local.get $2 + local.get $3 + i32.mul + local.set $5 + block $break|0 + loop $continue|0 + local.get $4 + local.get $5 + i32.lt_u + if + block + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $4 + local.get $2 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + ) + (func $~lib/memory/memory.compare (; 27 ;) (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) + block $~lib/util/memory/memcmp|inlined.0 (result i32) + local.get $0 + local.set $5 + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $5 + local.get $4 + i32.eq + if + i32.const 0 + br $~lib/util/memory/memcmp|inlined.0 + end + block $break|0 + loop $continue|0 + local.get $3 + i32.const 0 + i32.ne + local.tee $6 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.eq + else + local.get $6 + end + if + block + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $5 + i32.const 1 + i32.add + local.set $5 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + local.get $3 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $start (; 28 ;) (type $FUNCSIG$v) call $start:assembly/index ) - (func $null (; 25 ;) (type $_) + (func $null (; 29 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/allocators/index.js b/tests/allocators/index.js index f87bd13ed6..754ec8ff34 100644 --- a/tests/allocators/index.js +++ b/tests/allocators/index.js @@ -14,10 +14,15 @@ function test(file) { } }).exports; + const RUNTIME_HEADER_SIZE = exports[".capabilities"] & 2 ? 16 : 8; + function getString(ptr) { - var len = new Uint32Array(exports.memory.buffer, ptr)[0]; - var str = new Uint16Array(exports.memory.buffer, ptr + 4).subarray(0, len); - return String.fromCharCode.apply(String, str); + if (!ptr) return "null"; + var U32 = new Uint32Array(exports.memory.buffer); + var U16 = new Uint16Array(exports.memory.buffer); + var len16 = U32[(ptr - RUNTIME_HEADER_SIZE + 4) >>> 2] >>> 1; + var ptr16 = ptr >>> 1; + return String.fromCharCode.apply(String, U16.subarray(ptr16, ptr16 + len16)); } require("./runner")(exports, 20, 20000); diff --git a/tests/allocators/rt/assembly/index.ts b/tests/allocators/rt/assembly/index.ts new file mode 100644 index 0000000000..07ddc5a54e --- /dev/null +++ b/tests/allocators/rt/assembly/index.ts @@ -0,0 +1,14 @@ +import "rt"; +import { memory as builtin_memory } from "memory"; + +export namespace memory { + export function allocate(size: usize): usize { + return __rt_allocate(size, 0); + } + export function free(ptr: usize): void { + __rt_free(ptr); + } + export function fill(dst: usize, c: u8, n: usize): void { + builtin_memory.fill(dst, c, n); + } +} diff --git a/tests/allocators/rt/assembly/tsconfig.json b/tests/allocators/rt/assembly/tsconfig.json new file mode 100644 index 0000000000..9263ff67b2 --- /dev/null +++ b/tests/allocators/rt/assembly/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../../../std/assembly.json", + "include": [ + "./**/*.ts" + ] +} diff --git a/tests/allocators/rt/optimized.wat b/tests/allocators/rt/optimized.wat new file mode 100644 index 0000000000..be09955c1a --- /dev/null +++ b/tests/allocators/rt/optimized.wat @@ -0,0 +1,1037 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "memory.allocate" (func $assembly/index/memory.allocate)) + (export "memory.free" (func $assembly/index/memory.free)) + (export "memory.fill" (func $assembly/index/memory.fill)) + (func $~lib/rt/tlsf/removeBlock (; 1 ;) (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 + i32.const -4 + i32.and + local.tee $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 4 + i32.shr_u + local.set $4 + i32.const 0 + else + local.get $2 + i32.const 31 + local.get $2 + i32.clz + i32.sub + local.tee $3 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $4 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $1 + i32.load offset=20 + local.set $2 + local.get $1 + i32.load offset=16 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=20 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=16 + end + local.get $1 + local.get $0 + local.get $3 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + i32.eq + if + local.get $0 + local.get $3 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=96 + local.get $2 + i32.eqz + if + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + i32.store offset=4 + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $3 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (; 2 ;) (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.get $1 + i32.load + local.set $2 + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.tee $5 + i32.const 1 + i32.and + if + local.get $2 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $5 + i32.const -4 + i32.and + i32.add + local.tee $3 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $2 + i32.const 3 + i32.and + local.get $3 + i32.or + local.tee $2 + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.set $5 + end + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + i32.const 4 + i32.sub + i32.load + local.tee $3 + i32.load + local.tee $6 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $2 + i32.const -4 + i32.and + i32.add + local.tee $7 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $3 + local.get $6 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $2 + i32.store + local.get $3 + local.set $1 + end + end + local.get $4 + local.get $5 + i32.const 2 + i32.or + i32.store + local.get $4 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const -4 + i32.and + local.tee $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 4 + i32.shr_u + local.set $2 + i32.const 0 + else + local.get $2 + i32.const 31 + local.get $2 + i32.clz + i32.sub + local.tee $3 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $2 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $0 + local.get $3 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $4 + i32.store offset=20 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=16 + end + local.get $0 + local.get $3 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store offset=96 + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $3 + i32.shl + i32.or + i32.store + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store offset=4 + ) + (func $~lib/rt/tlsf/addMemory (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $2 + block (result i32) + local.get $0 + i32.load offset=1568 + local.tee $2 + if + local.get $1 + i32.const 16 + i32.sub + local.get $2 + i32.eq + if + local.get $2 + i32.load + local.set $3 + local.get $1 + i32.const 16 + i32.sub + local.set $1 + end + end + local.get $1 + end + i32.sub + local.tee $2 + i32.const 48 + i32.lt_u + if + return + end + local.get $1 + local.get $3 + i32.const 2 + i32.and + local.get $2 + i32.const 32 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.tee $2 + i32.const 2 + i32.store + local.get $0 + local.get $2 + i32.store offset=1568 + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/tlsf/initializeRoot (; 4 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 64 + local.tee $3 + i32.const 67107 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + current_memory + local.tee $0 + i32.gt_s + if (result i32) + local.get $1 + local.get $0 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $3 + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=1568 + loop $repeat|0 + block $break|0 + local.get $2 + i32.const 23 + i32.ge_u + br_if $break|0 + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $repeat|1 + block $break|1 + local.get $1 + i32.const 16 + i32.ge_u + br_if $break|1 + local.get $0 + local.get $2 + i32.const 4 + i32.shl + local.get $1 + i32.add + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + local.get $0 + local.get $3 + i32.const 1587 + i32.add + i32.const -16 + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + local.get $0 + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 450 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $0 + i32.const 16 + local.tee $1 + local.get $0 + local.get $1 + i32.gt_u + select + ) + (func $~lib/rt/tlsf/searchBlock (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + local.get $1 + i32.const 4 + i32.shr_u + local.set $1 + i32.const 0 + else + i32.const 31 + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 + local.get $1 + i32.const 536870912 + i32.lt_u + select + local.tee $1 + i32.clz + i32.sub + local.set $2 + local.get $1 + local.get $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + 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 $0 + local.get $1 + i32.ctz + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.ctz + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + else + i32.const 0 + end + end + ) + (func $~lib/rt/tlsf/growMemory (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + current_memory + local.tee $2 + local.tee $3 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $1 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.tee $1 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end + ) + (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.get $1 + call $~lib/rt/tlsf/prepareSize + local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $2 + i32.eqz + if + local.get $0 + local.get $3 + call $~lib/rt/tlsf/growMemory + local.get $0 + local.get $3 + call $~lib/rt/tlsf/searchBlock + local.set $2 + end + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=12 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $2 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $2 + ) + (func $~lib/rt/index/__rt_allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + local.tee $1 + if (result i32) + local.get $1 + else + call $~lib/rt/tlsf/initializeRoot + global.get $~lib/rt/tlsf/ROOT + end + local.get $0 + call $~lib/rt/tlsf/allocateBlock + local.tee $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 16 + i32.add + ) + (func $assembly/index/memory.allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/rt/index/__rt_allocate + ) + (func $assembly/index/memory.free (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + local.get $0 + i32.load + i32.const 1 + i32.or + i32.store + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/memory/memory.fill (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i64) + (local $4 i32) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $4 + local.get $0 + i32.add + local.tee $0 + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store + local.get $2 + local.get $4 + i32.sub + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 12 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 28 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $1 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $4 + local.get $0 + i32.add + local.set $0 + local.get $2 + local.get $4 + i32.sub + local.set $2 + local.get $1 + i64.extend_i32_u + local.get $1 + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + local.set $3 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + local.get $0 + local.get $3 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $3 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $3 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $3 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end + end + end + ) + (func $assembly/index/memory.fill (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/memory/memory.fill + ) + (func $null (; 15 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/allocators/rt/package.json b/tests/allocators/rt/package.json new file mode 100644 index 0000000000..dc760bf282 --- /dev/null +++ b/tests/allocators/rt/package.json @@ -0,0 +1,8 @@ +{ + "private": true, + "scripts": { + "build": "npm run build:untouched && npm run build:optimized", + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" + } +} diff --git a/tests/allocators/rt/untouched.wat b/tests/allocators/rt/untouched.wat new file mode 100644 index 0000000000..8e5acb2d9e --- /dev/null +++ b/tests/allocators/rt/untouched.wat @@ -0,0 +1,1711 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/rt/pure/ACYCLIC_FLAG i32 (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 104)) + (export "memory" (memory $0)) + (export "memory.allocate" (func $assembly/index/memory.allocate)) + (export "memory.free" (func $assembly/index/memory.free)) + (export "memory.fill" (func $assembly/index/memory.fill)) + (func $~lib/rt/tlsf/removeBlock (; 1 ;) (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 $11 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 281 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $4 + local.get $3 + i32.const 4 + i32.shr_u + local.set $5 + else + i32.const 31 + local.get $3 + i32.clz + i32.sub + local.set $4 + local.get $3 + local.get $4 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $5 + local.get $4 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $4 + end + local.get $4 + i32.const 23 + i32.lt_u + if (result i32) + local.get $5 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 294 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=16 + local.set $6 + local.get $1 + i32.load offset=20 + local.set $7 + local.get $6 + if + local.get $6 + local.get $7 + i32.store offset=20 + end + local.get $7 + if + local.get $7 + local.get $6 + i32.store offset=16 + end + local.get $1 + block $~lib/rt/tlsf/GETHEAD|inlined.1 (result i32) + local.get $0 + local.set $10 + local.get $4 + local.set $9 + local.get $5 + local.set $8 + local.get $10 + local.get $9 + i32.const 4 + i32.shl + local.get $8 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + end + i32.eq + if + block $~lib/rt/tlsf/SETHEAD|inlined.1 + local.get $0 + local.set $11 + local.get $4 + local.set $10 + local.get $5 + local.set $9 + local.get $7 + local.set $8 + local.get $11 + local.get $10 + i32.const 4 + i32.shl + local.get $9 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store offset=96 + end + local.get $7 + i32.eqz + if + block $~lib/rt/tlsf/GETSL|inlined.0 (result i32) + local.get $0 + local.set $9 + local.get $4 + local.set $8 + local.get $9 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + local.set $8 + block $~lib/rt/tlsf/SETSL|inlined.1 + local.get $0 + local.set $11 + local.get $4 + local.set $10 + local.get $8 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $8 + local.set $9 + local.get $11 + local.get $10 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store offset=4 + end + local.get $8 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (; 2 ;) (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 $11 i32) + (local $12 i32) + (local $13 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 207 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 209 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETRIGHT|inlined.0 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 16 + i32.add + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + local.set $4 + local.get $4 + i32.load + local.set $5 + local.get $5 + i32.const 1 + i32.and + if + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.add + local.get $5 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $3 + local.get $3 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $2 + i32.const 3 + i32.and + local.get $3 + i32.or + local.tee $2 + i32.store + block $~lib/rt/tlsf/GETRIGHT|inlined.1 (result i32) + local.get $1 + local.set $6 + local.get $6 + i32.const 16 + i32.add + local.get $6 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + local.set $4 + local.get $4 + i32.load + local.set $5 + end + end + local.get $2 + i32.const 2 + i32.and + if + block $~lib/rt/tlsf/GETFREELEFT|inlined.0 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 4 + i32.sub + i32.load + end + local.set $3 + local.get $3 + i32.load + local.set $6 + local.get $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 230 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.add + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $7 + local.get $7 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $3 + local.get $6 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $2 + i32.store + local.get $3 + local.set $1 + end + end + local.get $4 + local.get $5 + i32.const 2 + i32.or + i32.store + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $8 + local.get $8 + i32.const 16 + i32.ge_u + if (result i32) + local.get $8 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 245 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.add + local.get $8 + i32.add + local.get $4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 246 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $8 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $9 + local.get $8 + i32.const 4 + i32.shr_u + local.set $10 + else + i32.const 31 + local.get $8 + i32.clz + i32.sub + local.set $9 + local.get $8 + local.get $9 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $10 + local.get $9 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $9 + end + local.get $9 + i32.const 23 + i32.lt_u + if (result i32) + local.get $10 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 262 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETHEAD|inlined.2 (result i32) + local.get $0 + local.set $3 + local.get $9 + local.set $6 + local.get $10 + local.set $7 + local.get $3 + local.get $6 + i32.const 4 + i32.shl + local.get $7 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + end + local.set $11 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $11 + i32.store offset=20 + local.get $11 + if + local.get $11 + local.get $1 + i32.store offset=16 + end + block $~lib/rt/tlsf/SETHEAD|inlined.2 + local.get $0 + local.set $12 + local.get $9 + local.set $3 + local.get $10 + local.set $6 + local.get $1 + local.set $7 + local.get $12 + local.get $3 + i32.const 4 + i32.shl + local.get $6 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $7 + i32.store offset=96 + end + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $9 + i32.shl + i32.or + i32.store + block $~lib/rt/tlsf/SETSL|inlined.2 + block $~lib/rt/tlsf/GETSL|inlined.1 (result i32) + local.get $0 + local.set $13 + local.get $9 + local.set $12 + local.get $13 + local.get $12 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + i32.const 1 + local.get $10 + i32.shl + i32.or + local.set $3 + local.get $0 + local.get $9 + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=4 + end + ) + (func $~lib/rt/tlsf/addMemory (; 3 ;) (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 $9 i32) + local.get $1 + local.get $2 + i32.le_u + if (result i32) + local.get $1 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 388 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETTAIL|inlined.0 (result i32) + local.get $0 + local.set $3 + local.get $3 + i32.load offset=1568 + end + local.set $4 + i32.const 0 + local.set $5 + local.get $4 + if + local.get $1 + local.get $4 + i32.const 16 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 398 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.sub + local.get $4 + i32.eq + if + local.get $1 + i32.const 16 + i32.sub + local.set $1 + local.get $4 + i32.load + local.set $5 + else + nop + end + else + local.get $1 + local.get $0 + i32.const 1572 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 410 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $6 + local.get $6 + i32.const 16 + i32.const 16 + i32.add + i32.const 16 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $6 + i32.const 2 + i32.const 16 + i32.mul + i32.sub + local.set $7 + local.get $1 + local.set $8 + local.get $8 + local.get $7 + i32.const 1 + i32.or + local.get $5 + i32.const 2 + i32.and + i32.or + i32.store + local.get $8 + i32.const 0 + i32.store offset=16 + local.get $8 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $6 + i32.add + i32.const 16 + i32.sub + local.set $4 + local.get $4 + i32.const 0 + i32.const 2 + i32.or + i32.store + block $~lib/rt/tlsf/SETTAIL|inlined.1 + local.get $0 + local.set $9 + local.get $4 + local.set $3 + local.get $9 + local.get $3 + i32.store offset=1568 + end + local.get $0 + local.get $8 + call $~lib/rt/tlsf/insertBlock + i32.const 1 + ) + (func $~lib/rt/tlsf/initializeRoot (; 4 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.set $0 + current_memory + local.set $1 + local.get $0 + i32.const 1572 + i32.add + 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 $2 + local.get $1 + i32.gt_s + if (result i32) + local.get $2 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $0 + local.set $3 + local.get $3 + i32.const 0 + i32.store + block $~lib/rt/tlsf/SETTAIL|inlined.0 + local.get $3 + local.set $5 + i32.const 0 + local.set $4 + local.get $5 + local.get $4 + i32.store offset=1568 + end + block $break|0 + i32.const 0 + local.set $4 + loop $repeat|0 + local.get $4 + i32.const 23 + i32.lt_u + i32.eqz + br_if $break|0 + block + block $~lib/rt/tlsf/SETSL|inlined.0 + local.get $3 + local.set $7 + local.get $4 + local.set $6 + i32.const 0 + local.set $5 + local.get $7 + local.get $6 + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store offset=4 + end + block $break|1 + i32.const 0 + local.set $5 + loop $repeat|1 + local.get $5 + i32.const 16 + i32.lt_u + i32.eqz + br_if $break|1 + block $~lib/rt/tlsf/SETHEAD|inlined.0 + local.get $3 + local.set $9 + local.get $4 + local.set $8 + local.get $5 + local.set $7 + i32.const 0 + local.set $6 + local.get $9 + local.get $8 + i32.const 4 + i32.shl + local.get $7 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store offset=96 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 + unreachable + end + unreachable + end + local.get $3 + local.get $0 + i32.const 1572 + i32.add + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + drop + local.get $3 + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/prepareSize (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 450 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.tee $1 + i32.const 16 + local.tee $2 + local.get $1 + local.get $2 + i32.gt_u + select + ) + (func $~lib/rt/tlsf/searchBlock (; 6 ;) (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 $8 i32) + (local $9 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 4 + i32.shr_u + local.set $3 + else + local.get $1 + i32.const 536870912 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $1 + end + local.set $4 + i32.const 31 + local.get $4 + i32.clz + i32.sub + local.set $2 + local.get $4 + local.get $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + end + local.get $2 + i32.const 23 + i32.lt_u + if (result i32) + local.get $3 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 340 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETSL|inlined.2 (result i32) + local.get $0 + local.set $5 + local.get $2 + local.set $4 + local.get $5 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.shl + i32.and + local.set $6 + local.get $6 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $4 + local.get $4 + i32.eqz + if + i32.const 0 + local.set $7 + else + local.get $4 + i32.ctz + local.set $2 + block $~lib/rt/tlsf/GETSL|inlined.3 (result i32) + local.get $0 + local.set $8 + local.get $2 + local.set $5 + local.get $8 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + local.set $6 + local.get $6 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 353 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETHEAD|inlined.3 (result i32) + local.get $0 + local.set $9 + local.get $2 + local.set $8 + local.get $6 + i32.ctz + local.set $5 + local.get $9 + local.get $8 + i32.const 4 + i32.shl + local.get $5 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + end + local.set $7 + end + else + block $~lib/rt/tlsf/GETHEAD|inlined.4 (result i32) + local.get $0 + local.set $8 + local.get $2 + local.set $5 + local.get $6 + i32.ctz + local.set $4 + local.get $8 + local.get $5 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + end + local.set $7 + end + local.get $7 + ) + (func $~lib/rt/tlsf/growMemory (; 7 ;) (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) + current_memory + local.set $2 + local.get $1 + 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 $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $7 + local.get $0 + local.get $2 + i32.const 16 + i32.shl + local.get $7 + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + drop + ) + (func $~lib/rt/tlsf/prepareBlock (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 15 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 367 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $4 + local.get $4 + i32.const 16 + i32.const 16 + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.set $5 + local.get $5 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $5 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const 1 + i32.const -1 + i32.xor + i32.and + i32.store + block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + i32.store + end + ) + (func $~lib/rt/tlsf/allocateBlock (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + call $~lib/rt/tlsf/prepareSize + local.set $2 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + call $~lib/rt/tlsf/growMemory + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 480 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 482 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 0 + i32.store offset=4 + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + local.get $1 + i32.store offset=12 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $3 + local.get $2 + call $~lib/rt/tlsf/prepareBlock + local.get $3 + ) + (func $~lib/rt/index/__rt_allocate (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/rt/tlsf/ROOT + local.set $2 + local.get $2 + i32.eqz + if + call $~lib/rt/tlsf/initializeRoot + global.get $~lib/rt/tlsf/ROOT + local.set $2 + end + local.get $2 + local.get $0 + call $~lib/rt/tlsf/allocateBlock + local.set $3 + local.get $3 + local.get $1 + i32.store offset=8 + local.get $3 + i32.const 16 + i32.add + ) + (func $assembly/index/memory.allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/rt/index/__rt_allocate + ) + (func $~lib/rt/tlsf/freeBlock (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 533 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/index/__rt_free (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 31 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.ne + if (result i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 32 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/tlsf/freeBlock + ) + (func $assembly/index/memory.free (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/rt/index/__rt_free + ) + (func $~lib/memory/memory.fill (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 + end + ) + (func $assembly/index/memory.fill (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/memory/memory.fill + ) + (func $null (; 17 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/allocators/runner.js b/tests/allocators/runner.js index 1a7bdaa5fb..b8d3963723 100644 --- a/tests/allocators/runner.js +++ b/tests/allocators/runner.js @@ -1,5 +1,3 @@ -const useFill = false; - function runner(exports, runs, allocs) { const alloc = exports["memory.allocate"]; const free = exports["memory.free"]; @@ -16,7 +14,7 @@ function runner(exports, runs, allocs) { if (!ptr) throw Error(); if ((ptr & 7) != 0) throw Error("invalid alignment: " + (ptr & 7) + " on " + ptr); if (ptrs.indexOf(ptr) >= 0) throw Error("duplicate pointer"); - if (useFill) fill(ptr, 0xdc, size); + if (fill) fill(ptr, ptr % 8, size); ptrs.push(ptr); return ptr; } @@ -86,14 +84,14 @@ function runner(exports, runs, allocs) { // SL+1 for allocations in TLSF var size = ((exports.memory.buffer.byteLength - base) * 9 / 10) >>> 0; var ptr = alloc(size); - if (useFill) fill(ptr, 0xac, size); + // if (fill) fill(ptr, 0xac, size); if (ptr !== base) throw Error("expected " + base + " but got " + ptr); free(ptr); } testMemChanged(); } } finally { - // mem(allocator.memory, 0, 0x10000); + // mem(exports.memory, 0, 0x800); } } diff --git a/tests/allocators/tlsf/optimized.wat b/tests/allocators/tlsf/optimized.wat index a0da81d08a..e7b764c331 100644 --- a/tests/allocators/tlsf/optimized.wat +++ b/tests/allocators/tlsf/optimized.wat @@ -1,85 +1,50 @@ (module - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $ii_ (func (param i32 i32))) - (type $iii_ (func (param i32 i32 i32))) - (type $iiii_ (func (param i32 i32 i32 i32))) - (type $iii (func (param i32 i32) (result i32))) - (type $i_ (func (param i32))) - (type $_ (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (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$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") + (global $~lib/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) - (func $~lib/internal/memory/memcmp (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 24 + i32.const 46 + i32.const 4 + call $~lib/builtins/abort + unreachable ) - (func $~lib/memory/memory.compare (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 24 + i32.const 53 + i32.const 4 + call $~lib/builtins/abort + unreachable ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - i32.const 2912 + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 - i32.store + local.get $1 + i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 3 ;) (type $iii_) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 local.get $1 i32.const 2 @@ -88,7 +53,7 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 4 ;) (type $iiii_) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $0 local.get $1 i32.const 5 @@ -101,7 +66,7 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Block#get:right (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.add @@ -111,13 +76,13 @@ i32.and i32.add ) - (func $~lib/allocator/tlsf/fls (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 31 local.get $0 i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $1 i32.const 5 @@ -129,7 +94,7 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.const 2 @@ -137,7 +102,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 9 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -233,7 +198,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#insert (; 10 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -243,18 +208,18 @@ local.set $2 local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 + local.tee $3 i32.load - local.tee $5 + local.tee $4 i32.const 1 i32.and if local.get $0 - local.get $4 + local.get $3 call $~lib/allocator/tlsf/Root#remove local.get $1 local.get $2 - local.get $5 + local.get $4 i32.const -4 i32.and i32.const 8 @@ -264,9 +229,9 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $4 + local.tee $3 i32.load - local.set $5 + local.set $4 end local.get $2 i32.const 2 @@ -278,29 +243,27 @@ i32.load local.tee $1 i32.load - local.set $3 + local.set $5 local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#remove local.get $1 - local.get $3 + local.get $5 local.get $2 i32.const -4 i32.and i32.const 8 i32.add i32.add - local.tee $3 + local.tee $2 i32.store - local.get $3 - local.set $2 end + local.get $3 local.get $4 - local.get $5 i32.const 2 i32.or i32.store - local.get $4 + local.get $3 i32.const 4 i32.sub local.get $1 @@ -309,32 +272,32 @@ local.get $2 i32.const -4 i32.and - local.tee $3 + local.tee $2 i32.const 256 i32.lt_u if (result i32) - local.get $3 + local.get $2 i32.const 8 i32.div_u - local.set $3 + local.set $2 i32.const 0 else - local.get $3 - local.get $3 + local.get $2 + local.get $2 call $~lib/allocator/tlsf/fls - local.tee $2 + local.tee $3 i32.const 5 i32.sub i32.shr_u i32.const 32 i32.xor - local.set $3 - local.get $2 + local.set $2 + local.get $3 i32.const 7 i32.sub end - local.tee $2 - local.get $3 + local.tee $3 + local.get $2 call $~lib/allocator/tlsf/Root#getHead local.set $4 local.get $1 @@ -350,35 +313,35 @@ i32.store offset=4 end local.get $0 - local.get $2 local.get $3 + local.get $2 local.get $1 call $~lib/allocator/tlsf/Root#setHead local.get $0 local.get $0 i32.load i32.const 1 - local.get $2 + local.get $3 i32.shl i32.or i32.store local.get $0 - local.get $2 + local.get $3 local.get $0 - local.get $2 + local.get $3 call $~lib/allocator/tlsf/Root#getSLMap i32.const 1 - local.get $3 + local.get $2 i32.shl i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $2 block (result i32) - i32.const 2912 - i32.load + local.get $0 + i32.load offset=2912 local.tee $2 if local.get $1 @@ -403,7 +366,6 @@ i32.const 32 i32.lt_u if - i32.const 0 return end local.get $1 @@ -431,14 +393,14 @@ local.tee $2 i32.const 2 i32.store + local.get $0 local.get $2 call $~lib/allocator/tlsf/Root#set:tailRef local.get $0 local.get $1 call $~lib/allocator/tlsf/Root#insert - i32.const 1 ) - (func $~lib/allocator/tlsf/Root#search (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 i32.const 256 @@ -506,12 +468,10 @@ local.get $0 local.get $1 i32.ctz - local.tee $2 - call $~lib/allocator/tlsf/Root#getSLMap - local.set $1 + local.tee $1 local.get $0 - local.get $2 local.get $1 + call $~lib/allocator/tlsf/Root#getSLMap i32.ctz call $~lib/allocator/tlsf/Root#getHead else @@ -519,7 +479,7 @@ end end ) - (func $~lib/allocator/tlsf/Root#use (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -567,8 +527,8 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.load i32.const -3 i32.and @@ -578,7 +538,7 @@ i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__memory_allocate (; 14 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -588,7 +548,7 @@ local.tee $1 i32.eqz if - i32.const 8 + i32.const 56 local.tee $4 i32.const 68451 i32.add @@ -596,20 +556,19 @@ i32.and i32.const 16 i32.shr_u - local.tee $5 - current_memory local.tee $2 + current_memory + local.tee $1 i32.gt_s - local.tee $3 if (result i32) - local.get $5 local.get $2 + local.get $1 i32.sub grow_memory i32.const 0 i32.lt_s else - local.get $3 + i32.const 0 end if unreachable @@ -617,13 +576,12 @@ local.get $4 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 - i32.const 0 - local.set $3 loop $repeat|0 block $break|0 local.get $3 @@ -671,7 +629,6 @@ i32.const 16 i32.shl call $~lib/allocator/tlsf/Root#addMemory - drop end local.get $0 i32.const 1073741824 @@ -686,40 +643,40 @@ i32.add i32.const -8 i32.and - local.tee $5 + local.tee $4 i32.const 16 - local.tee $2 - local.get $5 - local.get $2 + local.tee $0 + local.get $4 + local.get $0 i32.gt_u select - local.tee $0 + local.tee $5 call $~lib/allocator/tlsf/Root#search - local.tee $4 + local.tee $0 if (result i32) - local.get $4 + local.get $0 else current_memory - local.tee $5 - local.tee $4 - local.get $0 + local.tee $3 + local.tee $2 + local.get $5 i32.const 65535 i32.add i32.const -65536 i32.and i32.const 16 i32.shr_u - local.tee $2 - local.tee $3 - local.get $4 - local.get $3 + local.tee $4 + local.tee $0 + local.get $2 + local.get $0 i32.gt_s select grow_memory i32.const 0 i32.lt_s if - local.get $2 + local.get $4 grow_memory i32.const 0 i32.lt_s @@ -728,26 +685,25 @@ end end local.get $1 - local.get $5 + local.get $3 i32.const 16 i32.shl current_memory i32.const 16 i32.shl call $~lib/allocator/tlsf/Root#addMemory - drop local.get $1 - local.get $0 + local.get $5 call $~lib/allocator/tlsf/Root#search end - local.get $0 + local.get $5 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 15 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/tlsf/__memory_allocate + call $~lib/allocator/tlsf/__mem_allocate ) - (func $~lib/allocator/tlsf/__memory_free (; 16 ;) (type $i_) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) local.get $0 @@ -772,14 +728,264 @@ end end ) - (func $~lib/memory/memory.free (; 17 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/allocator/tlsf/__memory_free + call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/memory/memory.reset (; 18 ;) (type $_) + (func $~lib/memory/memory.reset (; 19 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 24 + i32.const 77 + i32.const 9 + call $~lib/builtins/abort unreachable ) - (func $null (; 19 ;) (type $_) + (func $~lib/memory/memory.copy (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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|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 $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/memory/memory.repeat (; 21 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + local.get $2 + local.get $3 + i32.mul + local.set $3 + loop $continue|0 + local.get $4 + local.get $3 + i32.lt_u + if + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.add + local.set $4 + br $continue|0 + end + end + ) + (func $~lib/memory/memory.compare (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 0 + else + loop $continue|0 + local.get $2 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.eq + else + i32.const 0 + end + if + local.get $2 + i32.const 1 + i32.sub + local.set $2 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $continue|0 + end + end + local.get $2 + if (result i32) + local.get $0 + i32.load8_u + local.get $1 + i32.load8_u + i32.sub + else + i32.const 0 + end + end + ) + (func $null (; 23 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/allocators/tlsf/package.json b/tests/allocators/tlsf/package.json index 68fede664c..dc760bf282 100644 --- a/tests/allocators/tlsf/package.json +++ b/tests/allocators/tlsf/package.json @@ -2,7 +2,7 @@ "private": true, "scripts": { "build": "npm run build:untouched && npm run build:optimized", - "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --validate --sourceMap --measure", - "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --validate --sourceMap --measure --noAssert --optimize" + "build:untouched": "node ../../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" } } diff --git a/tests/allocators/tlsf/untouched.wat b/tests/allocators/tlsf/untouched.wat index ba07ee7756..de1a3ea700 100644 --- a/tests/allocators/tlsf/untouched.wat +++ b/tests/allocators/tlsf/untouched.wat @@ -1,137 +1,63 @@ (module - (type $iiii_ (func (param i32 i32 i32 i32))) - (type $_ (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $ii (func (param i32) (result i32))) - (type $ii_ (func (param i32 i32))) - (type $iii_ (func (param i32 i32 i32))) - (type $iii (func (param i32 i32) (result i32))) - (type $i_ (func (param i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (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$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\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 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 56) "\10\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") (table $0 1 funcref) (elem (i32.const 0) $null) - (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/memory/memory.implemented i32 (i32.const 1)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 116)) (export "memory" (memory $0)) - (export "table" (table $0)) - (export "memory.compare" (func $~lib/memory/memory.compare)) + (export "memory.implemented" (global $~lib/memory/memory.implemented)) + (export "memory.copy" (func $~lib/memory/memory.copy)) + (export "memory.init" (func $~lib/memory/memory.init)) + (export "memory.drop" (func $~lib/memory/memory.drop)) (export "memory.allocate" (func $~lib/memory/memory.allocate)) (export "memory.free" (func $~lib/memory/memory.free)) (export "memory.reset" (func $~lib/memory/memory.reset)) - (start $start) - (func $start:~lib/allocator/tlsf (; 1 ;) (type $_) - 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 8 - i32.const 122 - i32.const 0 - call $~lib/env/abort - unreachable - end - ) - (func $start:assembly/index (; 2 ;) (type $_) - call $start:~lib/allocator/tlsf + (export "memory.repeat" (func $~lib/memory/memory.repeat)) + (export "memory.compare" (func $~lib/memory/memory.compare)) + (func $~lib/memory/memory.init (; 1 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + i32.const 0 + i32.const 24 + i32.const 46 + i32.const 4 + call $~lib/builtins/abort + unreachable ) - (func $~lib/internal/memory/memcmp (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - block $break|0 - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - block - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end + (func $~lib/memory/memory.drop (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + i32.const 24 + i32.const 53 + i32.const 4 + call $~lib/builtins/abort + unreachable ) - (func $~lib/memory/memory.compare (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp - ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 5 ;) (type $ii_) (param $0 i32) (param $1 i32) - i32.const 0 - local.get $1 i32.store offset=2912 ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 6 ;) (type $iii_) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 144 + i32.const 72 + i32.const 165 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -142,34 +68,29 @@ local.get $2 i32.store offset=4 ) - (func $~lib/allocator/tlsf/Root#setHead (; 7 ;) (type $iiii_) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 5 ;) (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.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 8 - i32.const 167 - 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 8 - i32.const 168 + i32.const 72 + i32.const 189 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -179,33 +100,33 @@ local.get $3 i32.store offset=96 ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 8 ;) (type $ii) (param $0 i32) (result i32) - i32.const 0 + (func $~lib/allocator/tlsf/Root#get:tailRef (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 i32.load offset=2912 ) - (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and i32.eqz if i32.const 0 - i32.const 8 - i32.const 89 + i32.const 72 + i32.const 110 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $0 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -214,26 +135,26 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 - i32.const 90 + i32.const 72 + i32.const 111 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 end ) - (func $~lib/allocator/tlsf/fls (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 8 - i32.const 428 + i32.const 72 + i32.const 452 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 31 @@ -241,34 +162,29 @@ i32.clz i32.sub ) - (func $~lib/allocator/tlsf/Root#getHead (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 9 ;) (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.const 22 i32.lt_u - i32.eqz - if + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else i32.const 0 - i32.const 8 - i32.const 158 - 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 8 - i32.const 159 + i32.const 72 + i32.const 181 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 local.get $1 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.mul local.get $2 i32.add @@ -277,17 +193,17 @@ i32.add i32.load offset=96 ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 138 + i32.const 72 + i32.const 159 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -297,7 +213,7 @@ i32.add i32.load offset=4 ) - (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -309,130 +225,129 @@ i32.load local.set $2 local.get $2 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz if i32.const 0 - i32.const 8 - i32.const 258 + i32.const 72 + i32.const 276 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 i32.ge_u - local.tee $4 if (result i32) local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.lt_u else - local.get $4 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 260 + i32.const 72 + i32.const 278 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 - local.set $5 + local.set $4 local.get $3 i32.const 8 i32.div_u - local.set $6 + local.set $5 else local.get $3 call $~lib/allocator/tlsf/fls - local.set $5 + local.set $4 local.get $3 - local.get $5 - global.get $~lib/allocator/tlsf/SL_BITS + local.get $4 + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor - local.set $6 - local.get $5 - global.get $~lib/allocator/tlsf/SB_BITS + local.set $5 + local.get $4 + i32.const 8 i32.const 1 i32.sub i32.sub - local.set $5 + local.set $4 end local.get $1 i32.load offset=4 - local.set $7 + local.set $6 local.get $1 i32.load offset=8 - local.set $8 - local.get $7 + local.set $7 + local.get $6 if + local.get $6 local.get $7 - local.get $8 i32.store offset=8 end - local.get $8 + local.get $7 if - local.get $8 local.get $7 + local.get $6 i32.store offset=4 end local.get $1 local.get $0 + local.get $4 local.get $5 - local.get $6 call $~lib/allocator/tlsf/Root#getHead i32.eq if local.get $0 + local.get $4 local.get $5 - local.get $6 - local.get $8 + local.get $7 call $~lib/allocator/tlsf/Root#setHead - local.get $8 + local.get $7 i32.eqz if local.get $0 - local.get $5 + local.get $4 call $~lib/allocator/tlsf/Root#getSLMap - local.set $4 + local.set $8 local.get $0 - local.get $5 local.get $4 + local.get $8 i32.const 1 - local.get $6 + local.get $5 i32.shl i32.const -1 i32.xor i32.and - local.tee $4 + local.tee $8 call $~lib/allocator/tlsf/Root#setSLMap - local.get $4 + local.get $8 i32.eqz if local.get $0 local.get $0 i32.load i32.const 1 - local.get $5 + local.get $4 i32.shl i32.const -1 i32.xor @@ -442,19 +357,19 @@ end end ) - (func $~lib/allocator/tlsf/Block#get:left (; 14 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.eqz if i32.const 0 - i32.const 8 - i32.const 81 + i32.const 72 + i32.const 102 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -465,53 +380,47 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 - i32.const 82 + i32.const 72 + i32.const 103 i32.const 11 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $1 end ) - (func $~lib/allocator/tlsf/Root#setJump (; 15 ;) (type $iii_) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 i32.load - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if + i32.const 0 + i32.ne + if (result i32) + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + else i32.const 0 - i32.const 8 - i32.const 334 - 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 + if (result i32) + local.get $2 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else i32.const 0 - i32.const 8 - i32.const 335 - 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 8 - i32.const 336 + i32.const 72 + i32.const 352 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -520,7 +429,7 @@ local.get $1 i32.store ) - (func $~lib/allocator/tlsf/Root#insert (; 16 ;) (type $ii_) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -534,83 +443,45 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 189 + i32.const 72 + i32.const 211 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/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 8 - i32.const 191 - 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.const 1 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 8 - i32.const 193 + i32.const 72 + i32.const 213 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/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 8 - i32.const 197 - i32.const 23 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 - local.get $6 - global.get $~lib/allocator/tlsf/FREE + local.set $4 + local.get $4 + i32.const 1 i32.and if local.get $0 - local.get $5 + local.get $3 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 8 + local.get $4 + i32.const 3 i32.const -1 i32.xor i32.and @@ -620,126 +491,113 @@ i32.store local.get $1 call $~lib/allocator/tlsf/Block#get:right - local.set $5 - local.get $5 + local.set $3 + local.get $3 i32.load - local.set $6 + local.set $4 end local.get $2 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 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 8 - i32.const 211 - i32.const 24 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 + local.set $5 + local.get $5 i32.load - local.set $7 - local.get $7 - global.get $~lib/allocator/tlsf/FREE + local.set $6 + local.get $6 + i32.const 1 i32.and i32.eqz if i32.const 0 - i32.const 8 - i32.const 213 + i32.const 72 + i32.const 231 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#remove - local.get $4 - local.get $7 - global.get $~lib/allocator/tlsf/Block.INFO + local.get $5 + local.get $6 + i32.const 8 local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and i32.add i32.add - local.tee $7 + local.tee $6 i32.store - local.get $4 + local.get $5 local.set $1 - local.get $7 + local.get $6 local.set $2 end - local.get $5 - local.get $6 - global.get $~lib/allocator/tlsf/LEFT_FREE + local.get $3 + local.get $4 + i32.const 2 i32.or i32.store local.get $0 local.get $1 - local.get $5 + local.get $3 call $~lib/allocator/tlsf/Root#setJump local.get $2 - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and - local.set $3 - local.get $3 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + local.set $7 + local.get $7 + i32.const 16 i32.ge_u - local.tee $7 if (result i32) - local.get $3 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + local.get $7 + i32.const 1073741824 i32.lt_u else - local.get $7 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 226 + i32.const 72 + i32.const 244 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $3 - global.get $~lib/allocator/tlsf/SB_SIZE + local.get $7 + i32.const 256 i32.lt_u if i32.const 0 local.set $8 - local.get $3 + local.get $7 i32.const 8 i32.div_u local.set $9 else - local.get $3 + local.get $7 call $~lib/allocator/tlsf/fls local.set $8 - local.get $3 + local.get $7 local.get $8 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor local.set $9 local.get $8 - global.get $~lib/allocator/tlsf/SB_BITS + i32.const 8 i32.const 1 i32.sub i32.sub @@ -786,7 +644,7 @@ i32.or call $~lib/allocator/tlsf/Root#setSLMap ) - (func $~lib/allocator/tlsf/Root#addMemory (; 17 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -796,39 +654,29 @@ local.get $1 local.get $2 i32.le_u - i32.eqz - if + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 8 - i32.const 377 - i32.const 4 - call $~lib/env/abort - unreachable end - local.get $1 - i32.const 7 - i32.and - i32.eqz - i32.eqz - if + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else i32.const 0 - i32.const 8 - i32.const 378 - 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 8 - i32.const 379 + i32.const 72 + i32.const 399 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -840,26 +688,26 @@ if local.get $1 local.get $3 - i32.const 4 + i32.const 8 i32.add i32.ge_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 384 + i32.const 72 + i32.const 408 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.get $3 i32.eq if local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $1 local.get $3 @@ -869,16 +717,16 @@ else local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.ge_u i32.eqz if i32.const 0 - i32.const 8 - i32.const 393 + i32.const 72 + i32.const 417 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -887,10 +735,10 @@ i32.sub local.set $5 local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 8 + i32.const 16 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add i32.lt_u if @@ -899,7 +747,7 @@ end local.get $5 i32.const 2 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.mul i32.sub local.set $6 @@ -907,10 +755,10 @@ local.set $7 local.get $7 local.get $6 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or local.get $4 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store @@ -923,12 +771,12 @@ local.get $1 local.get $5 i32.add - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $8 local.get $8 i32.const 0 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.or i32.store local.get $0 @@ -939,125 +787,105 @@ call $~lib/allocator/tlsf/Root#insert i32.const 1 ) - (func $~lib/allocator/tlsf/ffs (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 8 - i32.const 422 + i32.const 72 + i32.const 446 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/ffs (; 19 ;) (type $ii) (param $0 i32) (result i32) + (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 8 - i32.const 422 + i32.const 72 + i32.const 446 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.ctz ) - (func $~lib/allocator/tlsf/Root#search (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 18 ;) (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 8 - i32.const 296 - i32.const 4 - call $~lib/env/abort - unreachable - end + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) local.get $1 - global.get $~lib/allocator/tlsf/SB_SIZE + i32.const 256 i32.lt_u if i32.const 0 - local.set $3 + local.set $2 local.get $1 i32.const 8 i32.div_u - local.set $4 + local.set $3 else local.get $1 call $~lib/allocator/tlsf/fls - local.set $3 + local.set $2 local.get $1 - local.get $3 - global.get $~lib/allocator/tlsf/SL_BITS + local.get $2 + i32.const 5 i32.sub i32.shr_u i32.const 1 - global.get $~lib/allocator/tlsf/SL_BITS + i32.const 5 i32.shl i32.xor - local.set $4 - local.get $3 - global.get $~lib/allocator/tlsf/SB_BITS + local.set $3 + local.get $2 + i32.const 8 i32.const 1 i32.sub i32.sub - local.set $3 - local.get $4 - global.get $~lib/allocator/tlsf/SL_SIZE + local.set $2 + local.get $3 + i32.const 32 i32.const 1 i32.sub i32.lt_u if - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 else - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 i32.const 0 - local.set $4 + local.set $3 end end local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap i32.const 0 i32.const -1 i32.xor - local.get $4 + local.get $3 i32.shl i32.and - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -1065,54 +893,54 @@ i32.const 0 i32.const -1 i32.xor - local.get $3 + local.get $2 i32.const 1 i32.add i32.shl i32.and - local.set $2 - local.get $2 + local.set $6 + local.get $6 i32.eqz if i32.const 0 - local.set $6 + local.set $5 else - local.get $2 + local.get $6 call $~lib/allocator/tlsf/ffs - local.set $3 + local.set $2 local.get $0 - local.get $3 + local.get $2 call $~lib/allocator/tlsf/Root#getSLMap local.tee $7 if (result i32) local.get $7 else i32.const 0 - i32.const 8 - i32.const 323 + i32.const 72 + i32.const 341 i32.const 16 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.set $5 + local.set $4 local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end else local.get $0 - local.get $3 - local.get $5 + local.get $2 + local.get $4 call $~lib/allocator/tlsf/ffs call $~lib/allocator/tlsf/Root#getHead - local.set $6 + local.set $5 end - local.get $6 + local.get $5 ) - (func $~lib/allocator/tlsf/Root#use (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1120,127 +948,92 @@ i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 348 - 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 + i32.const 0 + i32.ne if (result i32) local.get $2 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE - i32.lt_u + i32.const 7 + i32.and + i32.eqz else - local.get $4 - end - i32.eqz - if i32.const 0 - i32.const 8 - i32.const 349 - 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 8 - i32.const 350 + i32.const 72 + i32.const 370 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/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 3 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 + local.set $4 + local.get $4 + i32.const 8 + i32.const 16 i32.add i32.ge_u if local.get $1 local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.and i32.or i32.store local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add local.get $2 i32.add - local.set $4 - local.get $4 + local.set $5 local.get $5 - global.get $~lib/allocator/tlsf/Block.INFO + local.get $4 + i32.const 8 i32.sub - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $0 - local.get $4 + local.get $5 call $~lib/allocator/tlsf/Root#insert else local.get $1 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 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 8 - i32.const 368 - i32.const 25 - call $~lib/env/abort - unreachable - else - local.get $4 - end - local.set $4 - local.get $4 - local.get $4 + local.set $5 + local.get $5 + local.get $5 i32.load - global.get $~lib/allocator/tlsf/LEFT_FREE + i32.const 2 i32.const -1 i32.xor i32.and i32.store end local.get $1 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.add ) - (func $~lib/allocator/tlsf/__memory_allocate (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__mem_allocate (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1264,7 +1057,7 @@ current_memory local.set $3 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 65535 i32.add @@ -1278,7 +1071,6 @@ local.get $4 local.get $3 i32.gt_s - local.tee $5 if (result i32) local.get $4 local.get $3 @@ -1287,7 +1079,7 @@ i32.const 0 i32.lt_s else - local.get $5 + i32.const 0 end if unreachable @@ -1306,7 +1098,7 @@ local.set $5 loop $repeat|0 local.get $5 - global.get $~lib/allocator/tlsf/FL_BITS + i32.const 22 i32.lt_u i32.eqz br_if $break|0 @@ -1320,7 +1112,7 @@ local.set $6 loop $repeat|1 local.get $6 - global.get $~lib/allocator/tlsf/SL_SIZE + i32.const 32 i32.lt_u i32.eqz br_if $break|1 @@ -1350,7 +1142,7 @@ end local.get $1 local.get $2 - global.get $~lib/allocator/tlsf/Root.SIZE + i32.const 2916 i32.add i32.const 7 i32.add @@ -1365,7 +1157,7 @@ drop end local.get $0 - global.get $~lib/allocator/tlsf/Block.MAX_SIZE + i32.const 1073741824 i32.gt_u if unreachable @@ -1378,7 +1170,7 @@ i32.xor i32.and local.tee $4 - global.get $~lib/allocator/tlsf/Block.MIN_SIZE + i32.const 16 local.tee $3 local.get $4 local.get $3 @@ -1444,10 +1236,10 @@ i32.eqz if (result i32) i32.const 0 - i32.const 8 - i32.const 480 + i32.const 72 + i32.const 507 i32.const 12 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $6 @@ -1456,7 +1248,7 @@ end local.get $7 i32.load - global.get $~lib/allocator/tlsf/TAGS + i32.const 3 i32.const -1 i32.xor i32.and @@ -1465,10 +1257,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 483 + i32.const 72 + i32.const 510 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1476,69 +1268,383 @@ local.get $0 call $~lib/allocator/tlsf/Root#use ) - (func $~lib/memory/memory.allocate (; 23 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/tlsf/__memory_allocate + call $~lib/allocator/tlsf/__mem_allocate return ) - (func $~lib/allocator/tlsf/__memory_free (; 24 ;) (type $i_) (param $0 i32) + (func $~lib/allocator/tlsf/__mem_free (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $~lib/allocator/tlsf/ROOT local.set $1 local.get $1 if local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub local.set $2 local.get $2 i32.load local.set $3 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.and i32.eqz i32.eqz if i32.const 0 - i32.const 8 - i32.const 494 + i32.const 72 + i32.const 524 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 local.get $3 - global.get $~lib/allocator/tlsf/FREE + i32.const 1 i32.or i32.store local.get $1 local.get $0 - global.get $~lib/allocator/tlsf/Block.INFO + i32.const 8 i32.sub call $~lib/allocator/tlsf/Root#insert end end ) - (func $~lib/memory/memory.free (; 25 ;) (type $i_) (param $0 i32) + (func $~lib/memory/memory.free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - call $~lib/allocator/tlsf/__memory_free - return + call $~lib/allocator/tlsf/__mem_free ) - (func $~lib/allocator/tlsf/__memory_reset (; 26 ;) (type $_) + (func $~lib/memory/memory.reset (; 24 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 24 + i32.const 77 + i32.const 9 + call $~lib/builtins/abort unreachable ) - (func $~lib/memory/memory.reset (; 27 ;) (type $_) - call $~lib/allocator/tlsf/__memory_reset - return + (func $~lib/memory/memory.copy (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/memory/memory.repeat (; 26 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 0 + local.set $4 + local.get $2 + local.get $3 + i32.mul + local.set $5 + block $break|0 + loop $continue|0 + local.get $4 + local.get $5 + i32.lt_u + if + block + local.get $0 + local.get $4 + i32.add + local.get $1 + local.get $2 + call $~lib/memory/memory.copy + local.get $4 + local.get $2 + i32.add + local.set $4 + end + br $continue|0 + end + end + end ) - (func $start (; 28 ;) (type $_) - call $start:assembly/index + (func $~lib/memory/memory.compare (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memcmp|inlined.0 (result i32) + local.get $0 + local.set $5 + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $5 + local.get $4 + i32.eq + if + i32.const 0 + br $~lib/util/memory/memcmp|inlined.0 + end + block $break|0 + loop $continue|0 + local.get $3 + i32.const 0 + i32.ne + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.eq + else + i32.const 0 + end + if + block + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $5 + i32.const 1 + i32.add + local.set $5 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end + br $continue|0 + end + end + end + local.get $3 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.sub + else + i32.const 0 + end + end ) - (func $null (; 29 ;) (type $_) + (func $null (; 28 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/binaryen/break-value.js b/tests/binaryen/break-value.js new file mode 100644 index 0000000000..dc280ddd90 --- /dev/null +++ b/tests/binaryen/break-value.js @@ -0,0 +1,24 @@ +var binaryen = require("binaryen"); + +var mod = new binaryen.Module(); +var ftype = mod.addFunctionType("ii", binaryen.i32, [ binaryen.i32 ]); +mod.addFunction("test", ftype, [], + mod.block("label", [ + mod.drop( // "br_if returns the value too" + mod.break("label", + // condition: $0 == 1 + mod.i32.eq( + mod.getLocal(0, binaryen.i32), + mod.i32.const(1) + ), + // value: 1 + mod.i32.const(1) + ) + ), + // push: 0 + mod.i32.const(0) + ], binaryen.i32) +); +console.log(mod.emitText()); + +mod.validate(); diff --git a/tests/binaryen/constant-indirect-arg.js b/tests/binaryen/constant-indirect-arg.js new file mode 100644 index 0000000000..080faed8db --- /dev/null +++ b/tests/binaryen/constant-indirect-arg.js @@ -0,0 +1,26 @@ +var binaryen = require("binaryen"); + +var mod = new binaryen.Module(); + +var ftype_v = mod.addFunctionType("v", binaryen.none, []); +var ftype_vi = mod.addFunctionType("vi", binaryen.none, [ binaryen.i32 ]); + +mod.addFunction("callee-2", ftype_v, [], mod.block(null, [ +])); +mod.addFunction("callee-1", ftype_vi, [], mod.block(null, [ + mod.call_indirect(mod.getLocal(0, binaryen.i32), [], "v"), +])); +mod.setFunctionTable(2, 2, [ "callee-1", "callee-2" ]); + +mod.addFunction("caller", ftype_vi, [ binaryen.i32 ], mod.block(null, [ + mod.call_indirect(mod.getLocal(0, binaryen.i32), [ mod.i32.const(1) ], "vi"), +])); +mod.addFunctionExport("caller", "main"); + +binaryen.setOptimizeLevel(4); +binaryen.setShrinkLevel(0); +binaryen.setDebugInfo(false); +mod.optimize(); +if (!mod.validate()) + console.log("-> does not validate"); +console.log(mod.emitText()); diff --git a/tests/binaryen/constant-indirect.js b/tests/binaryen/constant-indirect.js new file mode 100644 index 0000000000..2b017703de --- /dev/null +++ b/tests/binaryen/constant-indirect.js @@ -0,0 +1,22 @@ +var binaryen = require("binaryen"); + +var mod = new binaryen.Module(); + +var ftype = mod.addFunctionType("v", binaryen.none, []); + +mod.addFunction("callee", ftype, [], mod.block(null, [ +])); +mod.setFunctionTable(1, 1, [ "callee" ]); + +mod.addFunction("caller", ftype, [], mod.block(null, [ + mod.call_indirect(mod.i32.const(0), [], "v"), +])); +mod.addFunctionExport("caller", "main"); + +binaryen.setOptimizeLevel(4); +binaryen.setShrinkLevel(0); +binaryen.setDebugInfo(false); +mod.optimize(); +if (!mod.validate()) + console.log("-> does not validate"); +console.log(mod.emitText()); diff --git a/tests/compiler.js b/tests/compiler.js index 077e39b567..54cf4c25cb 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -236,22 +236,13 @@ tests.forEach(filename => { let exports = {}; function getString(ptr) { + const RUNTIME_HEADER_SIZE = 16; if (!ptr) return "null"; var U32 = new Uint32Array(exports.memory ? exports.memory.buffer : memory.buffer); var U16 = new Uint16Array(exports.memory ? exports.memory.buffer : memory.buffer); - var dataLength = U32[ptr >>> 2]; - var dataOffset = (ptr + 4) >>> 1; - var dataRemain = dataLength; - var parts = []; - const chunkSize = 1024; - while (dataRemain > chunkSize) { - let last = U16[dataOffset + chunkSize - 1]; - let size = last >= 0xD800 && last < 0xDC00 ? chunkSize - 1 : chunkSize; - let part = U16.subarray(dataOffset, dataOffset += size); - parts.push(String.fromCharCode.apply(String, part)); - dataRemain -= size; - } - return parts.join("") + String.fromCharCode.apply(String, U16.subarray(dataOffset, dataOffset + dataRemain)); + var len16 = U32[(ptr - RUNTIME_HEADER_SIZE + 4) >>> 2] >>> 1; + var ptr16 = ptr >>> 1; + return String.fromCharCode.apply(String, U16.subarray(ptr16, ptr16 + len16)); } var binaryBuffer = stdout.toBuffer(); @@ -302,7 +293,9 @@ tests.forEach(filename => { } }); console.log("- " + colorsUtil.green("instantiate OK") + " (" + asc.formatTime(runTime) + ")"); - console.log("\n " + Object.keys(exports).map(key => "[" + (typeof exports[key]).substring(0, 3) + "] " + key).join("\n ")); + console.log("\n " + Object.keys(exports).map(key => { + return "[" + (typeof exports[key]).substring(0, 3) + "] " + key + " = " + exports[key] + }).join("\n ")); } catch (e) { console.log("- " + colorsUtil.red("instantiate ERROR: ") + e.stack); failed = true; diff --git a/tests/compiler/abi.json b/tests/compiler/abi.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/abi.optimized.wat b/tests/compiler/abi.optimized.wat index d8df07cdda..0abe0f089d 100644 --- a/tests/compiler/abi.optimized.wat +++ b/tests/compiler/abi.optimized.wat @@ -2,15 +2,13 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0c") + (data (i32.const 24) "a\00b\00i\00.\00t\00s") (global $abi/condition (mut i32) (i32.const 0)) (global $abi/y (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "exported" (func $abi/exported)) (export "exportedExported" (func $abi/exported)) (export "exportedInternal" (func $abi/exported)) @@ -26,10 +24,10 @@ global.get $abi/y if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/abi.untouched.wat b/tests/compiler/abi.untouched.wat index f0b87c252d..89527822ee 100644 --- a/tests/compiler/abi.untouched.wat +++ b/tests/compiler/abi.untouched.wat @@ -2,16 +2,14 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00a\00b\00i\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $abi/condition (mut i32) (i32.const 0)) (global $abi/y (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 24)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "exported" (func $abi/exported)) (export "exportedExported" (func $abi/exportedExported)) (export "exportedInternal" (func $abi/exportedInternal)) @@ -39,10 +37,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -78,10 +76,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 45 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -109,10 +107,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 58 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -128,10 +126,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -145,10 +143,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 72 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -160,10 +158,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -173,10 +171,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 77 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -186,10 +184,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 79 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end diff --git a/tests/compiler/asc-constants.json b/tests/compiler/asc-constants.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/asc-constants.optimized.wat b/tests/compiler/asc-constants.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/asc-constants.optimized.wat +++ b/tests/compiler/asc-constants.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/asc-constants.untouched.wat b/tests/compiler/asc-constants.untouched.wat index 1ccafb9b5e..3edd831f17 100644 --- a/tests/compiler/asc-constants.untouched.wat +++ b/tests/compiler/asc-constants.untouched.wat @@ -13,12 +13,10 @@ (global $~lib/ASC_FEATURE_BULK_MEMORY i32 (i32.const 0)) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) (global $~lib/ASC_FEATURE_THREADS i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:asc-constants (; 0 ;) (type $FUNCSIG$v) - i32.const 1 + i32.const 0 drop i32.const 0 drop diff --git a/tests/compiler/assert-nonnull.json b/tests/compiler/assert-nonnull.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/assert-nonnull.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat new file mode 100644 index 0000000000..b4d131e5ea --- /dev/null +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -0,0 +1,196 @@ +(module + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/argc (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (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 + unreachable + end + local.get $0 + ) + (func $assert-nonnull/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + unreachable + end + local.get $0 + i32.load + ) + (func $assert-nonnull/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.load + ) + (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 + ) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.load + ) + (func $assert-nonnull/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/array/Array#__get + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (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 + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + i32.load + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (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 $assert-nonnull/testFn2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + unreachable + end + i32.const 0 + global.set $~lib/argc + local.get $0 + call_indirect (type $FUNCSIG$i) + ) + (func $assert-nonnull/testRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + global.set $~lib/argc + local.get $0 + call_indirect (type $FUNCSIG$i) + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (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 $assert-nonnull/testObjRet (; 13 ;) (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) + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 + ) + (func $null (; 14 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/nonNullAssertion.ts b/tests/compiler/assert-nonnull.ts similarity index 93% rename from tests/compiler/nonNullAssertion.ts rename to tests/compiler/assert-nonnull.ts index 73aa8be880..6e4eed6dfb 100644 --- a/tests/compiler/nonNullAssertion.ts +++ b/tests/compiler/assert-nonnull.ts @@ -30,7 +30,7 @@ export function testAll(foo: Array | null): Foo { } export function testAll2(foo: Array | null): Foo { - return foo!![0]!!!.bar!!!!; + return foo!![0]!!.bar!!; // 3x AS225: Expression is never 'null' } export function testFn(fn: (() => Foo | null) | null): Foo | null { diff --git a/tests/compiler/assert-nonnull.untouched.wat b/tests/compiler/assert-nonnull.untouched.wat new file mode 100644 index 0000000000..74528f3cbc --- /dev/null +++ b/tests/compiler/assert-nonnull.untouched.wat @@ -0,0 +1,262 @@ +(module + (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$i (func (result i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\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/argc (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (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 + if (result i32) + local.get $1 + else + unreachable + end + ) + (func $assert-nonnull/testObj (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + i32.load + ) + (func $assert-nonnull/testProp (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + ) + (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 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (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 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $assert-nonnull/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + i32.const 0 + call $~lib/array/Array#__get + ) + (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 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (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 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (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 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + ) + (func $assert-nonnull/testAll (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + i32.const 0 + call $~lib/array/Array#__get + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + i32.load + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + ) + (func $assert-nonnull/testAll2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + i32.const 0 + call $~lib/array/Array#__get + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + i32.load + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + ) + (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 $assert-nonnull/testFn2 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + local.set $2 + i32.const 0 + global.set $~lib/argc + local.get $2 + call_indirect (type $FUNCSIG$i) + ) + (func $assert-nonnull/testRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + block (result i32) + i32.const 0 + global.set $~lib/argc + local.get $0 + call_indirect (type $FUNCSIG$i) + end + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + ) + (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 $assert-nonnull/testObjRet (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + block (result i32) + i32.const 0 + global.set $~lib/argc + local.get $0 + i32.load offset=4 + call_indirect (type $FUNCSIG$i) + end + local.tee $1 + if (result i32) + local.get $1 + else + unreachable + end + ) + (func $null (; 17 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/assert.json b/tests/compiler/assert.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/assert.optimized.wat b/tests/compiler/assert.optimized.wat index 56e77c21a5..b70fe4f15c 100644 --- a/tests/compiler/assert.optimized.wat +++ b/tests/compiler/assert.optimized.wat @@ -1,12 +1,11 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s") - (data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\12") + (data (i32.const 24) "a\00s\00s\00e\00r\00t\00.\00t\00s") + (data (i32.const 48) "\10\00\00\00\18") + (data (i32.const 64) "m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/assert.untouched.wat b/tests/compiler/assert.untouched.wat index c9f2eafc38..e316002ec2 100644 --- a/tests/compiler/assert.untouched.wat +++ b/tests/compiler/assert.untouched.wat @@ -1,15 +1,13 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") - (data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:assert (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -17,20 +15,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -39,10 +37,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -50,10 +48,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -62,20 +60,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967296 i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967296 @@ -84,10 +82,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -95,11 +93,11 @@ if (result i32) local.get $0 else - i32.const 32 - i32.const 8 + i32.const 64 + i32.const 24 i32.const 10 i32.const 5 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.eqz diff --git a/tests/compiler/basic-nullable.json b/tests/compiler/basic-nullable.json new file mode 100644 index 0000000000..b1da366ff4 --- /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 0000000000..b1da366ff4 --- /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/binary.optimized.wat b/tests/compiler/binary.optimized.wat index 9edaf4902e..89a908dd27 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -3,70 +3,54 @@ (type $FUNCSIG$dd (func (param f64) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $binary/b (mut i32) (i32.const 0)) (global $binary/i (mut i32) (i32.const 0)) (global $binary/I (mut i64) (i64.const 0)) (global $binary/f (mut f32) (f32.const 0)) (global $binary/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/math/NativeMath.pow (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) (local $2 i64) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i64.reinterpret_f64 local.tee $2 i32.wrap_i64 - local.set $3 - block (result i32) - block (result i32) - block (result i32) - local.get $2 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $4 - i32.const 2147483647 - i32.and - local.tee $5 - i32.const 2146435072 - i32.gt_s - local.tee $1 - i32.eqz - if - local.get $5 - i32.const 2146435072 - i32.eq - local.tee $1 - if - local.get $3 - i32.const 0 - i32.ne - local.set $1 - end - end - local.get $1 - i32.eqz - end - if - i32.const 0 - local.set $1 - end - local.get $1 - i32.eqz - end - if - i32.const 0 - local.set $1 - end + local.set $1 + i32.const 1 + i32.const 0 + local.get $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $3 + i32.const 2147483647 + i32.and + local.tee $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else local.get $1 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 + i32.const 2146435072 + i32.eq + select end + select + if (result i32) + i32.const 1 + else + i32.const 0 + end + local.tee $1 if local.get $0 f64.const 1 @@ -82,22 +66,20 @@ (local $4 i32) local.get $0 i32.reinterpret_f32 - local.tee $3 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.set $2 - local.get $3 + local.tee $2 i32.const -2147483648 i32.and local.set $4 local.get $2 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.tee $3 i32.const 255 i32.eq - local.tee $1 if (result i32) - local.get $1 + i32.const 1 else i32.const 0 end @@ -108,7 +90,7 @@ return end block $folding-inner0 - local.get $3 + local.get $2 i32.const 1 i32.shl local.tee $1 @@ -122,36 +104,36 @@ local.get $0 return end - local.get $2 + local.get $3 if (result i32) - local.get $3 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $3 - i32.const 1 local.get $2 + i32.const 1 local.get $3 + local.get $2 i32.const 9 i32.shl i32.clz i32.sub - local.tee $2 + local.tee $3 i32.sub i32.shl end local.set $1 loop $continue|0 - local.get $2 + local.get $3 i32.const 127 i32.gt_s if local.get $1 i32.const 8388608 i32.ge_u - if + if (result i32) local.get $1 i32.const 8388608 i32.eq @@ -159,16 +141,16 @@ local.get $1 i32.const 8388608 i32.sub - local.set $1 + else + local.get $1 end - local.get $1 i32.const 1 i32.shl local.set $1 - local.get $2 + local.get $3 i32.const 1 i32.sub - local.set $2 + local.set $3 br $continue|0 end end @@ -190,27 +172,27 @@ i32.const 8 i32.shl i32.clz - local.tee $3 + local.tee $1 i32.shl - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.get $1 i32.sub - local.tee $2 + local.tee $1 i32.const 0 i32.gt_s if (result i32) - local.get $1 + local.get $2 i32.const 8388608 i32.sub - local.get $2 + local.get $1 i32.const 23 i32.shl i32.or else - local.get $1 - i32.const 1 local.get $2 + i32.const 1 + local.get $1 i32.sub i32.shr_u end @@ -223,57 +205,27 @@ local.get $0 f32.mul ) - (func $~lib/math/NativeMathf.pow (; 2 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) - (local $1 i32) - (local $2 i32) - block (result i32) - local.get $0 - i32.reinterpret_f32 - local.tee $2 - i32.const 2147483647 - i32.and - i32.const 2139095040 - i32.gt_s - local.tee $1 - i32.eqz - if - i32.const 0 - local.set $1 - end - local.get $1 - end - if - local.get $0 - f32.const 1 - f32.add - return - end - local.get $0 - ) - (func $~lib/math/NativeMath.mod (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i32) local.get $0 i64.reinterpret_f64 - local.tee $1 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $2 - local.get $1 + local.tee $2 i64.const 63 i64.shr_u local.set $4 local.get $2 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $3 i64.const 2047 i64.eq - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else i32.const 0 end @@ -284,38 +236,38 @@ return end block $folding-inner0 - local.get $1 + local.get $2 i64.const 1 i64.shl - local.tee $3 + local.tee $1 i64.const 9214364837600034816 i64.le_u if - local.get $3 + local.get $1 i64.const 9214364837600034816 i64.eq br_if $folding-inner0 local.get $0 return end - local.get $2 + local.get $3 i64.eqz if (result i64) - local.get $1 + local.get $2 i64.const 0 + local.get $3 local.get $2 - local.get $1 i64.const 12 i64.shl i64.clz i64.sub - local.tee $2 + local.tee $3 i64.sub i64.const 1 i64.add i64.shl else - local.get $1 + local.get $2 i64.const 4503599627370495 i64.and i64.const 4503599627370496 @@ -323,14 +275,14 @@ end local.set $1 loop $continue|0 - local.get $2 + local.get $3 i64.const 1023 i64.gt_s if local.get $1 i64.const 4503599627370496 i64.ge_u - if + if (result i64) local.get $1 i64.const 4503599627370496 i64.eq @@ -338,16 +290,16 @@ local.get $1 i64.const 4503599627370496 i64.sub - local.set $1 + else + local.get $1 end - local.get $1 i64.const 1 i64.shl local.set $1 - local.get $2 + local.get $3 i64.const 1 i64.sub - local.set $2 + local.set $3 br $continue|0 end end @@ -369,27 +321,27 @@ i64.const 11 i64.shl i64.clz - local.tee $3 + local.tee $1 i64.shl - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.get $1 i64.sub - local.tee $2 + local.tee $1 i64.const 0 i64.gt_s if (result i64) - local.get $1 + local.get $2 i64.const 4503599627370496 i64.sub - local.get $2 + local.get $1 i64.const 52 i64.shl i64.or else - local.get $1 - i64.const 0 local.get $2 + i64.const 0 + local.get $1 i64.sub i64.const 1 i64.add @@ -406,10 +358,10 @@ local.get $0 f64.mul ) - (func $start:binary (; 4 ;) (type $FUNCSIG$v) + (func $start:binary (; 3 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i64) - (local $2 f32) + (local $1 f32) + (local $2 i64) (local $3 f64) (local $4 i32) global.get $binary/i @@ -523,39 +475,39 @@ i32.xor global.set $binary/i global.get $binary/I - local.tee $1 + local.tee $2 i64.const 1 i64.rem_s drop - local.get $1 + local.get $2 f64.convert_i64_s call $~lib/math/NativeMath.pow drop global.get $binary/I - local.tee $1 + local.tee $2 i64.const 1 i64.lt_s global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.gt_s global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.le_s global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.ge_s global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.eq local.tee $0 global.set $binary/b local.get $0 global.set $binary/b - local.get $1 + local.get $2 i64.const 1 i64.add global.set $binary/I @@ -635,34 +587,43 @@ global.get $binary/f call $~lib/math/NativeMathf.mod drop + block $__inlined_func$~lib/math/NativeMathf.pow + i32.const 1 + i32.const 0 + global.get $binary/f + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + i32.const 2139095040 + i32.gt_s + select + br_if $__inlined_func$~lib/math/NativeMathf.pow + end global.get $binary/f - call $~lib/math/NativeMathf.pow - drop - global.get $binary/f - local.tee $2 + local.tee $1 f32.const 1 f32.lt global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.gt global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.le global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.ge global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.eq local.tee $0 global.set $binary/b local.get $0 global.set $binary/b - local.get $2 + local.get $1 f32.const 1 f32.add global.set $binary/f @@ -673,8 +634,23 @@ global.get $binary/f call $~lib/math/NativeMathf.mod global.set $binary/f + i32.const 1 + i32.const 0 global.get $binary/f - call $~lib/math/NativeMathf.pow + local.tee $1 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + i32.const 2139095040 + i32.gt_s + select + if + local.get $1 + f32.const 1 + f32.add + local.set $1 + end + local.get $1 global.set $binary/f global.get $binary/f f32.const 1 @@ -687,8 +663,23 @@ global.get $binary/f call $~lib/math/NativeMathf.mod global.set $binary/f + i32.const 1 + i32.const 0 global.get $binary/f - call $~lib/math/NativeMathf.pow + local.tee $1 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + i32.const 2139095040 + i32.gt_s + select + if + local.get $1 + f32.const 1 + f32.add + local.set $1 + end + local.get $1 global.set $binary/f global.get $binary/F call $~lib/math/NativeMath.mod @@ -749,10 +740,10 @@ call $~lib/math/NativeMath.pow global.set $binary/F ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 4 ;) (type $FUNCSIG$v) call $start:binary ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 5 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index d029b4474b..899c60703c 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -2,7 +2,9 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$ffi (func (param f32 i32) (result f32))) + (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) @@ -12,9 +14,7 @@ (global $binary/I (mut i64) (i64.const 0)) (global $binary/f (mut f32) (f32.const 0)) (global $binary/F (mut f64) (f64.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/math/NativeMath.scalbn (; 0 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) @@ -190,44 +190,39 @@ local.get $7 i32.const 2146435072 i32.gt_s - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $4 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.gt_s end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $6 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end if @@ -237,7 +232,7 @@ return end i32.const 0 - local.set $10 + local.set $9 local.get $3 i32.const 0 i32.lt_s @@ -247,7 +242,7 @@ i32.ge_s if i32.const 2 - local.set $10 + local.set $9 else local.get $8 i32.const 1072693248 @@ -258,21 +253,21 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 - local.get $11 + local.set $10 + local.get $10 i32.const 20 i32.gt_s - local.set $9 + local.set $11 i32.const 52 i32.const 20 - local.get $9 - select local.get $11 + select + local.get $10 i32.sub local.set $12 local.get $6 local.get $8 - local.get $9 + local.get $11 select local.set $13 local.get $13 @@ -290,7 +285,7 @@ i32.const 1 i32.and i32.sub - local.set $10 + local.set $9 end end end @@ -393,17 +388,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq end - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 1072693248 @@ -428,7 +421,7 @@ local.get $7 i32.const 1072693248 i32.sub - local.get $10 + local.get $9 i32.or i32.const 0 i32.eq @@ -442,7 +435,7 @@ f64.div local.set $16 else - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -462,7 +455,7 @@ i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 0 i32.eq if @@ -475,7 +468,7 @@ f64.div return end - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -661,17 +654,17 @@ i32.le_s if i32.const 0 - local.set $11 + local.set $10 else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 - local.set $11 + local.set $10 else i32.const 0 - local.set $11 + local.set $10 local.get $29 i32.const 1 i32.add @@ -695,7 +688,7 @@ local.set $15 f64.const 1.5 f64.const 1 - local.get $11 + local.get $10 select local.set $35 local.get $15 @@ -727,7 +720,7 @@ i32.or i32.const 524288 i32.add - local.get $11 + local.get $10 i32.const 18 i32.shl i32.add @@ -850,7 +843,7 @@ local.set $36 f64.const 1.350039202129749e-08 f64.const 0 - local.get $11 + local.get $10 select local.set $37 f64.const -7.028461650952758e-09 @@ -868,7 +861,7 @@ local.set $24 f64.const 0.5849624872207642 f64.const 0 - local.get $11 + local.get $10 select local.set $39 local.get $36 @@ -1013,7 +1006,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 i32.const 0 local.set $29 local.get $41 @@ -1022,7 +1015,7 @@ if local.get $28 i32.const 1048576 - local.get $11 + local.get $10 i32.const 1 i32.add i32.shr_s @@ -1035,12 +1028,12 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 f64.const 0 local.set $24 local.get $29 i32.const 1048575 - local.get $11 + local.get $10 i32.shr_s i32.const -1 i32.xor @@ -1056,7 +1049,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $11 + local.get $10 i32.sub i32.shr_s local.set $29 @@ -1195,17 +1188,21 @@ local.get $16 f64.mul ) - (func $~lib/math/NativeMathf.mod (; 2 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/builtins/isNaN (; 2 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/math/NativeMathf.mod (; 3 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $8 f32) + (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.reinterpret_f32 local.set $2 @@ -1235,45 +1232,38 @@ local.get $7 i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f32.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 f32.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f32.div return end local.get $2 i32.const 1 i32.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i32.le_u if - local.get $10 + local.get $9 local.get $7 i32.eq if @@ -1409,13 +1399,13 @@ i32.const 8 i32.shl i32.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i32.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i32.shl local.set $2 local.get $4 @@ -1451,7 +1441,7 @@ local.get $2 f32.reinterpret_i32 ) - (func $~lib/math/NativeMathf.scalbn (; 3 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) + (func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $FUNCSIG$ffi) (param $0 f32) (param $1 i32) (result f32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -1541,7 +1531,7 @@ f32.reinterpret_i32 f32.mul ) - (func $~lib/math/NativeMathf.pow (; 4 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/math/NativeMathf.pow (; 5 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1601,9 +1591,8 @@ local.get $4 i32.const 2139095040 i32.gt_s - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $5 i32.const 2139095040 @@ -1616,7 +1605,7 @@ return end i32.const 0 - local.set $7 + local.set $6 local.get $2 i32.const 0 i32.lt_s @@ -1626,7 +1615,7 @@ i32.ge_s if i32.const 2 - local.set $7 + local.set $6 else local.get $5 i32.const 1065353216 @@ -1637,27 +1626,27 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 i32.const 23 - local.get $9 + local.get $8 i32.sub - local.set $6 + local.set $9 local.get $5 - local.get $6 + local.get $9 i32.shr_s - local.set $8 - local.get $8 - local.get $6 + local.set $7 + local.get $7 + local.get $9 i32.shl local.get $5 i32.eq if i32.const 2 - local.get $8 + local.get $7 i32.const 1 i32.and i32.sub - local.set $7 + local.set $6 end end end @@ -1747,17 +1736,15 @@ local.get $4 i32.const 2139095040 i32.eq - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $4 i32.const 0 i32.eq end - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $4 i32.const 1065353216 @@ -1782,7 +1769,7 @@ local.get $4 i32.const 1065353216 i32.sub - local.get $7 + local.get $6 i32.or i32.const 0 i32.eq @@ -1796,7 +1783,7 @@ f32.div local.set $11 else - local.get $7 + local.get $6 i32.const 1 i32.eq if @@ -1815,7 +1802,7 @@ i32.const 0 i32.lt_s if - local.get $7 + local.get $6 i32.const 0 i32.eq if @@ -1828,7 +1815,7 @@ f32.div return end - local.get $7 + local.get $6 i32.const 1 i32.eq if @@ -1962,27 +1949,27 @@ local.get $4 i32.const 8388607 i32.and - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 1065353216 i32.or local.set $4 - local.get $8 + local.get $7 i32.const 1885297 i32.le_s if i32.const 0 - local.set $9 + local.set $8 else - local.get $8 + local.get $7 i32.const 6140887 i32.lt_s if i32.const 1 - local.set $9 + local.set $8 else i32.const 0 - local.set $9 + local.set $8 local.get $24 i32.const 1 i32.add @@ -1998,7 +1985,7 @@ local.set $10 f32.const 1.5 f32.const 1 - local.get $9 + local.get $8 select local.set $30 local.get $10 @@ -2036,7 +2023,7 @@ local.get $25 i32.const 4194304 i32.add - local.get $9 + local.get $8 i32.const 21 i32.shl i32.add @@ -2160,7 +2147,7 @@ local.set $31 f32.const 1.5632208487659227e-06 f32.const 0 - local.get $9 + local.get $8 select local.set $32 f32.const -1.1736857413779944e-04 @@ -2178,7 +2165,7 @@ local.set $18 f32.const 0.5849609375 f32.const 0 - local.get $9 + local.get $8 select local.set $34 local.get $31 @@ -2236,8 +2223,8 @@ local.set $11 local.get $11 i32.reinterpret_f32 - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 1124073472 i32.gt_s if @@ -2248,7 +2235,7 @@ f32.mul return else - local.get $8 + local.get $7 i32.const 1124073472 i32.eq if @@ -2268,7 +2255,7 @@ return end else - local.get $8 + local.get $7 i32.const 2147483647 i32.and i32.const 1125515264 @@ -2281,7 +2268,7 @@ f32.mul return else - local.get $8 + local.get $7 i32.const -1021968384 i32.eq if @@ -2302,7 +2289,7 @@ end end end - local.get $8 + local.get $7 i32.const 2147483647 i32.and local.set $36 @@ -2311,16 +2298,16 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 i32.const 0 local.set $24 local.get $36 i32.const 1056964608 i32.gt_s if - local.get $8 + local.get $7 i32.const 8388608 - local.get $9 + local.get $8 i32.const 1 i32.add i32.shr_s @@ -2333,10 +2320,10 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 local.get $24 i32.const 8388607 - local.get $9 + local.get $8 i32.shr_s i32.const -1 i32.xor @@ -2349,11 +2336,11 @@ i32.const 8388608 i32.or i32.const 23 - local.get $9 + local.get $8 i32.sub i32.shr_s local.set $24 - local.get $8 + local.get $7 i32.const 0 i32.lt_s if @@ -2453,14 +2440,14 @@ local.set $11 local.get $11 i32.reinterpret_f32 - local.set $8 - local.get $8 + local.set $7 + local.get $7 local.get $24 i32.const 23 i32.shl i32.add - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 23 i32.shr_s i32.const 0 @@ -2471,7 +2458,7 @@ call $~lib/math/NativeMathf.scalbn local.set $11 else - local.get $8 + local.get $7 f32.reinterpret_i32 local.set $11 end @@ -2479,17 +2466,21 @@ local.get $11 f32.mul ) - (func $~lib/math/NativeMath.mod (; 5 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/builtins/isNaN (; 6 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $~lib/math/NativeMath.mod (; 7 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i64) (local $10 i64) - (local $11 i64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -2519,45 +2510,38 @@ local.get $7 i64.const 0 i64.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f64.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 f64.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f64.div return end local.get $2 i64.const 1 i64.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i64.le_u if - local.get $10 + local.get $9 local.get $7 i64.eq if @@ -2693,13 +2677,13 @@ i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i64.shl local.set $2 local.get $4 @@ -2737,7 +2721,7 @@ local.get $2 f64.reinterpret_i64 ) - (func $start:binary (; 6 ;) (type $FUNCSIG$v) + (func $start:binary (; 8 ;) (type $FUNCSIG$v) global.get $binary/i i32.const 1 i32.lt_s @@ -3345,9 +3329,9 @@ call $~lib/math/NativeMath.pow global.set $binary/F ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 9 ;) (type $FUNCSIG$v) call $start:binary ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/bool.json b/tests/compiler/bool.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/bool.optimized.wat b/tests/compiler/bool.optimized.wat index 8389baed19..698b678a8d 100644 --- a/tests/compiler/bool.optimized.wat +++ b/tests/compiler/bool.optimized.wat @@ -1,11 +1,10 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\07\00\00\00b\00o\00o\00l\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0e") + (data (i32.const 24) "b\00o\00o\00l\00.\00t\00s") (global $bool/i (mut i32) (i32.const 2)) (global $bool/I (mut i64) (i64.const 2)) (global $bool/u (mut i32) (i32.const 2)) @@ -14,7 +13,6 @@ (global $bool/F (mut f64) (f64.const 2)) (global $bool/uu (mut i32) (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:bool (; 1 ;) (type $FUNCSIG$v) global.get $bool/i @@ -24,10 +22,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/I @@ -37,10 +35,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/u @@ -50,10 +48,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/U @@ -63,10 +61,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/f @@ -76,10 +74,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/F @@ -89,10 +87,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/uu @@ -102,10 +100,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/bool.untouched.wat b/tests/compiler/bool.untouched.wat index 1c4604055d..bee3cecbbb 100644 --- a/tests/compiler/bool.untouched.wat +++ b/tests/compiler/bool.untouched.wat @@ -1,9 +1,9 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\07\00\00\00b\00o\00o\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00b\00o\00o\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $bool/i (mut i32) (i32.const 2)) @@ -13,9 +13,7 @@ (global $bool/f (mut f32) (f32.const 2)) (global $bool/F (mut f64) (f64.const 2)) (global $bool/uu (mut i32) (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:bool (; 1 ;) (type $FUNCSIG$v) global.get $bool/i @@ -26,10 +24,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/I @@ -40,10 +38,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/u @@ -54,10 +52,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/U @@ -68,10 +66,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/f @@ -82,10 +80,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/F @@ -96,10 +94,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $bool/uu @@ -110,10 +108,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/builtins.json b/tests/compiler/builtins.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 99c4172deb..f0fadc981c 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -2,10 +2,13 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") - (data (i32.const 40) "\01\00\00\001") + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") + (data (i32.const 48) "\10") + (data (i32.const 64) "\10\00\00\00\06") + (data (i32.const 80) "a\00b\00c") (table $0 2 funcref) (elem (i32.const 0) $builtins/test $start:builtins~anonymous|0) (global $builtins/b (mut i32) (i32.const 0)) @@ -18,7 +21,6 @@ (global $builtins/s (mut i32) (i32.const 0)) (global $builtins/fn (mut i32) (i32.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $builtins/test)) (start $start) (func $start:builtins~anonymous|0 (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) @@ -42,10 +44,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 66 + i32.const 24 + i32.const 67 i32.const 19 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -55,10 +57,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 67 + i32.const 24 + i32.const 68 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -68,10 +70,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 68 + i32.const 24 + i32.const 69 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 63 @@ -91,10 +93,10 @@ i64.ne if i32.const 0 - i32.const 8 - i32.const 84 + i32.const 24 + i32.const 85 i32.const 19 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -104,10 +106,10 @@ i64.ne if i32.const 0 - i32.const 8 - i32.const 85 + i32.const 24 + i32.const 86 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -117,10 +119,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 86 + i32.const 24 + i32.const 87 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 diff --git a/tests/compiler/builtins.ts b/tests/compiler/builtins.ts index 32f6d11174..0ed738f8af 100644 --- a/tests/compiler/builtins.ts +++ b/tests/compiler/builtins.ts @@ -26,7 +26,8 @@ assert(isFloat(1)); assert(!isFloat(1)); assert(isReference(changetype(null))); assert(!isReference(changetype(null))); -assert(isString("1")); +assert(isString("")); +assert(isString("abc")); assert(!isString(1)); assert(isArray(changetype(null))); assert(isArrayLike(changetype(null))); diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index cea0d32b97..f1c9e8f71e 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -1,11 +1,14 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$if (func (param f32) (result i32))) + (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\001\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 64) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") (table $0 2 funcref) (elem (i32.const 0) $null $start:builtins~anonymous|0) (global $builtins/b (mut i32) (i32.const 0)) @@ -48,29 +51,49 @@ (global $~lib/builtins/f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $builtins/test)) (start $start) - (func $start:builtins~anonymous|0 (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/builtins/isNaN (; 1 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/builtins/isFinite (; 2 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.eq + ) + (func $~lib/builtins/isNaN (; 3 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $~lib/builtins/isFinite (; 4 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.eq + ) + (func $start:builtins~anonymous|0 (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) nop ) - (func $start:builtins (; 2 ;) (type $FUNCSIG$v) + (func $start:builtins (; 6 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i64) (local $3 i64) - (local $4 f32) - (local $5 f64) i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -78,20 +101,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -99,20 +122,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -120,20 +143,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -141,40 +164,40 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -182,20 +205,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -203,20 +226,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -224,20 +247,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -245,20 +268,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -266,20 +289,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -287,71 +310,81 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 - i32.eqz + i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + i32.const 0 + i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + i32.const 1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 35 + i32.const 0 + call $~lib/builtins/abort unreachable end i32.const 0 @@ -359,20 +392,20 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 35 + i32.const 24 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 36 + i32.const 24 + i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -380,20 +413,20 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 37 + i32.const 24 + i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 38 + i32.const 24 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -401,20 +434,20 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 39 + i32.const 24 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 43 + i32.const 24 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -422,20 +455,20 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 44 + i32.const 24 + i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 45 + i32.const 24 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -443,10 +476,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 46 + i32.const 24 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -527,10 +560,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 66 + i32.const 24 + i32.const 67 i32.const 19 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -548,10 +581,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 67 + i32.const 24 + i32.const 68 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -569,10 +602,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 68 + i32.const 24 + i32.const 69 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -635,10 +668,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 84 + i32.const 24 + i32.const 85 i32.const 19 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -656,10 +689,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 85 + i32.const 24 + i32.const 86 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -677,10 +710,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 86 + i32.const 24 + i32.const 87 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -717,133 +750,83 @@ f32.const 1.25 f32.trunc drop - block $~lib/builtins/isNaN|inlined.0 (result i32) - f32.const 1.25 - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const 1.25 + call $~lib/builtins/isNaN i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 103 + i32.const 24 + i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isNaN|inlined.1 (result i32) - f32.const nan:0x400000 - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + call $~lib/builtins/isNaN i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 104 + i32.const 24 + i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.0 (result i32) - f32.const 1.25 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const 1.25 + call $~lib/builtins/isFinite i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 105 + i32.const 24 + i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.1 (result i32) - f32.const inf - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const inf + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 106 + i32.const 24 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.2 (result i32) - f32.const inf - f32.neg - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const inf + f32.neg + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 107 + i32.const 24 + i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.3 (result i32) - f32.const nan:0x400000 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 108 + i32.const 24 + i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -880,27 +863,11 @@ f32.const 1.25 f32.trunc global.set $builtins/f - block $~lib/builtins/isNaN|inlined.2 (result i32) - f32.const 1.25 - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const 1.25 + call $~lib/builtins/isNaN global.set $builtins/b - block $~lib/builtins/isFinite|inlined.4 (result i32) - f32.const 1.25 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const 1.25 + call $~lib/builtins/isFinite global.set $builtins/b f64.const nan:0x8000000000000 drop @@ -940,133 +907,83 @@ f64.const 1.25 f64.trunc drop - block $~lib/builtins/isNaN|inlined.0 (result i32) - f64.const 1.25 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end - i32.const 0 - i32.ne + f64.const 1.25 + call $~lib/builtins/isNaN i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 139 + i32.const 24 + i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isNaN|inlined.1 (result i32) - f64.const nan:0x8000000000000 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end - i32.const 0 - i32.ne + f64.const nan:0x8000000000000 + call $~lib/builtins/isNaN i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 140 + i32.const 24 + i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.0 (result i32) - f64.const 1.25 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const 1.25 + call $~lib/builtins/isFinite i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 141 + i32.const 24 + i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.1 (result i32) - f64.const inf - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const inf + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 142 + i32.const 24 + i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.2 (result i32) - f64.const inf - f64.neg - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const inf + f64.neg + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 143 + i32.const 24 + i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.3 (result i32) - f64.const nan:0x8000000000000 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const nan:0x8000000000000 + call $~lib/builtins/isFinite i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 144 + i32.const 24 + i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1103,27 +1020,11 @@ f64.const 1.25 f64.trunc global.set $builtins/F - block $~lib/builtins/isNaN|inlined.2 (result i32) - f64.const 1.25 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end - i32.const 0 - i32.ne + f64.const 1.25 + call $~lib/builtins/isNaN global.set $builtins/b - block $~lib/builtins/isFinite|inlined.4 (result i32) - f64.const 1.25 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const 1.25 + call $~lib/builtins/isFinite global.set $builtins/b i32.const 8 i32.load @@ -1379,10 +1280,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 263 + i32.const 24 + i32.const 264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1391,10 +1292,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 264 + i32.const 24 + i32.const 265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1403,10 +1304,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 265 + i32.const 24 + i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1415,10 +1316,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 266 + i32.const 24 + i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1429,10 +1330,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 268 + i32.const 24 + i32.const 269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1441,10 +1342,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 269 + i32.const 24 + i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1453,10 +1354,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 270 + i32.const 24 + i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1465,10 +1366,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 271 + i32.const 24 + i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1477,10 +1378,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 272 + i32.const 24 + i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1491,10 +1392,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 274 + i32.const 24 + i32.const 275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1503,10 +1404,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 275 + i32.const 24 + i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1515,10 +1416,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 277 + i32.const 24 + i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1527,10 +1428,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 278 + i32.const 24 + i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1539,10 +1440,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 279 + i32.const 24 + i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -1551,10 +1452,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 280 + i32.const 24 + i32.const 281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1563,10 +1464,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 281 + i32.const 24 + i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1575,10 +1476,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 284 + i32.const 24 + i32.const 285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1587,10 +1488,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 285 + i32.const 24 + i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1599,10 +1500,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 286 + i32.const 24 + i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1611,10 +1512,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 287 + i32.const 24 + i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1623,10 +1524,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 289 + i32.const 24 + i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1635,10 +1536,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 290 + i32.const 24 + i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1647,170 +1548,102 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 292 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/builtins/isNaN|inlined.3 (result i32) - f32.const nan:0x400000 - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 8 + i32.const 24 i32.const 293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isNaN|inlined.3 (result i32) - f64.const nan:0x8000000000000 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + call $~lib/builtins/isNaN i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.5 (result i32) - f32.const nan:0x400000 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne - i32.eqz + f64.const nan:0x8000000000000 + call $~lib/builtins/isNaN i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.6 (result i32) - f32.const inf - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + call $~lib/builtins/isFinite i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.5 (result i32) - f64.const nan:0x8000000000000 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f32.const inf + call $~lib/builtins/isFinite i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.6 (result i32) - f64.const inf - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f64.const nan:0x8000000000000 + call $~lib/builtins/isFinite i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.7 (result i32) - f32.const 0 - local.set $4 - local.get $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - end - i32.const 0 - i32.ne + f64.const inf + call $~lib/builtins/isFinite + i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isFinite|inlined.7 (result i32) - f64.const 0 - local.set $5 - local.get $5 - local.get $5 - f64.sub - f64.const 0 - f64.eq - end - i32.const 0 - i32.ne + f32.const 0 + call $~lib/builtins/isFinite i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + f64.const 0 + call $~lib/builtins/isFinite + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 301 + i32.const 0 + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i8.MIN_VALUE @@ -1823,10 +1656,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 313 + i32.const 24 + i32.const 314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i8.MAX_VALUE @@ -1835,10 +1668,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 314 + i32.const 24 + i32.const 315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i16.MIN_VALUE @@ -1851,10 +1684,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 315 + i32.const 24 + i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i16.MAX_VALUE @@ -1863,10 +1696,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 316 + i32.const 24 + i32.const 317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i32.MIN_VALUE @@ -1875,10 +1708,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 317 + i32.const 24 + i32.const 318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i32.MAX_VALUE @@ -1887,10 +1720,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 318 + i32.const 24 + i32.const 319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i64.MIN_VALUE @@ -1899,10 +1732,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 319 + i32.const 24 + i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i64.MAX_VALUE @@ -1911,10 +1744,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 320 + i32.const 24 + i32.const 321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u8.MIN_VALUE @@ -1923,10 +1756,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 322 + i32.const 24 + i32.const 323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u8.MAX_VALUE @@ -1935,10 +1768,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 323 + i32.const 24 + i32.const 324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u16.MIN_VALUE @@ -1947,10 +1780,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 324 + i32.const 24 + i32.const 325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u16.MAX_VALUE @@ -1959,10 +1792,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 325 + i32.const 24 + i32.const 326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u32.MIN_VALUE @@ -1971,10 +1804,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 326 + i32.const 24 + i32.const 327 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u32.MAX_VALUE @@ -1983,10 +1816,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 327 + i32.const 24 + i32.const 328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u64.MIN_VALUE @@ -1995,10 +1828,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 328 + i32.const 24 + i32.const 329 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u64.MAX_VALUE @@ -2007,10 +1840,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 329 + i32.const 24 + i32.const 330 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/bool.MIN_VALUE @@ -2019,10 +1852,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 330 + i32.const 24 + i32.const 331 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/bool.MIN_VALUE @@ -2031,10 +1864,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 330 + i32.const 24 + i32.const 331 i32.const 29 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/bool.MAX_VALUE @@ -2043,10 +1876,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 331 + i32.const 24 + i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/bool.MAX_VALUE @@ -2055,10 +1888,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 331 + i32.const 24 + i32.const 332 i32.const 29 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_NORMAL_VALUE @@ -2067,10 +1900,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 333 + i32.const 24 + i32.const 334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_VALUE @@ -2079,10 +1912,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 334 + i32.const 24 + i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -2091,10 +1924,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 335 + i32.const 24 + i32.const 336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER @@ -2103,10 +1936,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 336 + i32.const 24 + i32.const 337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER @@ -2115,10 +1948,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 337 + i32.const 24 + i32.const 338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.EPSILON @@ -2127,10 +1960,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 338 + i32.const 24 + i32.const 339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_NORMAL_VALUE @@ -2139,10 +1972,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 340 + i32.const 24 + i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -2151,10 +1984,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 341 + i32.const 24 + i32.const 342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -2163,10 +1996,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 342 + i32.const 24 + i32.const 343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER @@ -2175,10 +2008,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 343 + i32.const 24 + i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -2187,10 +2020,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 344 + i32.const 24 + i32.const 345 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON @@ -2199,10 +2032,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 345 + i32.const 24 + i32.const 346 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2380,21 +2213,16 @@ f64.const 1 f64.trunc drop - block $~lib/builtins/isNaN|inlined.4 (result i32) - f64.const 1 - local.set $5 - local.get $5 - local.get $5 - f64.ne - end + f64.const 1 + call $~lib/builtins/isNaN drop ) - (func $builtins/test (; 3 ;) (type $FUNCSIG$v) + (func $builtins/test (; 7 ;) (type $FUNCSIG$v) nop ) - (func $start (; 4 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $start:builtins ) - (func $null (; 5 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/call-inferred.json b/tests/compiler/call-inferred.json new file mode 100644 index 0000000000..b1da366ff4 --- /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-inferred.optimized.wat b/tests/compiler/call-inferred.optimized.wat index 5b82cabfa8..7999547f0d 100644 --- a/tests/compiler/call-inferred.optimized.wat +++ b/tests/compiler/call-inferred.optimized.wat @@ -1,11 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/call-inferred.untouched.wat b/tests/compiler/call-inferred.untouched.wat index dbda18ce07..9f45f175bd 100644 --- a/tests/compiler/call-inferred.untouched.wat +++ b/tests/compiler/call-inferred.untouched.wat @@ -4,14 +4,12 @@ (type $FUNCSIG$dd (func (param f64) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $call-inferred/foo (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -33,10 +31,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 42 @@ -46,10 +44,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 42 @@ -59,10 +57,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 42 @@ -72,10 +70,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/call-optional.json b/tests/compiler/call-optional.json new file mode 100644 index 0000000000..b1da366ff4 --- /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-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index 57463721a6..16a404bf6c 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -2,15 +2,15 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) (global $call-optional/optIndirect (mut i32) (i32.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $call-optional/opt|trampoline (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $2of2 @@ -65,10 +65,10 @@ i32.add if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -103,10 +103,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -118,10 +118,10 @@ call_indirect (type $FUNCSIG$iiii) if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -135,10 +135,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -152,10 +152,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/call-optional.untouched.wat b/tests/compiler/call-optional.untouched.wat index 1bd4adf597..622f6af336 100644 --- a/tests/compiler/call-optional.untouched.wat +++ b/tests/compiler/call-optional.untouched.wat @@ -2,16 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $call-optional/opt|trampoline) (global $~lib/argc (mut i32) (i32.const 0)) (global $call-optional/optIndirect (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $call-optional/opt (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 @@ -57,10 +55,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -76,10 +74,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -91,10 +89,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -111,10 +109,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -131,10 +129,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -151,10 +149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/call-super.json b/tests/compiler/call-super.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/call-super.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index 4f45da51fd..e5c9ddb6bf 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -1,19 +1,20 @@ (module (type $FUNCSIG$v (func)) (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$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\1a") + (data (i32.const 80) "c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -75,12 +76,68 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $call-super/A#constructor (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 108 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $call-super/A#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -92,18 +149,20 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $call-super/B#constructor (; 3 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/B#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register call $call-super/A#constructor local.tee $0 i32.const 2 @@ -114,10 +173,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -126,15 +185,15 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $call-super/test1 (; 4 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 6 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/B#constructor local.tee $0 @@ -143,10 +202,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -155,32 +214,32 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $call-super/C#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 + (func $call-super/D#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register + local.tee $0 i32.eqz if i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register local.set $0 end local.get $0 i32.const 1 i32.store local.get $0 - ) - (func $call-super/D#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 8 - call $~lib/allocator/arena/__memory_allocate - call $call-super/C#constructor - local.tee $0 i32.const 2 i32.store offset=4 local.get $0 @@ -189,10 +248,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -201,15 +260,15 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 41 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $call-super/test2 (; 7 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 8 ;) (type $FUNCSIG$v) (local $0 i32) call $call-super/D#constructor local.tee $0 @@ -218,10 +277,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 47 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -230,19 +289,21 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 48 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $call-super/E#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -254,18 +315,20 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 58 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $call-super/test3 (; 9 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 10 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register call $call-super/E#constructor local.tee $0 i32.const 2 @@ -276,10 +339,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 68 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -288,36 +351,51 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $call-super/H#constructor (; 10 ;) (type $FUNCSIG$i) (result i32) + (func $call-super/H#constructor (; 11 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 8 - call $~lib/allocator/arena/__memory_allocate - call $call-super/C#constructor + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register local.tee $0 + i32.eqz + if + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + i32.const 1 + i32.store + local.get $0 i32.const 2 i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 11 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 12 ;) (type $FUNCSIG$v) (local $0 i32) - call $call-super/H#constructor + block (result i32) + call $call-super/H#constructor + end local.tee $0 i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -326,26 +404,51 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 87 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $call-super/test5 (; 12 ;) (type $FUNCSIG$v) + (func $call-super/J#constructor (; 13 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register + local.tee $0 + i32.eqz + if + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + i32.const 1 + i32.store + local.get $0 + i32.const 2 + i32.store offset=4 + local.get $0 + ) + (func $call-super/test5 (; 14 ;) (type $FUNCSIG$v) (local $0 i32) - call $call-super/H#constructor + block (result i32) + call $call-super/J#constructor + end local.tee $0 i32.load i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 106 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -354,15 +457,15 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 80 i32.const 107 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 13 ;) (type $FUNCSIG$v) - i32.const 40 + (func $start (; 15 ;) (type $FUNCSIG$v) + i32.const 112 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -372,7 +475,7 @@ call $call-super/test4 call $call-super/test5 ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 16 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/call-super.untouched.wat b/tests/compiler/call-super.untouched.wat index 5005235d83..a98336e811 100644 --- a/tests/compiler/call-super.untouched.wat +++ b/tests/compiler/call-super.untouched.wat @@ -1,31 +1,35 @@ (module (type $FUNCSIG$v (func)) (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))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00c\00a\00l\00l\00-\00s\00u\00p\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/util/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/memory/HEAP_BASE i32 (i32.const 40)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 108)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -106,16 +110,70 @@ ) (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $call-super/A#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $call-super/A#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -129,21 +187,23 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $call-super/B#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/B#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if (result i32) local.get $0 else i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register end call $call-super/A#constructor local.set $0 @@ -157,10 +217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -170,15 +230,15 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $call-super/test1 (; 6 ;) (type $FUNCSIG$v) + (func $call-super/test1 (; 8 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/B#constructor @@ -190,10 +250,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -203,19 +263,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $call-super/C#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/C#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -223,13 +285,15 @@ i32.store local.get $0 ) - (func $call-super/D#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/D#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 if (result i32) local.get $0 else i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register end call $call-super/C#constructor local.set $0 @@ -243,10 +307,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -256,15 +320,15 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 41 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $call-super/test2 (; 9 ;) (type $FUNCSIG$v) + (func $call-super/test2 (; 11 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/D#constructor @@ -276,10 +340,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 47 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -289,20 +353,22 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 48 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $call-super/E#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/E#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -316,20 +382,22 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 58 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 ) - (func $call-super/F#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/F#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -340,7 +408,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test3 (; 12 ;) (type $FUNCSIG$v) + (func $call-super/test3 (; 14 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/F#constructor @@ -352,10 +420,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 68 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -365,19 +433,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $call-super/G#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/G#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -385,12 +455,14 @@ i32.store local.get $0 ) - (func $call-super/H#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/H#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -401,7 +473,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test4 (; 15 ;) (type $FUNCSIG$v) + (func $call-super/test4 (; 17 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/H#constructor @@ -413,10 +485,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -426,19 +498,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 87 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $call-super/I#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/I#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -446,12 +520,14 @@ i32.store local.get $0 ) - (func $call-super/J#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $call-super/J#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -462,7 +538,7 @@ i32.store offset=4 local.get $0 ) - (func $call-super/test5 (; 18 ;) (type $FUNCSIG$v) + (func $call-super/test5 (; 20 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 call $call-super/J#constructor @@ -474,10 +550,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 106 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -487,24 +563,33 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 80 i32.const 107 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start:call-super (; 19 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $start:call-super (; 21 ;) (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 call $call-super/test1 call $call-super/test2 call $call-super/test3 call $call-super/test4 call $call-super/test5 ) - (func $start (; 20 ;) (type $FUNCSIG$v) + (func $start (; 22 ;) (type $FUNCSIG$v) call $start:call-super ) - (func $null (; 21 ;) (type $FUNCSIG$v) + (func $null (; 23 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/class-extends.json b/tests/compiler/class-extends.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/class-extends.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/class-extends.optimized.wat b/tests/compiler/class-extends.optimized.wat index 6f25e5d32c..38988d5695 100644 --- a/tests/compiler/class-extends.optimized.wat +++ b/tests/compiler/class-extends.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class-extends/test)) (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 diff --git a/tests/compiler/class-extends.untouched.wat b/tests/compiler/class-extends.untouched.wat index 52e5585c48..9951a96468 100644 --- a/tests/compiler/class-extends.untouched.wat +++ b/tests/compiler/class-extends.untouched.wat @@ -4,9 +4,7 @@ (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)) (export "test" (func $class-extends/test)) (func $class-extends/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 diff --git a/tests/compiler/class-overloading.json b/tests/compiler/class-overloading.json new file mode 100644 index 0000000000..b1da366ff4 --- /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-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index cf31b250ca..763941477c 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class-overloading/test)) (func $class-overloading/test (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) nop diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index e81b67a4cc..c529e9a5a5 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -4,9 +4,7 @@ (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)) (export "test" (func $class-overloading/test)) (start $start) (func $class-overloading/Foo#baz (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) diff --git a/tests/compiler/class.json b/tests/compiler/class.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/class.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 56082bcd13..40ab207f05 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -2,11 +2,9 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\10") + (data (i32.const 24) "c\00l\00a\00s\00s\00.\00t\00s") (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) local.get $0 diff --git a/tests/compiler/class.ts b/tests/compiler/class.ts index 80355753d6..0a00636ed7 100644 --- a/tests/compiler/class.ts +++ b/tests/compiler/class.ts @@ -1,3 +1,5 @@ +import "allocator/arena"; + class Animal { static ONE: i32 = 1; static add(a: i32, b: i32): i32 { return a + b + Animal.ONE; } diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 4f077de801..abba2ca051 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -6,15 +6,13 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$fiff (func (param i32 f32 f32) (result f32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\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 1 funcref) (elem (i32.const 0) $null) (global $class/Animal.ONE (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $class/test)) (start $start) (func $class/Animal.add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -39,10 +37,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 13 + i32.const 24 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $class/Animal.ONE diff --git a/tests/compiler/closure.json b/tests/compiler/closure.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/closure.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/closure.optimized.wat b/tests/compiler/closure.optimized.wat index 587c7142d7..bb456a1172 100644 --- a/tests/compiler/closure.optimized.wat +++ b/tests/compiler/closure.optimized.wat @@ -1,10 +1,7 @@ (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/closure.untouched.wat b/tests/compiler/closure.untouched.wat index 4560a6a15a..29ee81b836 100644 --- a/tests/compiler/closure.untouched.wat +++ b/tests/compiler/closure.untouched.wat @@ -3,9 +3,7 @@ (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/comma.json b/tests/compiler/comma.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/comma.optimized.wat b/tests/compiler/comma.optimized.wat index 8b11cbe40b..bc893ceb85 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -1,15 +1,13 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\10") + (data (i32.const 24) "c\00o\00m\00m\00a\00.\00t\00s") (global $comma/a (mut i32) (i32.const 0)) (global $comma/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:comma (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -25,19 +23,19 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/a @@ -52,10 +50,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -63,15 +61,15 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 global.set $comma/b - global.get $comma/b + i32.const 0 global.set $comma/a global.get $comma/a i32.const 1 @@ -85,10 +83,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -96,10 +94,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/a @@ -107,18 +105,19 @@ i32.add global.set $comma/a global.get $comma/a + local.tee $0 global.set $comma/b - global.get $comma/b + local.get $0 global.set $comma/a global.get $comma/a i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -126,10 +125,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -156,10 +155,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/comma.untouched.wat b/tests/compiler/comma.untouched.wat index dc8c2f295a..10dffbc5af 100644 --- a/tests/compiler/comma.untouched.wat +++ b/tests/compiler/comma.untouched.wat @@ -1,16 +1,14 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $comma/a (mut i32) (i32.const 0)) (global $comma/b (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:comma (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -34,10 +32,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -46,10 +44,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block @@ -66,10 +64,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -78,16 +76,17 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) i32.const 0 + local.tee $0 global.set $comma/b - global.get $comma/b + local.get $0 end global.set $comma/a block (result i32) @@ -104,10 +103,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -116,10 +115,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -129,8 +128,9 @@ global.set $comma/a block (result i32) global.get $comma/a + local.tee $0 global.set $comma/b - global.get $comma/b + local.get $0 end end global.set $comma/a @@ -140,10 +140,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $comma/b @@ -152,10 +152,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|0 @@ -189,10 +189,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block diff --git a/tests/compiler/constructor.json b/tests/compiler/constructor.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/constructor.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index c5195d5172..fd3e5742c2 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -1,10 +1,13 @@ (module - (type $FUNCSIG$v (func)) (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$v (func)) (type $FUNCSIG$i (func (result i32))) - (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $constructor/emptyCtor (mut i32) (i32.const 0)) @@ -19,9 +22,8 @@ (global $constructor/ctorAllocates (mut i32) (i32.const 0)) (global $constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -83,83 +85,163 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 1 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 4 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 i32.store + local.get $1 local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 2 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 4 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 0 + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 64 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 i32.store local.get $0 ) - (func $start:constructor (; 3 ;) (type $FUNCSIG$v) + (func $constructor/CtorConditionallyAllocates#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + block (result i32) + global.get $constructor/b + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + i32.eqz + end + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $start:constructor (; 5 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 8 + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register global.set $constructor/emptyCtor - call $constructor/EmptyCtorWithFieldInit#constructor + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.tee $0 + i32.const 1 + i32.store + local.get $0 global.set $constructor/emptyCtorWithFieldInit - call $constructor/EmptyCtorWithFieldNoInit#constructor + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 global.set $constructor/emptyCtorWithFieldNoInit i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register global.set $constructor/none - call $constructor/EmptyCtorWithFieldInit#constructor + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + local.tee $0 + i32.const 1 + i32.store + local.get $0 global.set $constructor/justFieldInit - call $constructor/EmptyCtorWithFieldNoInit#constructor + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 global.set $constructor/justFieldNoInit i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__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/__memory_allocate + call $~lib/allocator/arena/__mem_allocate br $__inlined_func$constructor/CtorConditionallyReturns#constructor end i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register end global.set $constructor/ctorConditionallyReturns i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register global.set $constructor/ctorAllocates - block (result i32) - global.get $constructor/b - if - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - i32.eqz - end - if - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 + call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 4 ;) (type $FUNCSIG$v) + (func $start (; 6 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 5 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/constructor.untouched.wat b/tests/compiler/constructor.untouched.wat index f1a500b8c3..f21f00bbb4 100644 --- a/tests/compiler/constructor.untouched.wat +++ b/tests/compiler/constructor.untouched.wat @@ -1,11 +1,18 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (memory $0 0) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT 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)) @@ -17,23 +24,22 @@ (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 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -112,27 +118,83 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $constructor/EmptyCtor#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $constructor/EmptyCtor#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $constructor/EmptyCtorWithFieldInit#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/EmptyCtorWithFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -140,12 +202,14 @@ i32.store local.get $0 ) - (func $constructor/EmptyCtorWithFieldNoInit#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result 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/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -153,22 +217,26 @@ i32.store local.get $0 ) - (func $constructor/None#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/None#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $constructor/JustFieldInit#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldInit#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -176,12 +244,14 @@ i32.store local.get $0 ) - (func $constructor/JustFieldNoInit#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/JustFieldNoInit#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -189,45 +259,37 @@ i32.store local.get $0 ) - (func $constructor/CtorReturns#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - block $~lib/memory/memory.allocate|inlined.0 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + (func $constructor/CtorReturns#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + call $~lib/memory/memory.allocate ) - (func $constructor/CtorConditionallyReturns#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $constructor/CtorConditionallyReturns#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 0 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end + i32.const 0 + call $~lib/memory/memory.allocate return end local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $constructor/CtorAllocates#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorAllocates#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -235,7 +297,7 @@ drop local.get $0 ) - (func $constructor/CtorConditionallyAllocates#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $constructor/CtorConditionallyAllocates#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $constructor/b if block (result i32) @@ -243,7 +305,9 @@ i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -254,13 +318,24 @@ i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $start:constructor (; 13 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (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 i32.const 0 call $constructor/EmptyCtor#constructor global.set $constructor/emptyCtor @@ -292,9 +367,9 @@ call $constructor/CtorConditionallyAllocates#constructor global.set $constructor/ctorConditionallyAllocates ) - (func $start (; 14 ;) (type $FUNCSIG$v) + (func $start (; 17 ;) (type $FUNCSIG$v) call $start:constructor ) - (func $null (; 15 ;) (type $FUNCSIG$v) + (func $null (; 18 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/declare.json b/tests/compiler/declare.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/declare.optimized.wat b/tests/compiler/declare.optimized.wat index ef4530a9f9..59f7a991f1 100644 --- a/tests/compiler/declare.optimized.wat +++ b/tests/compiler/declare.optimized.wat @@ -4,14 +4,12 @@ (import "declare" "externalConstant" (global $declare/externalConstant i32)) (import "declare" "my.externalConstant" (global $declare/my.externalConstant i32)) (import "declare" "externalFunction" (func $declare/externalFunction)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (memory $0 1) - (data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\14") + (data (i32.const 24) "d\00e\00c\00l\00a\00r\00e\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:declare (; 3 ;) (type $FUNCSIG$v) call $declare/externalFunction @@ -20,10 +18,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $declare/my.externalFunction @@ -32,10 +30,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/declare.untouched.wat b/tests/compiler/declare.untouched.wat index ab37d9bb49..fd3e834382 100644 --- a/tests/compiler/declare.untouched.wat +++ b/tests/compiler/declare.untouched.wat @@ -4,15 +4,13 @@ (import "declare" "externalConstant" (global $declare/externalConstant i32)) (import "declare" "my.externalConstant" (global $declare/my.externalConstant i32)) (import "declare" "externalFunction" (func $declare/externalFunction)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (memory $0 1) - (data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:declare (; 3 ;) (type $FUNCSIG$v) call $declare/externalFunction @@ -22,10 +20,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $declare/my.externalFunction @@ -35,10 +33,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/do.json b/tests/compiler/do.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/do.optimized.wat b/tests/compiler/do.optimized.wat index 0705d6fa4f..b803d61537 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,16 +1,14 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\n") + (data (i32.const 24) "d\00o\00.\00t\00s") (global $do/n (mut i32) (i32.const 10)) (global $do/m (mut i32) (i32.const 0)) (global $do/o (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:do (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -29,10 +27,10 @@ global.get $do/n if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/m @@ -40,10 +38,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -62,10 +60,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -96,10 +94,10 @@ global.get $do/n if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/o @@ -107,10 +105,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/n @@ -119,10 +117,10 @@ global.get $do/n if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/m @@ -130,10 +128,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/o @@ -141,10 +139,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index b26b20c534..8aea2d55bd 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -1,17 +1,15 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00d\00o\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $do/n (mut i32) (i32.const 10)) (global $do/m (mut i32) (i32.const 0)) (global $do/o (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 24)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:do (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -37,10 +35,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/m @@ -49,10 +47,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -77,10 +75,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -120,10 +118,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/o @@ -132,10 +130,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -149,10 +147,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/m @@ -161,10 +159,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $do/o @@ -173,10 +171,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/empty.json b/tests/compiler/empty.json new file mode 100644 index 0000000000..453cb07770 --- /dev/null +++ b/tests/compiler/empty.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} diff --git a/tests/compiler/empty.optimized.wat b/tests/compiler/empty.optimized.wat index 587c7142d7..bb456a1172 100644 --- a/tests/compiler/empty.optimized.wat +++ b/tests/compiler/empty.optimized.wat @@ -1,10 +1,7 @@ (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/empty.untouched.wat b/tests/compiler/empty.untouched.wat index 4560a6a15a..29ee81b836 100644 --- a/tests/compiler/empty.untouched.wat +++ b/tests/compiler/empty.untouched.wat @@ -3,9 +3,7 @@ (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/enum.json b/tests/compiler/enum.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/enum.optimized.wat b/tests/compiler/enum.optimized.wat index ef489ff645..918613db6f 100644 --- a/tests/compiler/enum.optimized.wat +++ b/tests/compiler/enum.optimized.wat @@ -1,8 +1,6 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $enum/Implicit.ZERO i32 (i32.const 0)) (global $enum/Implicit.ONE i32 (i32.const 1)) (global $enum/Implicit.TWO i32 (i32.const 2)) @@ -34,7 +32,6 @@ (global $enum/SelfReferenceConst.ZERO i32 (i32.const 0)) (global $enum/SelfReferenceConst.ONE i32 (i32.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "Implicit.ZERO" (global $enum/Implicit.ZERO)) (export "Implicit.ONE" (global $enum/Implicit.ONE)) (export "Implicit.TWO" (global $enum/Implicit.TWO)) diff --git a/tests/compiler/enum.untouched.wat b/tests/compiler/enum.untouched.wat index 1df56dd14d..51d9aa74ba 100644 --- a/tests/compiler/enum.untouched.wat +++ b/tests/compiler/enum.untouched.wat @@ -35,9 +35,7 @@ (global $enum/SelfReferenceConst.ZERO i32 (i32.const 0)) (global $enum/SelfReferenceConst.ONE i32 (i32.const 1)) (global $enum/enumType (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "Implicit.ZERO" (global $enum/Implicit.ZERO)) (export "Implicit.ONE" (global $enum/Implicit.ONE)) (export "Implicit.TWO" (global $enum/Implicit.TWO)) diff --git a/tests/compiler/export.json b/tests/compiler/export.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/export.optimized.wat b/tests/compiler/export.optimized.wat index be7678c324..4bb092470c 100644 --- a/tests/compiler/export.optimized.wat +++ b/tests/compiler/export.optimized.wat @@ -2,13 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $export/ns.one) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $export/add)) (export "sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/export.untouched.wat b/tests/compiler/export.untouched.wat index ea0955dfd5..9da32dc4fa 100644 --- a/tests/compiler/export.untouched.wat +++ b/tests/compiler/export.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $export/add)) (export "sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/exports.json b/tests/compiler/exports.json new file mode 100644 index 0000000000..b1da366ff4 --- /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 7f2e633d79..8b61e3de14 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -1,15 +1,15 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (memory $0 0) - (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)) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (global $exports/Animal.CAT i32 (i32.const 0)) (global $exports/Animal.DOG i32 (i32.const 1)) (global $exports/animals.Animal.CAT i32 (i32.const 0)) @@ -17,17 +17,21 @@ (global $exports/Car.TIRES i32 (i32.const 4)) (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) + (global $exports/Car i32 (i32.const 17)) + (global $exports/vehicles.Car i32 (i32.const 18)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $exports/add)) - (export "_setargc" (func $~lib/setargc)) + (export "$.setArgc" (func $~lib/setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) (export "math.sub" (func $exports/subOpt)) (export "Animal.CAT" (global $exports/Animal.CAT)) (export "Animal.DOG" (global $exports/Animal.DOG)) (export "animals.Animal.CAT" (global $exports/animals.Animal.CAT)) (export "animals.Animal.DOG" (global $exports/animals.Animal.DOG)) + (export "Car" (global $exports/Car)) (export "Car#get:doors" (func $exports/Car#get:numDoors)) (export "Car#set:doors" (func $exports/Car#set:numDoors)) (export "Car#constructor" (func $exports/Car#constructor|trampoline)) @@ -36,9 +40,10 @@ (export "Car#openDoors" (func $exports/Car#openDoors)) (export "Car.TIRES" (global $exports/Car.TIRES)) (export "Car.getNumTires" (func $exports/Car.getNumTires)) + (export "vehicles.Car" (global $exports/vehicles.Car)) (export "vehicles.Car#get:doors" (func $exports/Car#get:numDoors)) (export "vehicles.Car#set:doors" (func $exports/Car#set:numDoors)) - (export "vehicles.Car#constructor" (func $exports/Car#constructor|trampoline)) + (export "vehicles.Car#constructor" (func $exports/vehicles.Car#constructor|trampoline)) (export "vehicles.Car#get:numDoors" (func $exports/Car#get:numDoors)) (export "vehicles.Car#set:numDoors" (func $exports/Car#set:numDoors)) (export "vehicles.Car#openDoors" (func $exports/Car#openDoors)) @@ -46,31 +51,43 @@ (export "vehicles.Car.getNumTires" (func $exports/Car.getNumTires)) (export "outer.inner.a" (global $exports/outer.inner.a)) (start $start) - (func $exports/add (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $exports/subOpt (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $exports/Car.getNumTires (; 2 ;) (type $FUNCSIG$i) (result i32) + (func $exports/Car.getNumTires (; 3 ;) (type $FUNCSIG$i) (result i32) i32.const 4 ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (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 $0 - i32.const 11 + 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 $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -78,8 +95,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -105,32 +122,79 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 32 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store local.get $0 + i32.const 4 + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add ) - (func $exports/Car#get:numDoors (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 64 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $exports/Car#get:numDoors (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 7 ;) (type $FUNCSIG$v) - i32.const 8 + (func $start (; 10 ;) (type $FUNCSIG$v) + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) nop ) - (func $exports/subOpt|trampoline (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -148,11 +212,39 @@ local.get $1 i32.sub ) - (func $~lib/setargc (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $exports/Car#constructor|trampoline (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + i32.const 2 + local.set $1 + end + local.get $0 + i32.eqz + if + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store + local.get $0 + ) + (func $exports/vehicles.Car#constructor|trampoline (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -167,7 +259,9 @@ local.get $0 i32.eqz if - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 2fee8385e9..0559c3a692 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -1,15 +1,16 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vi (func (param i32))) - (memory $0 0) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (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)) (global $exports/Animal.CAT i32 (i32.const 0)) (global $exports/Animal.DOG i32 (i32.const 1)) (global $exports/animals.Animal.CAT i32 (i32.const 0)) @@ -17,18 +18,25 @@ (global $exports/Car.TIRES i32 (i32.const 4)) (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (global $~lib/argc (mut i32) (i32.const 0)) + (global $exports/Car i32 (i32.const 17)) + (global $exports/vehicles.Car i32 (i32.const 18)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $exports/add)) - (export "_setargc" (func $~lib/setargc)) + (export "$.setArgc" (func $~lib/setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) (export "math.sub" (func $exports/math.sub)) (export "Animal.CAT" (global $exports/Animal.CAT)) (export "Animal.DOG" (global $exports/Animal.DOG)) (export "animals.Animal.CAT" (global $exports/animals.Animal.CAT)) (export "animals.Animal.DOG" (global $exports/animals.Animal.DOG)) + (export "Car" (global $exports/Car)) (export "Car#get:doors" (func $Car#get:doors)) (export "Car#set:doors" (func $Car#set:doors)) (export "Car#constructor" (func $exports/Car#constructor|trampoline)) @@ -37,6 +45,7 @@ (export "Car#openDoors" (func $exports/Car#openDoors)) (export "Car.TIRES" (global $exports/Car.TIRES)) (export "Car.getNumTires" (func $exports/Car.getNumTires)) + (export "vehicles.Car" (global $exports/vehicles.Car)) (export "vehicles.Car#get:doors" (func $vehicles.Car#get:doors)) (export "vehicles.Car#set:doors" (func $vehicles.Car#set:doors)) (export "vehicles.Car#constructor" (func $exports/vehicles.Car#constructor|trampoline)) @@ -47,40 +56,37 @@ (export "vehicles.Car.getNumTires" (func $exports/vehicles.Car.getNumTires)) (export "outer.inner.a" (global $exports/outer.inner.a)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (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:exports (; 1 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - ) - (func $exports/add (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/add (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $exports/subOpt (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $exports/math.sub (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/math.sub (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $exports/Car.getNumTires (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $exports/Car.getNumTires (; 4 ;) (type $FUNCSIG$i) (result i32) global.get $exports/Car.TIRES ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -161,16 +167,70 @@ ) (func $~lib/memory/memory.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $exports/Car#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $exports/Car#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -182,28 +242,30 @@ i32.store local.get $0 ) - (func $exports/Car#get:numDoors (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/Car#set:numDoors (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#openDoors (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/Car#openDoors (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $exports/vehicles.Car.getNumTires (; 12 ;) (type $FUNCSIG$i) (result i32) + (func $exports/vehicles.Car.getNumTires (; 14 ;) (type $FUNCSIG$i) (result i32) global.get $exports/vehicles.Car.TIRES ) - (func $exports/vehicles.Car#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -215,24 +277,33 @@ i32.store local.get $0 ) - (func $exports/vehicles.Car#get:numDoors (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $exports/vehicles.Car#get:numDoors (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $exports/vehicles.Car#set:numDoors (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $exports/vehicles.Car#set:numDoors (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#openDoors (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $exports/vehicles.Car#openDoors (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $start (; 17 ;) (type $FUNCSIG$v) - call $start:exports + (func $start (; 19 ;) (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 $null (; 18 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) ) - (func $exports/subOpt|trampoline (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -250,20 +321,20 @@ local.get $1 call $exports/subOpt ) - (func $~lib/setargc (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/setargc (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 global.set $~lib/argc ) - (func $Car#get:doors (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $Car#get:doors (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $Car#set:doors (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $Car#set:doors (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/Car#constructor|trampoline (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -279,16 +350,16 @@ local.get $1 call $exports/Car#constructor ) - (func $vehicles.Car#get:doors (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $vehicles.Car#get:doors (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load ) - (func $vehicles.Car#set:doors (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $vehicles.Car#set:doors (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 i32.store ) - (func $exports/vehicles.Car#constructor|trampoline (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange diff --git a/tests/compiler/external.json b/tests/compiler/external.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/external.optimized.wat b/tests/compiler/external.optimized.wat index 694a47c7e4..3cd8fa2698 100644 --- a/tests/compiler/external.optimized.wat +++ b/tests/compiler/external.optimized.wat @@ -6,10 +6,7 @@ (import "external" "bar" (func $external/two)) (import "foo" "baz" (func $external/three)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "foo" (func $external/foo)) (export "foo.bar" (func $external/foo.bar)) (export "two" (func $external/two)) diff --git a/tests/compiler/external.untouched.wat b/tests/compiler/external.untouched.wat index f3f10b1e4c..664061dcc0 100644 --- a/tests/compiler/external.untouched.wat +++ b/tests/compiler/external.untouched.wat @@ -8,9 +8,7 @@ (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)) (export "foo" (func $external/foo)) (export "foo.bar" (func $external/foo.bar)) (export "two" (func $external/two)) diff --git a/tests/compiler/for.json b/tests/compiler/for.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/for.optimized.wat b/tests/compiler/for.optimized.wat index 11e8c6032e..ef845db0db 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,14 +1,12 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0c") + (data (i32.const 24) "f\00o\00r\00.\00t\00s") (global $for/i (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:for (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -33,10 +31,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end loop $repeat|1 @@ -68,10 +66,10 @@ global.get $for/i if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end loop $repeat|3 @@ -91,8 +89,9 @@ global.get $for/i i32.const 1 i32.sub + local.tee $0 global.set $for/i - global.get $for/i + local.get $0 br_if $repeat|4 end i32.const 0 @@ -115,10 +114,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index 9502a23466..44747e30e2 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -1,15 +1,13 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $for/i (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 24)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:for (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -41,10 +39,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -89,10 +87,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -124,8 +122,9 @@ global.get $for/i i32.const 1 i32.sub + local.tee $1 global.set $for/i - global.get $for/i + local.get $1 end i32.const 0 i32.eq @@ -139,42 +138,42 @@ end block $break|5 i32.const 0 - local.set $1 + local.set $2 loop $repeat|5 block $continue|5 - local.get $1 + local.get $2 i32.const 10 i32.lt_s i32.eqz br_if $break|5 br $continue|5 end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $repeat|5 unreachable end unreachable end - local.get $1 + local.get $2 i32.const 10 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|6 i32.const 0 - local.set $2 + local.set $1 loop $repeat|6 - local.get $2 + local.get $1 i32.const 10 i32.lt_s i32.eqz @@ -189,7 +188,7 @@ i32.lt_s i32.eqz br_if $break|7 - local.get $2 + local.get $1 local.get $3 i32.eq if @@ -205,10 +204,10 @@ end unreachable end - local.get $2 + local.get $1 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|6 unreachable end diff --git a/tests/compiler/function-expression.json b/tests/compiler/function-expression.json new file mode 100644 index 0000000000..b1da366ff4 --- /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-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 1a71339c3e..3d0d23d1ac 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -4,9 +4,10 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00,") + (data (i32.const 24) "f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") (table $0 11 funcref) (elem (i32.const 0) $start:function-expression~someName $start:function-expression~anonymous|0 $start:function-expression~anonymous|0 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5) (global $function-expression/f1 (mut i32) (i32.const 1)) @@ -15,7 +16,6 @@ (global $function-expression/f3 (mut i32) (i32.const 3)) (global $function-expression/f4 (mut i32) (i32.const 4)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:function-expression~anonymous|0 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -47,10 +47,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -62,10 +62,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -80,106 +80,100 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 5 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|3 i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 6 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|4 i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 7 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|5 i32.const 42 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 8 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|3 i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 9 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|4 i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 10 - call_indirect (type $FUNCSIG$iii) + call $start:function-expression~anonymous|5 i32.const 42 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index a3747b794f..7bd630c33c 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -4,9 +4,9 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") (table $0 11 funcref) (elem (i32.const 0) $null $start:function-expression~anonymous|0 $start:function-expression~anonymous|1 $start:function-expression~someName $start:function-expression~anonymous|2 $start:function-expression~anonymous|3 $start:function-expression~anonymous|4 $start:function-expression~anonymous|5 $function-expression/testOmittedReturn1~anonymous|0 $function-expression/testOmittedReturn2~anonymous|0 $function-expression/testOmittedReturn3~anonymous|0) (global $function-expression/f1 (mut i32) (i32.const 1)) @@ -14,9 +14,7 @@ (global $function-expression/f2 (mut i32) (i32.const 2)) (global $function-expression/f3 (mut i32) (i32.const 3)) (global $function-expression/f4 (mut i32) (i32.const 4)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:function-expression~anonymous|0 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -82,10 +80,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -100,10 +98,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block @@ -123,10 +121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 @@ -136,10 +134,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 6 @@ -149,10 +147,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 7 @@ -162,10 +160,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -181,10 +179,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -200,10 +198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -219,10 +217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/function-types.json b/tests/compiler/function-types.json new file mode 100644 index 0000000000..b1da366ff4 --- /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-types.optimized.wat b/tests/compiler/function-types.optimized.wat index 00fd577caa..a2d5700513 100644 --- a/tests/compiler/function-types.optimized.wat +++ b/tests/compiler/function-types.optimized.wat @@ -4,16 +4,16 @@ (type $FUNCSIG$jjj (func (param i64 i64) (result i64))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\"") + (data (i32.const 24) "f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") (table $0 5 funcref) (elem (i32.const 0) $null $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0) (global $function-types/i32Adder (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $function-types/i64Adder (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $function-types/makeAdder~anonymous|0 (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -44,10 +44,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -62,26 +62,25 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc f64.const 1.5 f64.const 2.5 - i32.const 3 - call_indirect (type $FUNCSIG$ddd) + call $function-types/makeAdder~anonymous|0 f64.const 4 f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -94,42 +93,40 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 3 i32.const 4 - i32.const 1 - call_indirect (type $FUNCSIG$iii) + call $function-types/makeAdder~anonymous|0 i32.const 7 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 4 i32.const 5 - i32.const 4 - call_indirect (type $FUNCSIG$iii) + call $function-types/makeAdder~anonymous|0 i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -157,26 +154,25 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 global.set $~lib/argc i32.const 1 i32.const 2 - i32.const 1 - call_indirect (type $FUNCSIG$iii) + call $function-types/makeAdder~anonymous|0 i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/function-types.untouched.wat b/tests/compiler/function-types.untouched.wat index b63eaf8255..fb90ab7a0c 100644 --- a/tests/compiler/function-types.untouched.wat +++ b/tests/compiler/function-types.untouched.wat @@ -6,17 +6,15 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") (table $0 5 funcref) (elem (i32.const 0) $null $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/makeAdder~anonymous|0 $function-types/addI32) (global $function-types/i32Adder (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (global $function-types/i64Adder (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 48)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $function-types/makeAdder~anonymous|0 (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -106,10 +104,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $function-types/makeAdder @@ -127,10 +125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result f64) @@ -146,10 +144,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -161,10 +159,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -175,10 +173,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -190,10 +188,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -209,10 +207,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -224,10 +222,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/function.json b/tests/compiler/function.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/function.optimized.wat b/tests/compiler/function.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/function.optimized.wat +++ b/tests/compiler/function.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/function.untouched.wat b/tests/compiler/function.untouched.wat index b76f67e92f..c06f81daaa 100644 --- a/tests/compiler/function.untouched.wat +++ b/tests/compiler/function.untouched.wat @@ -17,9 +17,7 @@ (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)) (start $start) (func $function/_ (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/gc.json b/tests/compiler/gc.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/gc.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc.optimized.wat b/tests/compiler/gc.optimized.wat new file mode 100644 index 0000000000..a31527ee67 --- /dev/null +++ b/tests/compiler/gc.optimized.wat @@ -0,0 +1,382 @@ +(module + (type $FUNCSIG$v (func)) + (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$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\10\00\00\00\0e") + (data (i32.const 120) "g\00c\00.\00l\00i\00n\00k") + (data (i32.const 136) "\10\00\00\00\n") + (data (i32.const 152) "g\00c\00.\00t\00s") + (data (i32.const 168) "\10\00\00\00\12") + (data (i32.const 184) "g\00c\00.\00u\00n\00l\00i\00n\00k") + (data (i32.const 208) "\10\00\00\00\14") + (data (i32.const 224) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (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/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $gc/main)) + (func $~lib/allocator/arena/__mem_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/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 244 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $gc/_dummy/__ref_link (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 120 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/link_count + i32.const 1 + i32.add + global.set $gc/_dummy/link_count + local.get $0 + global.set $gc/_dummy/link_ref + local.get $0 + global.set $gc/_dummy/link_parentRef + ) + (func $gc/_dummy/__ref_unlink (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 184 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/unlink_count + i32.const 1 + i32.add + global.set $gc/_dummy/unlink_count + local.get $0 + global.set $gc/_dummy/unlink_ref + local.get $1 + global.set $gc/_dummy/unlink_parentRef + ) + (func $gc/main (; 8 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/started + i32.eqz + if + i32.const 248 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + i32.const 1 + global.set $~lib/started + end + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $2 + global.get $gc/_dummy/link_count + local.set $0 + global.get $gc/_dummy/unlink_count + local.set $1 + global.get $gc/_dummy/collect_count + local.set $3 + local.get $2 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_link + global.get $gc/_dummy/link_count + local.get $0 + i32.const 1 + i32.add + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 15 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $1 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 16 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $3 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 17 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $0 + global.get $gc/_dummy/unlink_count + local.set $1 + global.get $gc/_dummy/collect_count + local.set $3 + local.get $2 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_unlink + global.get $gc/_dummy/link_count + local.get $0 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 24 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $1 + i32.const 1 + i32.add + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 25 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $3 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 26 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $2 + global.get $gc/_dummy/unlink_count + local.set $0 + global.get $gc/_dummy/collect_count + local.set $1 + i32.const 224 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/collect_count + i32.const 1 + i32.add + global.set $gc/_dummy/collect_count + global.get $gc/_dummy/link_count + local.get $2 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 33 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $0 + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 34 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $1 + i32.const 1 + i32.add + i32.ne + if + i32.const 0 + i32.const 152 + i32.const 35 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $null (; 9 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc.ts b/tests/compiler/gc.ts new file mode 100644 index 0000000000..fe20e10934 --- /dev/null +++ b/tests/compiler/gc.ts @@ -0,0 +1,36 @@ +import "allocator/arena"; +import { link_count, unlink_count, collect_count } from "./gc/_dummy"; + +class Ref {} + +@start export function main(): void { + var ref = new Ref(); + + var previous_link_count = link_count; + var previous_unlink_count = unlink_count; + var previous_collect_count = collect_count; + + runtime.retain(changetype(ref)); + + assert(link_count == previous_link_count + 1); + assert(unlink_count == previous_unlink_count); + assert(collect_count == previous_collect_count); + previous_link_count = link_count; + previous_unlink_count = unlink_count; + previous_collect_count = collect_count; + + runtime.release(changetype(ref)); + + assert(link_count == previous_link_count); + assert(unlink_count == previous_unlink_count + 1); + assert(collect_count == previous_collect_count); + previous_link_count = link_count; + previous_unlink_count = unlink_count; + previous_collect_count = collect_count; + + runtime.collect(); + + assert(link_count == previous_link_count); + assert(unlink_count == previous_unlink_count); + assert(collect_count == previous_collect_count + 1); +} diff --git a/tests/compiler/gc.untouched.wat b/tests/compiler/gc.untouched.wat new file mode 100644 index 0000000000..6a09c64b0b --- /dev/null +++ b/tests/compiler/gc.untouched.wat @@ -0,0 +1,475 @@ +(module + (type $FUNCSIG$v (func)) + (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$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$vii (func (param i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 136) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00t\00s\00") + (data (i32.const 168) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 208) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (mut i32) (i32.const 0)) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 244)) + (export "memory" (memory $0)) + (export "main" (func $gc/main)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (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/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $gc/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/Root#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $gc/_dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 120 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/link_count + i32.const 1 + i32.add + global.set $gc/_dummy/link_count + local.get $0 + global.set $gc/_dummy/link_ref + local.get $0 + global.set $gc/_dummy/link_parentRef + ) + (func $~lib/runtime/runtime.retain (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_link + ) + (func $gc/_dummy/__ref_unlink (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 184 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/unlink_count + i32.const 1 + i32.add + global.set $gc/_dummy/unlink_count + local.get $0 + global.set $gc/_dummy/unlink_ref + local.get $1 + global.set $gc/_dummy/unlink_parentRef + ) + (func $~lib/runtime/runtime.release (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_unlink + ) + (func $gc/_dummy/__ref_collect (; 14 ;) (type $FUNCSIG$v) + i32.const 224 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/collect_count + i32.const 1 + i32.add + global.set $gc/_dummy/collect_count + ) + (func $~lib/runtime/runtime.collect (; 15 ;) (type $FUNCSIG$v) + call $gc/_dummy/__ref_collect + ) + (func $gc/main (; 16 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + i32.const 0 + call $gc/Ref#constructor + local.set $0 + global.get $gc/_dummy/link_count + local.set $1 + global.get $gc/_dummy/unlink_count + local.set $2 + global.get $gc/_dummy/collect_count + local.set $3 + local.get $0 + call $~lib/runtime/runtime.retain + global.get $gc/_dummy/link_count + local.get $1 + i32.const 1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 15 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 16 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 17 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $1 + global.get $gc/_dummy/unlink_count + local.set $2 + global.get $gc/_dummy/collect_count + local.set $3 + local.get $0 + call $~lib/runtime/runtime.release + global.get $gc/_dummy/link_count + local.get $1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 24 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $2 + i32.const 1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 25 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 26 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + local.set $1 + global.get $gc/_dummy/unlink_count + local.set $2 + global.get $gc/_dummy/collect_count + local.set $3 + call $~lib/runtime/runtime.collect + global.get $gc/_dummy/link_count + local.get $1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 33 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + local.get $2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 34 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/collect_count + local.get $3 + i32.const 1 + i32.add + i32.eq + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 35 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start (; 17 ;) (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 + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $null (; 18 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/gc/README.md b/tests/compiler/gc/README.md new file mode 100644 index 0000000000..5fa7126fbe --- /dev/null +++ b/tests/compiler/gc/README.md @@ -0,0 +1 @@ +Tracing GC tests diff --git a/tests/compiler/gc/_dummy.ts b/tests/compiler/gc/_dummy.ts new file mode 100644 index 0000000000..679d606a34 --- /dev/null +++ b/tests/compiler/gc/_dummy.ts @@ -0,0 +1,58 @@ +// A dummy tracing GC for testing. + +export var collect_count = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_collect(): void { + trace("gc.collect"); + collect_count++; +} + +export var register_count = 0; +export var register_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_register(ref: usize): void { + trace("gc.register", 1, ref); + register_count++; + register_ref = ref; +} + +export var link_count = 0; +export var link_ref: usize = 0; +export var link_parentRef: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_link(ref: usize, parentRef: usize): void { + trace("gc.link", 2, ref, parentRef); + link_count++; + link_ref = ref; + link_parentRef = ref; +} + +export var unlink_count = 0; +export var unlink_ref: usize = 0; +export var unlink_parentRef: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_unlink(ref: usize, parentRef: usize): void { + trace("gc.unlink", 2, ref, parentRef); + unlink_count++; + unlink_ref = ref; + unlink_parentRef = parentRef; +} + +export var mark_count = 0; +export var mark_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_mark(ref: usize): void { + trace("gc.mark", 1, ref); + mark_count++; + mark_ref = ref; +} diff --git a/tests/compiler/gc/global-assign.json b/tests/compiler/gc/global-assign.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/gc/global-assign.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/global-assign.optimized.wat b/tests/compiler/gc/global-assign.optimized.wat new file mode 100644 index 0000000000..cead2b5618 --- /dev/null +++ b/tests/compiler/gc/global-assign.optimized.wat @@ -0,0 +1,246 @@ +(module + (type $FUNCSIG$ii (func (param 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)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\10\00\00\00&") + (data (i32.const 120) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (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 $gc/global-assign/global (mut i32) (i32.const 0)) + (global $gc/global-assign/globalRef (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $gc/global-assign/main)) + (func $~lib/allocator/arena/__mem_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/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 160 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 17 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $start:gc/global-assign (; 6 ;) (type $FUNCSIG$v) + i32.const 160 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register + global.set $gc/global-assign/global + global.get $gc/global-assign/global + global.set $gc/global-assign/globalRef + global.get $gc/_dummy/register_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + if + i32.const 0 + i32.const 120 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + if + i32.const 0 + i32.const 120 + i32.const 14 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register + global.set $gc/global-assign/global + global.get $gc/_dummy/register_count + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 19 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + if + i32.const 0 + i32.const 120 + i32.const 20 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + if + i32.const 0 + i32.const 120 + i32.const 21 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $gc/global-assign/main (; 7 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/global-assign + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 8 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/global-assign.ts b/tests/compiler/gc/global-assign.ts new file mode 100644 index 0000000000..3240387d1c --- /dev/null +++ b/tests/compiler/gc/global-assign.ts @@ -0,0 +1,21 @@ +import "allocator/arena"; +import { register_count, link_count, unlink_count } from "./_dummy"; + +@start export function main(): void {} + +class Ref {} + +// should register only + +var global: Ref = new Ref(); +var globalRef = changetype(global); +assert(register_count == 1); +assert(link_count == 0); +assert(unlink_count == 0); + +// should register only + +global = new Ref(); +assert(register_count == 2); +assert(link_count == 0); +assert(unlink_count == 0); diff --git a/tests/compiler/gc/global-assign.untouched.wat b/tests/compiler/gc/global-assign.untouched.wat new file mode 100644 index 0000000000..e8172bc044 --- /dev/null +++ b/tests/compiler/gc/global-assign.untouched.wat @@ -0,0 +1,329 @@ +(module + (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$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (mut i32) (i32.const 0)) + (global $~lib/util/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/util/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)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 160)) + (export "memory" (memory $0)) + (export "main" (func $gc/global-assign/main)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (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/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $gc/global-assign/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $start:gc/global-assign (; 9 ;) (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 + i32.const 0 + call $gc/global-assign/Ref#constructor + global.set $gc/global-assign/global + global.get $gc/global-assign/global + global.set $gc/global-assign/globalRef + global.get $gc/_dummy/register_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 14 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $gc/global-assign/Ref#constructor + global.set $gc/global-assign/global + global.get $gc/_dummy/register_count + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 19 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 20 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 21 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $gc/global-assign/main (; 10 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 11 ;) (type $FUNCSIG$v) + call $start:gc/global-assign + ) + (func $null (; 12 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/gc/global-init.json b/tests/compiler/gc/global-init.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/gc/global-init.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/global-init.optimized.wat b/tests/compiler/gc/global-init.optimized.wat new file mode 100644 index 0000000000..61e7bdda3c --- /dev/null +++ b/tests/compiler/gc/global-init.optimized.wat @@ -0,0 +1,243 @@ +(module + (type $FUNCSIG$ii (func (param 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)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\10\00\00\00\"") + (data (i32.const 120) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (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 $gc/global-init/global (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $gc/global-init/main)) + (func $~lib/allocator/arena/__mem_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/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 156 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 17 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $start:gc/global-init (; 6 ;) (type $FUNCSIG$v) + i32.const 160 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register + global.set $gc/global-init/global + global.get $gc/_dummy/register_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 11 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + if + i32.const 0 + i32.const 120 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + if + i32.const 0 + i32.const 120 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register + global.set $gc/global-init/global + global.get $gc/_dummy/register_count + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 16 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + if + i32.const 0 + i32.const 120 + i32.const 17 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + if + i32.const 0 + i32.const 120 + i32.const 18 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $gc/global-init/main (; 7 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/global-init + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 8 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/global-init.ts b/tests/compiler/gc/global-init.ts new file mode 100644 index 0000000000..9f89bc7ad6 --- /dev/null +++ b/tests/compiler/gc/global-init.ts @@ -0,0 +1,18 @@ +import "allocator/arena"; +import { register_count, link_count, unlink_count } from "./_dummy"; + +@start export function main(): void {} + +class Ref {} + +// should register only + +var global: Ref = new Ref(); +assert(register_count == 1); +assert(link_count == 0); +assert(unlink_count == 0); + +global = new Ref(); +assert(register_count == 2); +assert(link_count == 0); +assert(unlink_count == 0); diff --git a/tests/compiler/gc/global-init.untouched.wat b/tests/compiler/gc/global-init.untouched.wat new file mode 100644 index 0000000000..83fbe478a4 --- /dev/null +++ b/tests/compiler/gc/global-init.untouched.wat @@ -0,0 +1,326 @@ +(module + (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$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (mut i32) (i32.const 0)) + (global $~lib/util/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/util/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)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 156)) + (export "memory" (memory $0)) + (export "main" (func $gc/global-init/main)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (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/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $gc/global-init/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $start:gc/global-init (; 9 ;) (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 + i32.const 0 + call $gc/global-init/Ref#constructor + global.set $gc/global-init/global + global.get $gc/_dummy/register_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 11 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $gc/global-init/Ref#constructor + global.set $gc/global-init/global + global.get $gc/_dummy/register_count + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 16 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/link_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 17 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/_dummy/unlink_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 18 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $gc/global-init/main (; 10 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 11 ;) (type $FUNCSIG$v) + call $start:gc/global-init + ) + (func $null (; 12 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/gc/itcm/trace.json b/tests/compiler/gc/itcm/trace.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/gc/itcm/trace.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/gc/itcm/trace.optimized.wat b/tests/compiler/gc/itcm/trace.optimized.wat new file mode 100644 index 0000000000..e8fcbdcd8f --- /dev/null +++ b/tests/compiler/gc/itcm/trace.optimized.wat @@ -0,0 +1,1508 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 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$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00\"") + (data (i32.const 72) "#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 112) "\10\00\00\00(") + (data (i32.const 128) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 168) "\10\00\00\00\1a") + (data (i32.const 184) "i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 216) "\10\00\00\00\12") + (data (i32.const 232) "i\00t\00c\00m\00~\00i\00n\00i\00t") + (data (i32.const 256) "\10\00\00\00 ") + (data (i32.const 272) " \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=") + (data (i32.const 304) "\10\00\00\00\14") + (data (i32.const 320) " \00 \00 \00 \00 \00c\00l\00e\00a\00r") + (data (i32.const 344) "\10\00\00\00\1c") + (data (i32.const 360) " \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=") + (data (i32.const 392) "\10\00\00\00\"") + (data (i32.const 408) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E") + (data (i32.const 448) "\10\00\00\006") + (data (i32.const 464) " \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 520) "\10\00\00\00(") + (data (i32.const 536) "#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)") + (data (i32.const 576) "\10\00\00\00&") + (data (i32.const 592) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 632) "\10\00\00\00\12") + (data (i32.const 648) "i\00t\00c\00m\00.\00l\00i\00n\00k") + (data (i32.const 672) "\10\00\00\00\1a") + (data (i32.const 688) " \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y") + (data (i32.const 720) "\10\00\00\00:") + (data (i32.const 736) " \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]") + (data (i32.const 800) "\10\00\00\00\1c") + (data (i32.const 816) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f") + (data (i32.const 848) "\10\00\00\00\1a") + (data (i32.const 864) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 896) "\10\00\00\00\1e") + (data (i32.const 912) "#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l") + (data (i32.const 944) "\10\00\00\00\16") + (data (i32.const 960) "#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)") + (data (i32.const 984) "\10\00\00\00\18") + (data (i32.const 1000) "i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 1024) "\10\00\00\00\1c") + (data (i32.const 1040) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E") + (data (i32.const 1072) "\10\00\00\00\"") + (data (i32.const 1088) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K") + (data (i32.const 1128) "\10\00\00\00\1c") + (data (i32.const 1144) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K") + (data (i32.const 1176) "\10\00\00\00*") + (data (i32.const 1192) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 1240) "\10\00\00\00$") + (data (i32.const 1256) "i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P") + (data (i32.const 1296) "\10\00\00\00(") + (data (i32.const 1312) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e") + (data (i32.const 1352) "\10\00\00\00,") + (data (i32.const 1368) "i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h") + (data (i32.const 1416) "\10\00\00\00\12") + (data (i32.const 1432) "i\00t\00c\00m\00.\00m\00a\00r\00k") + (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/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 $~lib/started (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $gc/itcm/trace/main)) + (func $~lib/allocator/arena/__mem_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/util/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 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + 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 + i32.const 16 + i32.add + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 320 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/maybeInit (; 5 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.eqz + if + i32.const 232 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + global.set $~lib/collector/itcm/fromSpace + i32.const 272 + i32.const 1 + global.get $~lib/collector/itcm/fromSpace + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + global.set $~lib/collector/itcm/toSpace + i32.const 360 + i32.const 1 + global.get $~lib/collector/itcm/toSpace + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + 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 + i32.const 408 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + end + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + i32.const 464 + i32.const 3 + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $1 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 184 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/collector/itcm/maybeInit + 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/util/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 1452 + i32.le_u + if + i32.const 0 + i32.const 128 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 128 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $gc/itcm/trace/Ref#constructor (; 9 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + ) + (func $~lib/memory/memory.fill (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + end + ) + (func $~lib/collector/itcm/ManagedObject#unlink (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 736 + i32.const 3 + local.get $0 + i32.load offset=12 + local.tee $1 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + local.tee $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + local.get $0 + local.get $1 + i32.store offset=12 + local.get $1 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.and + local.get $0 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 688 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + 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 -4 + i32.and + i32.const 2 + i32.or + i32.store offset=8 + ) + (func $~lib/collector/itcm/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 648 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + i32.const 0 + end + if + local.get $1 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 4 + call $~lib/util/runtime/allocate + local.tee $1 + i32.const 4 + call $~lib/memory/memory.fill + local.get $1 + i32.const 15 + call $~lib/util/runtime/register + local.set $1 + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.load + local.get $1 + i32.ne + if + local.get $1 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + i32.const 4 + i32.store offset=8 + local.get $0 + ) + (func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/util/runtime/reallocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load offset=4 + local.tee $1 + i32.const 4 + i32.lt_u + if + i32.const 1 + i32.const 32 + local.get $1 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 0 + local.get $0 + i32.const 1452 + i32.gt_u + select + i32.const 32 + i32.lt_u + if + i32.const 32 + call $~lib/allocator/arena/__mem_allocate + local.tee $3 + local.get $2 + i32.load + i32.store + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + i32.const 0 + i32.store offset=12 + local.get $3 + i32.const 16 + i32.add + local.tee $4 + local.get $0 + local.get $1 + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.add + i32.const 4 + local.get $1 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 1452 + i32.le_u + if + i32.const 0 + i32.const 128 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + else + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $3 + local.set $2 + local.get $4 + local.set $0 + else + local.get $0 + local.get $1 + i32.add + i32.const 4 + local.get $1 + i32.sub + call $~lib/memory/memory.fill + end + end + local.get $2 + i32.const 4 + i32.store offset=4 + local.get $0 + ) + (func $~lib/array/ensureCapacity (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_u + if + local.get $0 + i32.load + local.tee $2 + call $~lib/util/runtime/reallocate + local.set $1 + local.get $1 + local.get $2 + i32.ne + if + local.get $0 + i32.load + local.get $1 + i32.ne + if + local.get $1 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + end + local.get $0 + i32.const 4 + i32.store offset=8 + end + ) + (func $~lib/array/Array#__unchecked_set (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.tee $2 + i32.load + local.get $1 + i32.ne + if + local.get $2 + local.get $1 + i32.store + local.get $1 + if + local.get $1 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + end + ) + (func $~lib/array/Array#__set (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=12 + local.set $2 + local.get $0 + call $~lib/array/ensureCapacity + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_set + i32.const 0 + local.get $2 + i32.ge_s + if + local.get $0 + i32.const 1 + i32.store offset=12 + end + ) + (func $gc/itcm/trace/makeGarbage (; 20 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + i32.const 72 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $gc/itcm/trace/Ref#constructor + local.set $1 + i32.const 536 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 16 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 1 + i32.store offset=12 + i32.const 816 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + local.get $0 + local.get $1 + call $~lib/array/Array#__set + i32.const 912 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + local.get $0 + i32.const 0 + call $~lib/array/Array#__set + i32.const 960 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $gc/itcm/trace/Ref#constructor + drop + ) + (func $~lib/collector/itcm/step (; 21 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 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 + unreachable + end + i32.const 1040 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 2 + global.set $~lib/collector/itcm/state + i32.const 1088 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + i32.const 1144 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + local.tee $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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.load + local.get $1 + call $~lib/runtime/__gc_mark_members + else + i32.const 1192 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + i32.const 1256 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + end + end + br $break|0 + end + global.get $~lib/collector/itcm/iter + local.tee $0 + global.get $~lib/collector/itcm/toSpace + i32.ne + if + i32.const 1312 + i32.const 1 + local.get $0 + i32.const 16 + i32.add + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + local.get $0 + i32.load offset=8 + i32.const -4 + i32.and + global.set $~lib/collector/itcm/iter + else + i32.const 1368 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 408 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + end + end + ) + (func $~lib/collector/itcm/__ref_collect (; 22 ;) (type $FUNCSIG$v) + i32.const 1000 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $gc/itcm/trace/main (; 23 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + i32.const 1456 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $gc/itcm/trace/makeGarbage + call $~lib/collector/itcm/__ref_collect + i32.const 1 + global.set $~lib/started + end + ) + (func $~lib/collector/itcm/__ref_mark (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 1432 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/collector/itcm/maybeInit + 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/array/Array#__traverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 17 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/runtime/__gc_mark_members (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $invalid + block $~lib/array/Array + block $gc/itcm/trace/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $gc/itcm/trace/Ref $~lib/array/Array $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 15 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 17 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + unreachable + ) + (func $null (; 27 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/itcm/trace.ts b/tests/compiler/gc/itcm/trace.ts new file mode 100644 index 0000000000..72857f6b69 --- /dev/null +++ b/tests/compiler/gc/itcm/trace.ts @@ -0,0 +1,31 @@ +@global const GC_TRACE = true; +import "allocator/arena"; +import "collector/itcm"; + +import { HEADER_SIZE } from "util/runtime"; + +assert(HEADER_SIZE == 16); + +class Ref { + inner: Ref; +} + +function makeGarbage(): void { + trace("# ref = new Ref()"); + var ref = new Ref(); + trace("# arr = new Array(1)"); + var arr = new Array(1); + trace("# arr[0] = ref"); + arr[0] = ref; + trace("# arr[0] = null"); + arr[0] = null; + trace("# new Ref()"); + new Ref(); +} + +makeGarbage(); +runtime.collect(); + +// should have sweeped four objects (incl. arr.buffer) + +@start export function main(): void {} diff --git a/tests/compiler/gc/itcm/trace.untouched.wat b/tests/compiler/gc/itcm/trace.untouched.wat new file mode 100644 index 0000000000..c5753e0ded --- /dev/null +++ b/tests/compiler/gc/itcm/trace.untouched.wat @@ -0,0 +1,1896 @@ +(module + (type $FUNCSIG$viiii (func (param i32 i32 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$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$viii (func (param i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00i\00t\00c\00m\00/\00t\00r\00a\00c\00e\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00#\00 \00r\00e\00f\00 \00=\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 112) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 168) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 216) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00i\00n\00i\00t\00") + (data (i32.const 256) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00f\00r\00o\00m\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 304) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00c\00l\00e\00a\00r\00") + (data (i32.const 344) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00t\00o\00S\00p\00a\00c\00e\00 \00=\00") + (data (i32.const 392) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00I\00D\00L\00E\00") + (data (i32.const 448) "\10\00\00\006\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00p\00u\00s\00h\00 \00[\00p\00r\00e\00v\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 520) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00 \00=\00 \00n\00e\00w\00 \00A\00r\00r\00a\00y\00(\001\00)\00") + (data (i32.const 576) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 632) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00l\00i\00n\00k\00") + (data (i32.const 672) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00m\00a\00k\00e\00G\00r\00a\00y\00") + (data (i32.const 720) "\10\00\00\00:\00\00\00\00\00\00\00\00\00\00\00 \00 \00 \00 \00 \00u\00n\00l\00i\00n\00k\00 \00[\00p\00r\00e\00f\00,\00 \00r\00e\00f\00,\00 \00n\00e\00x\00t\00]\00") + (data (i32.const 800) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00r\00e\00f\00") + (data (i32.const 848) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 896) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00#\00 \00a\00r\00r\00[\000\00]\00 \00=\00 \00n\00u\00l\00l\00") + (data (i32.const 944) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00#\00 \00n\00e\00w\00 \00R\00e\00f\00(\00)\00") + (data (i32.const 984) "\10\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 1024) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00I\00D\00L\00E\00") + (data (i32.const 1072) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00M\00A\00R\00K\00") + (data (i32.const 1128) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00") + (data (i32.const 1176) "\10\00\00\00*\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00M\00A\00R\00K\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1240) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00a\00t\00e\00 \00=\00 \00S\00W\00E\00E\00P\00") + (data (i32.const 1296) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00r\00e\00e\00") + (data (i32.const 1352) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00~\00s\00t\00e\00p\00/\00S\00W\00E\00E\00P\00 \00f\00i\00n\00i\00s\00h\00") + (data (i32.const 1416) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00i\00t\00c\00m\00.\00m\00a\00r\00k\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/itcm/trace/GC_TRACE i32 (i32.const 1)) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (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 $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1452)) + (export "memory" (memory $0)) + (export "main" (func $gc/itcm/trace/main)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (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/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 320 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.1 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + local.get $0 + local.get $0 + i32.store offset=8 + local.get $0 + local.get $0 + i32.store offset=12 + ) + (func $~lib/collector/itcm/maybeInit (; 7 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + i32.const 232 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $~lib/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/fromSpace + i32.const 272 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + global.get $~lib/collector/itcm/fromSpace + local.set $0 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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/util/runtime/HEADER_SIZE + call $~lib/memory/memory.allocate + global.set $~lib/collector/itcm/toSpace + i32.const 360 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.2 (result i32) + global.get $~lib/collector/itcm/toSpace + local.set $0 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + i32.const 408 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + end + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 8 ;) (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/ManagedObject#set:next (; 9 ;) (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/ManagedObjectList#push (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 464 + i32.const 3 + block $~lib/collector/itcm/objToRef|inlined.3 (result i32) + local.get $2 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.4 (result i32) + local.get $1 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.5 (result i32) + local.get $0 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 184 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/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/util/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 128 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 128 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $gc/itcm/trace/Ref#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + ) + (func $~lib/memory/memory.fill (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 + end + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 592 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/util/runtime/allocate + local.set $2 + local.get $2 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $2 + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 16 ;) (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 (; 17 ;) (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#unlink (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + call $~lib/collector/itcm/ManagedObject#get:next + local.set $1 + local.get $0 + i32.load offset=12 + local.set $2 + i32.const 736 + i32.const 3 + block $~lib/collector/itcm/objToRef|inlined.7 (result i32) + local.get $2 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.8 (result i32) + local.get $0 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + block $~lib/collector/itcm/objToRef|inlined.9 (result i32) + local.get $1 + local.set $3 + local.get $3 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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/ManagedObject#makeGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + i32.const 688 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.6 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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/__ref_link (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 648 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + 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 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + i32.const 0 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 21 ;) (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.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 592 + i32.const 12 + i32.const 57 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.get $1 + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 + block (result i32) + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + end + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + i32.load + local.tee $6 + i32.ne + if (result i32) + nop + local.get $5 + local.get $4 + call $~lib/collector/itcm/__ref_link + local.get $5 + else + local.get $5 + end + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + end + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/allocator/arena/__mem_free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/util/runtime/reallocate (; 26 ;) (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 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u + if + local.get $1 + call $~lib/util/runtime/adjust + local.set $4 + local.get $3 + call $~lib/util/runtime/adjust + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u + if + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load + i32.store + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + if + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 128 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/memory/memory.free + else + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + end + else + nop + end + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/array/ensureCapacity (; 27 ;) (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 $1 + local.get $0 + i32.load offset=8 + local.get $2 + i32.shr_u + i32.gt_u + if + local.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 864 + i32.const 14 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load + local.set $3 + local.get $1 + local.get $2 + i32.shl + local.set $4 + local.get $3 + local.get $4 + call $~lib/util/runtime/reallocate + local.set $5 + local.get $5 + local.get $3 + i32.ne + if + local.get $0 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + nop + local.get $7 + local.get $6 + call $~lib/collector/itcm/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $0 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $4 + i32.store offset=8 + end + ) + (func $~lib/array/Array#__unchecked_set (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne + if + local.get $3 + local.get $2 + i32.store + local.get $2 + i32.const 0 + i32.ne + if + local.get $2 + local.get $0 + call $~lib/collector/itcm/__ref_link + end + end + ) + (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $gc/itcm/trace/makeGarbage (; 30 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + i32.const 72 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + call $gc/itcm/trace/Ref#constructor + local.set $0 + i32.const 536 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1 + call $~lib/array/Array#constructor + local.set $1 + i32.const 816 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + local.get $1 + i32.const 0 + local.get $0 + call $~lib/array/Array#__set + i32.const 912 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + local.get $1 + i32.const 0 + i32.const 0 + call $~lib/array/Array#__set + i32.const 960 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + call $gc/itcm/trace/Ref#constructor + drop + ) + (func $~lib/collector/itcm/step (; 31 ;) (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 + unreachable + end + block + i32.const 1040 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/runtime/__gc_mark_roots + i32.const 2 + global.set $~lib/collector/itcm/state + i32.const 1088 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + i32.const 1144 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.10 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.11 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + i32.const 1192 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + i32.const 1256 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + i32.const 1312 + i32.const 1 + block $~lib/collector/itcm/objToRef|inlined.12 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + 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 + i32.const 1368 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $~lib/collector/itcm/toSpace + call $~lib/collector/itcm/ManagedObjectList#clear + i32.const 1 + global.set $~lib/collector/itcm/state + i32.const 408 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + end + br $break|0 + unreachable + end + unreachable + end + ) + (func $~lib/collector/itcm/__ref_collect (; 32 ;) (type $FUNCSIG$v) + i32.const 1000 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 33 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start:gc/itcm/trace (; 34 ;) (type $FUNCSIG$v) + global.get $~lib/util/runtime/HEADER_SIZE + i32.const 16 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 7 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + 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 + call $gc/itcm/trace/makeGarbage + call $~lib/runtime/runtime.collect + ) + (func $gc/itcm/trace/main (; 35 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 36 ;) (type $FUNCSIG$v) + call $start:gc/itcm/trace + ) + (func $~lib/collector/itcm/__ref_mark (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + i32.const 1432 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/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/runtime/__gc_mark_roots (; 38 ;) (type $FUNCSIG$v) + (local $0 i32) + nop + ) + (func $~lib/array/Array#__traverse (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + block $break|0 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + block + local.get $1 + i32.load + local.set $3 + local.get $3 + if + local.get $3 + call $~lib/collector/itcm/__ref_mark + i32.const 17 + local.get $3 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + br $continue|0 + end + end + end + ) + (func $~lib/runtime/__gc_mark_members (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/array/Array + block $gc/itcm/trace/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + br_table $invalid $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $gc/itcm/trace/Ref $~lib/array/Array $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 15 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 17 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + unreachable + ) + (func $null (; 41 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/gc/rc/README.md b/tests/compiler/gc/rc/README.md new file mode 100644 index 0000000000..0e4679f8bf --- /dev/null +++ b/tests/compiler/gc/rc/README.md @@ -0,0 +1 @@ +Reference counting GC tests diff --git a/tests/compiler/gc/rc/_dummy.ts b/tests/compiler/gc/rc/_dummy.ts new file mode 100644 index 0000000000..74716fe322 --- /dev/null +++ b/tests/compiler/gc/rc/_dummy.ts @@ -0,0 +1,43 @@ +// A dummy reference counting GC for testing. + +export var collect_count = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_collect(): void { + trace("gc.collect"); + collect_count++; +} + +export var register_count = 0; +export var register_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_register(ref: usize): void { + trace("gc.register", 1, ref); + register_count++; + register_ref = ref; +} + +export var retain_count = 0; +export var retain_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_retain(ref: usize): void { + trace("gc.retain", 1, ref); + retain_count++; + retain_ref = ref; +} + +export var release_count = 0; +export var release_ref: usize = 0; + +// @ts-ignore: decorator +@global @unsafe +function __ref_release(ref: usize): void { + trace("gc.release", 1, ref); + release_count++; + release_ref = ref; +} diff --git a/tests/compiler/gc/rc/global-assign.json b/tests/compiler/gc/rc/global-assign.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ 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 new file mode 100644 index 0000000000..b766d5ffbc --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.optimized.wat @@ -0,0 +1,345 @@ +(module + (type $FUNCSIG$ii (func (param 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)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\10\00\00\00\12") + (data (i32.const 120) "g\00c\00.\00r\00e\00t\00a\00i\00n") + (data (i32.const 144) "\10\00\00\00,") + (data (i32.const 160) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s") + (data (i32.const 208) "\10\00\00\00\14") + (data (i32.const 224) "g\00c\00.\00r\00e\00l\00e\00a\00s\00e") + (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_ref (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 $gc/rc/global-assign/global (mut i32) (i32.const 0)) + (global $gc/rc/global-assign/globalRef (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $gc/rc/global-assign/main)) + (func $~lib/allocator/arena/__mem_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/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/rc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/register_count + local.get $0 + global.set $gc/rc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 244 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 17 + i32.store + local.get $0 + call $gc/rc/_dummy/__ref_register + local.get $0 + ) + (func $gc/rc/_dummy/__ref_retain (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 120 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/retain_count + local.get $0 + global.set $gc/rc/_dummy/retain_ref + ) + (func $gc/rc/_dummy/__ref_release (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 224 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/release_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/release_count + local.get $0 + global.set $gc/rc/_dummy/release_ref + ) + (func $start:gc/rc/global-assign (; 8 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + i32.const 248 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register + local.tee $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + global.set $gc/rc/global-assign/global + global.get $gc/rc/global-assign/global + global.set $gc/rc/global-assign/globalRef + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-assign/globalRef + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 14 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + if + i32.const 0 + i32.const 160 + i32.const 15 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register + local.set $0 + local.get $0 + global.get $gc/rc/global-assign/global + local.tee $1 + i32.ne + if + local.get $1 + if + local.get $1 + call $gc/rc/_dummy/__ref_release + end + local.get $0 + call $gc/rc/_dummy/__ref_retain + end + local.get $0 + global.set $gc/rc/global-assign/global + global.get $gc/rc/_dummy/register_count + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 20 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 21 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-assign/global + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 22 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 23 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/release_ref + global.get $gc/rc/global-assign/globalRef + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 24 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $gc/rc/global-assign/main (; 9 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/rc/global-assign + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 10 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/rc/global-assign.ts b/tests/compiler/gc/rc/global-assign.ts new file mode 100644 index 0000000000..6fb0bb400c --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.ts @@ -0,0 +1,24 @@ +import "allocator/arena"; +import { register_count, retain_count, retain_ref, release_count, release_ref } from "./_dummy"; + +@start export function main(): void {} + +class Ref {} + +// should register and retain + +var global: Ref = new Ref(); +var globalRef = changetype(global); +assert(register_count == 1); +assert(retain_count == 1); +assert(retain_ref == globalRef); +assert(release_count == 0); + +// should register, release old and retain new + +global = new Ref(); +assert(register_count == 2); +assert(retain_count == 2); +assert(retain_ref == changetype(global)); +assert(release_count == 1); +assert(release_ref == globalRef); diff --git a/tests/compiler/gc/rc/global-assign.untouched.wat b/tests/compiler/gc/rc/global-assign.untouched.wat new file mode 100644 index 0000000000..e7c7619ca2 --- /dev/null +++ b/tests/compiler/gc/rc/global-assign.untouched.wat @@ -0,0 +1,421 @@ +(module + (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$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") + (data (i32.const 144) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00a\00s\00s\00i\00g\00n\00.\00t\00s\00") + (data (i32.const 208) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00l\00e\00a\00s\00e\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/rc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) + (global $~lib/util/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/util/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)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 244)) + (export "memory" (memory $0)) + (export "main" (func $gc/rc/global-assign/main)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (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/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $gc/rc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/register_count + local.get $0 + global.set $gc/rc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/rc/_dummy/__ref_register + local.get $0 + ) + (func $gc/rc/global-assign/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $gc/rc/_dummy/__ref_retain (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 120 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/retain_count + local.get $0 + global.set $gc/rc/_dummy/retain_ref + ) + (func $gc/rc/_dummy/__ref_release (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 224 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/release_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/release_count + local.get $0 + global.set $gc/rc/_dummy/release_ref + ) + (func $start:gc/rc/global-assign (; 11 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + 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 + block (result i32) + i32.const 0 + call $gc/rc/global-assign/Ref#constructor + local.set $0 + local.get $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + end + global.set $gc/rc/global-assign/global + global.get $gc/rc/global-assign/global + global.set $gc/rc/global-assign/globalRef + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-assign/globalRef + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 14 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 15 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $gc/rc/global-assign/Ref#constructor + local.tee $0 + global.get $gc/rc/global-assign/global + local.tee $1 + i32.ne + if (result i32) + local.get $1 + if + local.get $1 + call $gc/rc/_dummy/__ref_release + end + local.get $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + else + local.get $0 + end + global.set $gc/rc/global-assign/global + global.get $gc/rc/_dummy/register_count + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 20 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 21 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-assign/global + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 22 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 23 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/release_ref + global.get $gc/rc/global-assign/globalRef + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 24 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $gc/rc/global-assign/main (; 12 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 13 ;) (type $FUNCSIG$v) + call $start:gc/rc/global-assign + ) + (func $null (; 14 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/gc/rc/global-init.json b/tests/compiler/gc/rc/global-init.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/gc/rc/global-init.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ 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 new file mode 100644 index 0000000000..8d6c4f0587 --- /dev/null +++ b/tests/compiler/gc/rc/global-init.optimized.wat @@ -0,0 +1,248 @@ +(module + (type $FUNCSIG$ii (func (param 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)) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\10\00\00\00\12") + (data (i32.const 120) "g\00c\00.\00r\00e\00t\00a\00i\00n") + (data (i32.const 144) "\10\00\00\00(") + (data (i32.const 160) "g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s") + (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_count (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 $gc/rc/global-init/global (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $gc/rc/global-init/main)) + (func $~lib/allocator/arena/__mem_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/util/runtime/allocate (; 3 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 16 + i32.add + ) + (func $gc/rc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/register_count + local.get $0 + global.set $gc/rc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 200 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 17 + i32.store + local.get $0 + call $gc/rc/_dummy/__ref_register + local.get $0 + ) + (func $gc/rc/_dummy/__ref_retain (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 120 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/retain_count + local.get $0 + global.set $gc/rc/_dummy/retain_ref + ) + (func $start:gc/rc/global-init (; 7 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 200 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/util/runtime/allocate + call $~lib/util/runtime/register + local.tee $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + global.set $gc/rc/global-init/global + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 11 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-init/global + i32.ne + if + i32.const 0 + i32.const 160 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + if + i32.const 0 + i32.const 160 + i32.const 14 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $gc/rc/global-init/main (; 8 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:gc/rc/global-init + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 9 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/gc/rc/global-init.ts b/tests/compiler/gc/rc/global-init.ts new file mode 100644 index 0000000000..46c36ba565 --- /dev/null +++ b/tests/compiler/gc/rc/global-init.ts @@ -0,0 +1,14 @@ +import "allocator/arena"; +import { register_count, retain_count, retain_ref, release_count } from "./_dummy"; + +@start export function main(): void {} + +class Ref {} + +// should register and retain, with nothing to release + +var global = new Ref(); +assert(register_count == 1); +assert(retain_count == 1); +assert(retain_ref == changetype(global)); +assert(release_count == 0); diff --git a/tests/compiler/gc/rc/global-init.untouched.wat b/tests/compiler/gc/rc/global-init.untouched.wat new file mode 100644 index 0000000000..861cf46bf3 --- /dev/null +++ b/tests/compiler/gc/rc/global-init.untouched.wat @@ -0,0 +1,320 @@ +(module + (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$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00t\00a\00i\00n\00") + (data (i32.const 144) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00g\00c\00/\00r\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/rc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/retain_ref (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_count (mut i32) (i32.const 0)) + (global $gc/rc/_dummy/release_ref (mut i32) (i32.const 0)) + (global $~lib/util/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/util/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)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 200)) + (export "memory" (memory $0)) + (export "main" (func $gc/rc/global-init/main)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (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/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $gc/rc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/register_count + local.get $0 + global.set $gc/rc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/rc/_dummy/__ref_register + local.get $0 + ) + (func $gc/rc/global-init/Ref#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $gc/rc/_dummy/__ref_retain (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 120 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.add + global.set $gc/rc/_dummy/retain_count + local.get $0 + global.set $gc/rc/_dummy/retain_ref + ) + (func $start:gc/rc/global-init (; 10 ;) (type $FUNCSIG$v) + (local $0 i32) + 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 + block (result i32) + i32.const 0 + call $gc/rc/global-init/Ref#constructor + local.set $0 + local.get $0 + call $gc/rc/_dummy/__ref_retain + local.get $0 + end + global.set $gc/rc/global-init/global + global.get $gc/rc/_dummy/register_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 11 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_count + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/retain_ref + global.get $gc/rc/global-init/global + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $gc/rc/_dummy/release_count + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 14 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $gc/rc/global-init/main (; 11 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 12 ;) (type $FUNCSIG$v) + call $start:gc/rc/global-init + ) + (func $null (; 13 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/getter-call.json b/tests/compiler/getter-call.json new file mode 100644 index 0000000000..b1da366ff4 --- /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 e8a68bcf42..aa1c104a2e 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -1,28 +1,44 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (memory $0 0) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (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 $0 - i32.const 8 + 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 $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -30,8 +46,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -57,28 +73,72 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/util/runtime/register (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 64 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 17 + i32.store local.get $0 ) - (func $getter-call/C#get:x~anonymous|0 (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/C#get:x~anonymous|0 (; 3 ;) (type $FUNCSIG$i) (result i32) i32.const 42 ) - (func $getter-call/test (; 2 ;) (type $FUNCSIG$i) (result i32) - call $~lib/allocator/arena/__memory_allocate + (func $getter-call/test (; 4 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add + call $~lib/util/runtime/register drop i32.const 0 global.set $~lib/argc - i32.const 1 - call_indirect (type $FUNCSIG$i) + call $getter-call/C#get:x~anonymous|0 ) - (func $start (; 3 ;) (type $FUNCSIG$v) - i32.const 8 + (func $start (; 5 ;) (type $FUNCSIG$v) + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 6 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index a275537b5e..9870e0b2d8 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -1,34 +1,37 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (memory $0 0) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0) + (global $~lib/util/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/util/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 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $getter-call/test)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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:getter-call (; 1 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -109,26 +112,80 @@ ) (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $getter-call/C#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $getter-call/C#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $getter-call/C#get:x~anonymous|0 (; 5 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/C#get:x~anonymous|0 (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 42 ) - (func $getter-call/C#get:x (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $getter-call/C#get:x (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 ) - (func $getter-call/test (; 7 ;) (type $FUNCSIG$i) (result i32) + (func $getter-call/test (; 9 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 0 call $getter-call/C#constructor @@ -139,9 +196,18 @@ call $getter-call/C#get:x call_indirect (type $FUNCSIG$i) ) - (func $start (; 8 ;) (type $FUNCSIG$v) - call $start:getter-call + (func $start (; 10 ;) (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 $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/getter-setter.json b/tests/compiler/getter-setter.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/getter-setter.optimized.wat b/tests/compiler/getter-setter.optimized.wat index 4cd6c0de5b..913fab817b 100644 --- a/tests/compiler/getter-setter.optimized.wat +++ b/tests/compiler/getter-setter.optimized.wat @@ -1,23 +1,21 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:getter-setter (; 1 ;) (type $FUNCSIG$v) global.get $getter-setter/Foo._bar if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -27,10 +25,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -40,10 +38,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/getter-setter.untouched.wat b/tests/compiler/getter-setter.untouched.wat index a2b8434942..f72e11e21d 100644 --- a/tests/compiler/getter-setter.untouched.wat +++ b/tests/compiler/getter-setter.untouched.wat @@ -3,15 +3,13 @@ (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))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $getter-setter/Foo.bar.get:bar (; 1 ;) (type $FUNCSIG$i) (result i32) global.get $getter-setter/Foo._bar @@ -27,10 +25,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -41,10 +39,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -57,10 +55,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/i64-polyfill.json b/tests/compiler/i64-polyfill.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/i64-polyfill.optimized.wat b/tests/compiler/i64-polyfill.optimized.wat index 4a46ba16d3..ebf36e83cf 100644 --- a/tests/compiler/i64-polyfill.optimized.wat +++ b/tests/compiler/i64-polyfill.optimized.wat @@ -4,12 +4,9 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $../../examples/i64-polyfill/assembly/i64/lo (mut i32) (i32.const 0)) (global $../../examples/i64-polyfill/assembly/i64/hi (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getHi" (func $../../examples/i64-polyfill/assembly/i64/getHi)) (export "getLo" (func $../../examples/i64-polyfill/assembly/i64/getLo)) (export "clz" (func $../../examples/i64-polyfill/assembly/i64/clz)) diff --git a/tests/compiler/i64-polyfill.untouched.wat b/tests/compiler/i64-polyfill.untouched.wat index 429af491ce..f1c2ca5885 100644 --- a/tests/compiler/i64-polyfill.untouched.wat +++ b/tests/compiler/i64-polyfill.untouched.wat @@ -8,9 +8,7 @@ (elem (i32.const 0) $null) (global $../../examples/i64-polyfill/assembly/i64/lo (mut i32) (i32.const 0)) (global $../../examples/i64-polyfill/assembly/i64/hi (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getHi" (func $../../examples/i64-polyfill/assembly/i64/getHi)) (export "getLo" (func $../../examples/i64-polyfill/assembly/i64/getLo)) (export "clz" (func $../../examples/i64-polyfill/assembly/i64/clz)) diff --git a/tests/compiler/if.json b/tests/compiler/if.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/if.optimized.wat b/tests/compiler/if.optimized.wat index 45e0fc4136..d2091eb409 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -2,13 +2,11 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\n") + (data (i32.const 24) "i\00f\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (export "ifThenElse" (func $if/ifThenElse)) (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElse)) @@ -33,10 +31,10 @@ i32.const 1 else i32.const 0 - i32.const 8 + i32.const 24 i32.const 37 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/if.untouched.wat b/tests/compiler/if.untouched.wat index 689321a103..38af3f87b8 100644 --- a/tests/compiler/if.untouched.wat +++ b/tests/compiler/if.untouched.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00i\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 24)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "ifThenElse" (func $if/ifThenElse)) (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElseBlock)) @@ -55,10 +53,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -68,10 +66,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -81,10 +79,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -94,10 +92,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -107,10 +105,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -120,10 +118,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -134,10 +132,10 @@ return else i32.const 0 - i32.const 8 + i32.const 24 i32.const 37 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable diff --git a/tests/compiler/import.json b/tests/compiler/import.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/import.optimized.wat b/tests/compiler/import.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/import.optimized.wat +++ b/tests/compiler/import.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/import.untouched.wat b/tests/compiler/import.untouched.wat index ddade6dbc1..58a39afa2d 100644 --- a/tests/compiler/import.untouched.wat +++ b/tests/compiler/import.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $export/add (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 diff --git a/tests/compiler/infer-type.json b/tests/compiler/infer-type.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/infer-type.optimized.wat b/tests/compiler/infer-type.optimized.wat index 1f64441e8e..73fe1d5615 100644 --- a/tests/compiler/infer-type.optimized.wat +++ b/tests/compiler/infer-type.optimized.wat @@ -1,15 +1,13 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") (global $infer-type/ri (mut i32) (i32.const 0)) (global $infer-type/rI (mut i64) (i64.const 0)) (global $infer-type/rf (mut f32) (f32.const 0)) (global $infer-type/rF (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:infer-type (; 0 ;) (type $FUNCSIG$v) (local $0 i32) diff --git a/tests/compiler/infer-type.untouched.wat b/tests/compiler/infer-type.untouched.wat index 10490e5e4f..d5bed29cd4 100644 --- a/tests/compiler/infer-type.untouched.wat +++ b/tests/compiler/infer-type.untouched.wat @@ -5,9 +5,9 @@ (type $FUNCSIG$f (func (result f32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $infer-type/i i32 (i32.const 10)) @@ -19,9 +19,7 @@ (global $infer-type/rF (mut f64) (f64.const 0)) (global $infer-type/inferi (mut i32) (i32.const -2147483648)) (global $infer-type/inferu (mut i32) (i32.const 2147483647)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $infer-type/locals (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -109,20 +107,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/inlining-blocklocals.json b/tests/compiler/inlining-blocklocals.json new file mode 100644 index 0000000000..b1da366ff4 --- /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-blocklocals.optimized.wat b/tests/compiler/inlining-blocklocals.optimized.wat new file mode 100644 index 0000000000..2720b80de0 --- /dev/null +++ b/tests/compiler/inlining-blocklocals.optimized.wat @@ -0,0 +1,53 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00.") + (data (i32.const 24) "i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s") + (global $inlining-blocklocals/b (mut i32) (i32.const 2)) + (global $inlining-blocklocals/theCall_a (mut i32) (i32.const 0)) + (global $inlining-blocklocals/theCall_b (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (start $start) + (func $inlining-blocklocals/test (; 1 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $inlining-blocklocals/b + local.tee $0 + i32.const 1 + i32.add + global.set $inlining-blocklocals/b + i32.const 1 + global.set $inlining-blocklocals/theCall_a + local.get $0 + global.set $inlining-blocklocals/theCall_b + global.get $inlining-blocklocals/theCall_a + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 16 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $inlining-blocklocals/theCall_b + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 17 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start (; 2 ;) (type $FUNCSIG$v) + call $inlining-blocklocals/test + ) + (func $null (; 3 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/inlining-blocklocals.ts b/tests/compiler/inlining-blocklocals.ts new file mode 100644 index 0000000000..b03de78e63 --- /dev/null +++ b/tests/compiler/inlining-blocklocals.ts @@ -0,0 +1,19 @@ +var b: i32 = 2; + +var theCall_a: i32; +var theCall_b: i32; + +@inline function theCall(a: i32, b: i32): void { + theCall_a = a; + theCall_b = b; +} + +function test(): void { + var a = 1; + // no blocking: t1 = a; t2 = (t1 = b) + 1, t1; theCall ✖ + // blocking: t1 = a; t2 = (t3 = b) + 1, t3; theCall ✔ + theCall(a, b++); + assert(theCall_a == 1); + assert(theCall_b == 2); +} +test(); diff --git a/tests/compiler/inlining-blocklocals.untouched.wat b/tests/compiler/inlining-blocklocals.untouched.wat new file mode 100644 index 0000000000..4c3525983d --- /dev/null +++ b/tests/compiler/inlining-blocklocals.untouched.wat @@ -0,0 +1,71 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00.\00\00\00\00\00\00\00\00\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00-\00b\00l\00o\00c\00k\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $inlining-blocklocals/b (mut i32) (i32.const 2)) + (global $inlining-blocklocals/theCall_a (mut i32) (i32.const 0)) + (global $inlining-blocklocals/theCall_b (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (start $start) + (func $inlining-blocklocals/test (; 1 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + local.set $0 + block $inlining-blocklocals/theCall|inlined.0 + local.get $0 + local.set $2 + block (result i32) + global.get $inlining-blocklocals/b + local.tee $3 + i32.const 1 + i32.add + global.set $inlining-blocklocals/b + local.get $3 + end + local.set $1 + local.get $2 + global.set $inlining-blocklocals/theCall_a + local.get $1 + global.set $inlining-blocklocals/theCall_b + end + global.get $inlining-blocklocals/theCall_a + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 16 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $inlining-blocklocals/theCall_b + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 17 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:inlining-blocklocals (; 2 ;) (type $FUNCSIG$v) + call $inlining-blocklocals/test + ) + (func $start (; 3 ;) (type $FUNCSIG$v) + call $start:inlining-blocklocals + ) + (func $null (; 4 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/inlining-recursive.json b/tests/compiler/inlining-recursive.json new file mode 100644 index 0000000000..b1da366ff4 --- /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-recursive.optimized.wat b/tests/compiler/inlining-recursive.optimized.wat index ae83157f80..d75cc7c9bd 100644 --- a/tests/compiler/inlining-recursive.optimized.wat +++ b/tests/compiler/inlining-recursive.optimized.wat @@ -1,10 +1,7 @@ (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)) (export "foo" (func $inlining-recursive/foo)) (export "bar" (func $inlining-recursive/baz)) (export "baz" (func $inlining-recursive/baz)) diff --git a/tests/compiler/inlining-recursive.untouched.wat b/tests/compiler/inlining-recursive.untouched.wat index 89e671958e..c8f5c4fa9d 100644 --- a/tests/compiler/inlining-recursive.untouched.wat +++ b/tests/compiler/inlining-recursive.untouched.wat @@ -3,9 +3,7 @@ (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)) (export "foo" (func $inlining-recursive/foo)) (export "bar" (func $inlining-recursive/bar)) (export "baz" (func $inlining-recursive/baz)) diff --git a/tests/compiler/inlining.json b/tests/compiler/inlining.json new file mode 100644 index 0000000000..b1da366ff4 --- /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 338feffb9c..3d3c6a99f0 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -3,16 +3,19 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") + (data (i32.const 48) "\10\00\00\00(") + (data (i32.const 64) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $~lib/argc (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)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $inlining/test)) (start $start) (func $inlining/test (; 1 ;) (type $FUNCSIG$i) (result i32) @@ -25,20 +28,19 @@ i32.const 1 global.set $~lib/argc i32.const 2 - i32.const 1 - call_indirect (type $FUNCSIG$ii) + call $inlining/func_fe~anonymous|0 i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 68 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -100,15 +102,73 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $inlining/test_ctor (; 5 ;) (type $FUNCSIG$v) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 104 + i32.le_u + if + i32.const 0 + i32.const 64 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $inlining/test_ctor (; 7 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 16 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register local.tee $0 i32.eqz if i32.const 8 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -135,10 +195,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 97 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -147,10 +207,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 98 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -159,10 +219,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 99 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -171,22 +231,22 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 100 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 6 ;) (type $FUNCSIG$v) + (func $start (; 8 ;) (type $FUNCSIG$v) call $inlining/test_funcs - i32.const 40 + i32.const 104 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $inlining/test_ctor ) - (func $null (; 7 ;) (type $FUNCSIG$v) + (func $null (; 9 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 39dc34d745..b6b2b2e32a 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -3,18 +3,22 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 2 funcref) (elem (i32.const 0) $null $inlining/func_fe~anonymous|0) (global $inlining/constantGlobal i32 (i32.const 1)) (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/util/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/memory/HEAP_BASE i32 (i32.const 36)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 104)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "test" (func $inlining/test)) (start $start) (func $inlining/test (; 1 ;) (type $FUNCSIG$i) (result i32) @@ -62,10 +66,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii|inlined.1 (result i32) @@ -92,10 +96,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii|inlined.2 (result i32) @@ -122,10 +126,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii_opt|inlined.0 (result i32) @@ -138,10 +142,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii_opt|inlined.1 (result i32) @@ -154,10 +158,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii_loc|inlined.0 (result i32) @@ -180,10 +184,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_ii_loc|inlined.1 (result i32) @@ -206,10 +210,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/func_iv|inlined.0 @@ -230,19 +234,19 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 68 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $inlining/Foo.method_static|inlined.0 (result i32) i32.const 42 - local.set $2 - i32.const 2 local.set $3 - local.get $2 + i32.const 2 + local.set $2 local.get $3 + local.get $2 i32.add end i32.const 44 @@ -250,48 +254,48 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123 local.set $7 block $inlining/Foo#method_this|inlined.0 (result i32) local.get $7 - local.set $3 + local.set $4 i32.const 43 - local.set $2 + local.set $3 i32.const 3 - local.set $4 - local.get $3 + local.set $2 + local.get $4 end i32.const 123 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start:~lib/allocator/arena (; 4 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -372,10 +376,62 @@ ) (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $inlining/test_ctor (; 7 ;) (type $FUNCSIG$v) + (func $~lib/util/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/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 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $inlining/test_ctor (; 9 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -383,51 +439,55 @@ (local $4 i32) block $inlining/Bar#constructor|inlined.0 (result i32) i32.const 0 - local.set $0 - i32.const 4 local.set $1 + i32.const 4 + local.set $0 block $inlining/Baz#constructor|inlined.0 (result i32) - local.get $0 + local.get $1 if (result i32) - local.get $0 + local.get $1 else i32.const 16 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register end - local.set $2 - i32.const 2 local.set $3 + i32.const 2 + local.set $2 block (result i32) - local.get $2 + local.get $3 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate - local.set $2 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.set $3 end - local.get $2 + local.get $3 i32.const 1 i32.store - local.get $2 + local.get $3 i32.const 0 i32.store offset=4 - local.get $2 + local.get $3 end - local.get $3 - i32.store offset=4 local.get $2 + i32.store offset=4 + local.get $3 end - local.set $0 - local.get $0 + local.set $1 + local.get $1 i32.const 3 i32.store offset=8 - local.get $0 + local.get $1 i32.const 0 i32.store offset=12 - local.get $0 local.get $1 - i32.store offset=12 local.get $0 + i32.store offset=12 + local.get $1 end local.set $4 local.get $4 @@ -437,10 +497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 97 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -450,10 +510,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 98 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -463,10 +523,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 99 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -476,33 +536,42 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 100 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start:inlining (; 8 ;) (type $FUNCSIG$v) + (func $start:inlining (; 10 ;) (type $FUNCSIG$v) call $inlining/test i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $inlining/test_funcs - call $start:~lib/allocator/arena + 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 call $inlining/test_ctor ) - (func $start (; 9 ;) (type $FUNCSIG$v) + (func $start (; 11 ;) (type $FUNCSIG$v) call $start:inlining ) - (func $null (; 10 ;) (type $FUNCSIG$v) + (func $null (; 12 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/instanceof.json b/tests/compiler/instanceof.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/instanceof.optimized.wat b/tests/compiler/instanceof.optimized.wat index e49cba3a51..58056cd07a 100644 --- a/tests/compiler/instanceof.optimized.wat +++ b/tests/compiler/instanceof.optimized.wat @@ -1,23 +1,21 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") (global $instanceof/an (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:instanceof (; 1 ;) (type $FUNCSIG$v) global.get $instanceof/an if i32.const 0 - i32.const 8 + i32.const 24 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -26,10 +24,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/instanceof.ts b/tests/compiler/instanceof.ts index 64d96b039c..b5b103294e 100644 --- a/tests/compiler/instanceof.ts +++ b/tests/compiler/instanceof.ts @@ -15,7 +15,7 @@ assert(!(I instanceof A)); assert(!(f instanceof A)); assert(!(F instanceof A)); -assert(!(a instanceof B)); +// assert(!(a instanceof B)); // dynamic upcast, checked in runtime/instanceof assert( b instanceof B ); assert(!(i instanceof B)); assert(!(I instanceof B)); diff --git a/tests/compiler/instanceof.untouched.wat b/tests/compiler/instanceof.untouched.wat index 8dd1d677ea..964e5f12ce 100644 --- a/tests/compiler/instanceof.untouched.wat +++ b/tests/compiler/instanceof.untouched.wat @@ -3,9 +3,9 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $instanceof/a (mut i32) (i32.const 0)) @@ -15,414 +15,589 @@ (global $instanceof/f (mut f32) (f32.const 0)) (global $instanceof/F (mut f64) (f64.const 0)) (global $instanceof/an (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $instanceof/isI32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - return + block (result i32) + local.get $0 + drop + i32.const 1 + end + if + i32.const 1 + return + else + i32.const 0 + return + end + unreachable + unreachable ) (func $instanceof/isI32 (; 2 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - i32.const 0 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + else + i32.const 0 + return + end + unreachable + unreachable ) (func $instanceof/isI32 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + else + i32.const 0 + return + end + unreachable + unreachable ) (func $instanceof/isI32 (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + else + i32.const 0 + return + end + unreachable + unreachable ) (func $start:instanceof (; 5 ;) (type $FUNCSIG$v) - i32.const 1 + block (result i32) + global.get $instanceof/a + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/b + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 - i32.eqz - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 16 + block (result i32) + global.get $instanceof/F + drop i32.const 0 - call $~lib/env/abort - unreachable end - i32.const 0 i32.eqz i32.eqz if i32.const 0 - i32.const 8 - i32.const 18 + i32.const 24 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/b + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/F + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/a + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/b + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/i + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/F + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/a + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/b + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/I + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/F + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/a + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/b + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/f + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/F + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/a + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/b + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/i + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/I + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 + block (result i32) + global.get $instanceof/f + drop + i32.const 0 + end i32.eqz i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/F + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -430,10 +605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -442,10 +617,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -454,10 +629,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -466,10 +641,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $instanceof/an @@ -479,20 +654,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/an + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -503,20 +682,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 + block (result i32) + global.get $instanceof/an + drop + i32.const 1 + end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/limits.json b/tests/compiler/limits.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/limits.optimized.wat b/tests/compiler/limits.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/limits.optimized.wat +++ b/tests/compiler/limits.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/limits.untouched.wat b/tests/compiler/limits.untouched.wat index 16d076f1f4..73017341a9 100644 --- a/tests/compiler/limits.untouched.wat +++ b/tests/compiler/limits.untouched.wat @@ -29,9 +29,7 @@ (global $~lib/builtins/f32.MAX_SAFE_INTEGER f32 (f32.const 16777215)) (global $~lib/builtins/f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:limits (; 0 ;) (type $FUNCSIG$v) global.get $~lib/builtins/i8.MIN_VALUE diff --git a/tests/compiler/literals.json b/tests/compiler/literals.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/literals.optimized.wat b/tests/compiler/literals.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/literals.optimized.wat +++ b/tests/compiler/literals.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/literals.untouched.wat b/tests/compiler/literals.untouched.wat index c40324953e..947b448255 100644 --- a/tests/compiler/literals.untouched.wat +++ b/tests/compiler/literals.untouched.wat @@ -3,9 +3,7 @@ (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)) (start $start) (func $start:literals (; 0 ;) (type $FUNCSIG$v) i32.const 0 diff --git a/tests/compiler/logical.json b/tests/compiler/logical.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 62d8c41c95..f6f188bfe2 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -1,17 +1,15 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\14") + (data (i32.const 24) "l\00o\00g\00i\00c\00a\00l\00.\00t\00s") (global $logical/i (mut i32) (i32.const 0)) (global $logical/I (mut i64) (i64.const 0)) (global $logical/f (mut f32) (f32.const 0)) (global $logical/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:logical (; 1 ;) (type $FUNCSIG$v) i32.const 2 @@ -21,10 +19,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -34,10 +32,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47,10 +45,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -60,10 +58,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -73,10 +71,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -86,10 +84,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -99,10 +97,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -112,10 +110,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index bd2d5637f6..0433ecb625 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -1,22 +1,18 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $logical/i (mut i32) (i32.const 0)) (global $logical/I (mut i64) (i64.const 0)) (global $logical/f (mut f32) (f32.const 0)) (global $logical/F (mut f64) (f64.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:logical (; 1 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 f64) i32.const 0 if (result i32) unreachable @@ -27,10 +23,12 @@ f64.const 0 f64.const 0 f64.ne - if (result f64) + if (result i32) unreachable - else f64.const 0 + unreachable + else + i32.const 0 end drop i32.const 1 @@ -43,10 +41,12 @@ f64.const 1 f64.const 0 f64.ne - if (result f64) - f64.const 1 + if (result i32) + i32.const 1 else unreachable + f64.const 0 + unreachable end drop i32.const 1 @@ -55,9 +55,8 @@ else i32.const 1 end - local.tee $0 if (result i32) - local.get $0 + i32.const 1 else unreachable end @@ -70,13 +69,14 @@ else f64.const 1 end - local.tee $1 f64.const 0 f64.ne - if (result f64) - local.get $1 + if (result i32) + i32.const 1 else unreachable + f64.const 0 + unreachable end drop i32.const 1 @@ -92,10 +92,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -111,10 +111,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -132,10 +132,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -153,10 +153,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -174,10 +174,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -195,10 +195,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -216,10 +216,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -237,10 +237,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/main.json b/tests/compiler/main.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/main.optimized.wat b/tests/compiler/main.optimized.wat index 4316755194..069143d90d 100644 --- a/tests/compiler/main.optimized.wat +++ b/tests/compiler/main.optimized.wat @@ -2,12 +2,9 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $main/code (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $main/main)) (func $main/main (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) global.get $~lib/started diff --git a/tests/compiler/main.untouched.wat b/tests/compiler/main.untouched.wat index 1483eb58c4..b232da54c7 100644 --- a/tests/compiler/main.untouched.wat +++ b/tests/compiler/main.untouched.wat @@ -6,9 +6,7 @@ (elem (i32.const 0) $null) (global $main/code (mut i32) (i32.const 0)) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $main/main)) (func $start:main (; 0 ;) (type $FUNCSIG$v) i32.const 1 diff --git a/tests/compiler/mandelbrot.json b/tests/compiler/mandelbrot.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index b94c86ea2a..cdf7d77443 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -3,39 +3,33 @@ (type $FUNCSIG$dd (func (param f64) (result f64))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "computeLine" (func $../../examples/mandelbrot/assembly/index/computeLine)) (func $~lib/math/NativeMath.log (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $5 i32) + (local $6 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u - local.tee $1 - i32.eqz - if - local.get $2 + if (result i32) + i32.const 1 + else + local.get $1 i32.const 31 i32.shr_u - local.set $1 end - local.get $1 if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.const 0 @@ -48,7 +42,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -60,18 +54,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if @@ -79,28 +73,25 @@ return else local.get $2 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $1 i32.const 1072693248 i32.eq - local.tee $1 - if - local.get $3 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $1 - end - local.get $1 + select if f64.const 0 return end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add local.tee $1 @@ -115,26 +106,26 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $4 + local.tee $3 f64.const 2 - local.get $4 + local.get $3 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 f64.mul local.set $0 - local.get $5 - f64.const 0.5 local.get $4 + f64.const 0.5 + local.get $3 f64.mul - local.get $4 + local.get $3 f64.mul - local.tee $5 - local.get $7 + local.tee $4 + local.get $6 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -168,16 +159,16 @@ i32.shr_s i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $5 - f64.sub local.get $4 + f64.sub + local.get $3 f64.add local.get $0 f64.const 0.6931471803691238 @@ -187,32 +178,29 @@ (func $~lib/math/NativeMath.log2 (; 1 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 f64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -225,7 +213,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -237,18 +225,18 @@ return end i32.const -54 - local.set $7 + local.set $6 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -256,28 +244,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -297,12 +282,12 @@ local.get $1 f64.add f64.div + local.tee $4 + local.get $4 + f64.mul local.tee $5 local.get $5 f64.mul - local.tee $6 - local.get $6 - f64.mul local.set $0 local.get $1 local.get $1 @@ -317,13 +302,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $7 f64.sub local.get $1 f64.sub - local.get $5 + local.get $4 local.get $1 - local.get $6 + local.get $5 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -359,18 +344,18 @@ i32.shr_u i32.const 1023 i32.sub - local.get $7 + local.get $6 i32.add f64.convert_i32_s - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 1.4426950407214463 f64.mul - local.tee $6 + local.tee $5 f64.add local.set $1 local.get $0 - local.get $8 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -378,10 +363,10 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $5 + local.get $4 local.get $1 f64.sub - local.get $6 + local.get $5 f64.add f64.add local.get $1 @@ -392,81 +377,84 @@ (local $5 f64) (local $6 f64) (local $7 i32) - (local $8 f64) + (local $8 i32) (local $9 f64) (local $10 f64) (local $11 f64) (local $12 f64) (local $13 f64) (local $14 f64) - f64.const 10 - f64.const 3 + (local $15 f64) local.get $1 f64.convert_i32_u - local.tee $4 + local.tee $9 + f64.const 0.625 f64.mul - f64.const 4 + local.set $4 + local.get $0 + f64.convert_i32_u local.get $2 f64.convert_i32_u local.tee $6 - f64.mul - f64.min - f64.div - local.set $8 - local.get $0 - f64.convert_i32_u - local.get $6 f64.const 0.5 f64.mul f64.sub - local.get $8 + f64.const 10 + f64.const 3 + local.get $9 f64.mul - local.set $9 - local.get $4 - f64.const 0.625 + f64.const 4 + local.get $6 f64.mul - local.get $8 + f64.min + f64.div + local.tee $10 f64.mul local.set $11 + local.get $4 + local.get $10 + f64.mul + local.set $13 local.get $0 local.get $1 i32.mul i32.const 1 i32.shl - local.set $2 + local.set $0 f64.const 1 local.get $3 f64.convert_i32_u local.tee $6 f64.div - local.set $12 + local.set $14 f64.const 8 local.get $6 f64.min - local.set $13 + local.set $15 loop $repeat|0 - local.get $7 - local.get $1 - i32.lt_u - if - local.get $7 - f64.convert_i32_u + block $break|0 + local.get $8 + local.get $1 + i32.ge_u + br_if $break|0 local.get $8 + f64.convert_i32_u + local.get $10 f64.mul - local.get $11 + local.get $13 f64.sub - local.set $10 + local.set $12 f64.const 0 local.set $4 f64.const 0 local.set $5 i32.const 0 - local.set $0 + local.set $7 loop $continue|1 local.get $4 local.get $4 f64.mul - local.tee $14 + local.tee $9 local.get $5 local.get $5 f64.mul @@ -481,31 +469,31 @@ f64.mul local.get $5 f64.mul - local.get $9 + local.get $11 f64.add local.set $5 - local.get $14 + local.get $9 local.get $6 f64.sub - local.get $10 + local.get $12 f64.add local.set $4 - local.get $0 + local.get $7 local.get $3 i32.ge_u br_if $break|1 - local.get $0 + local.get $7 i32.const 1 i32.add - local.set $0 + local.set $7 br $continue|1 end end end loop $continue|2 - local.get $0 + local.get $7 f64.convert_i32_u - local.get $13 + local.get $15 f64.lt if local.get $4 @@ -515,7 +503,7 @@ local.get $5 f64.mul f64.sub - local.get $10 + local.get $12 f64.add local.set $6 f64.const 2 @@ -523,22 +511,24 @@ f64.mul local.get $5 f64.mul - local.get $9 + local.get $11 f64.add local.set $5 local.get $6 local.set $4 - local.get $0 + local.get $7 i32.const 1 i32.add - local.set $0 + local.set $7 br $continue|2 end end - local.get $7 + i32.const 2047 + local.set $2 + local.get $8 i32.const 1 i32.shl - local.get $2 + local.get $0 i32.add local.get $4 local.get $4 @@ -552,7 +542,7 @@ f64.gt if (result i32) f64.const 2047 - local.get $0 + local.get $7 i32.const 1 i32.add f64.convert_i32_u @@ -562,7 +552,7 @@ f64.mul call $~lib/math/NativeMath.log2 f64.sub - local.get $12 + local.get $14 f64.mul f64.const 0 f64.max @@ -574,10 +564,10 @@ i32.const 2047 end i32.store16 - local.get $7 + local.get $8 i32.const 1 i32.add - local.set $7 + local.set $8 br $repeat|0 end end diff --git a/tests/compiler/mandelbrot.untouched.wat b/tests/compiler/mandelbrot.untouched.wat index 6ba4f0f28f..5222f085fb 100644 --- a/tests/compiler/mandelbrot.untouched.wat +++ b/tests/compiler/mandelbrot.untouched.wat @@ -1,21 +1,18 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (type $FUNCSIG$dddd (func (param f64 f64 f64) (result f64))) (type $FUNCSIG$v (func)) (memory $0 0) (table $0 1 funcref) (elem (i32.const 0) $null) (global $../../examples/mandelbrot/assembly/index/NUM_COLORS i32 (i32.const 2048)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "computeLine" (func $../../examples/mandelbrot/assembly/index/computeLine)) (func $~lib/math/NativeMath.log (; 0 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -23,8 +20,7 @@ (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) - (local $13 i32) + (local $12 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -38,9 +34,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -98,7 +93,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -106,7 +100,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -149,46 +143,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -197,28 +191,28 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 local.get $3 - local.set $13 - local.get $7 + local.set $12 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul - local.get $13 + local.get $12 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $6 - f64.sub local.get $5 + f64.sub + local.get $4 f64.add - local.get $13 + local.get $12 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul @@ -228,7 +222,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -241,7 +235,6 @@ (local $14 f64) (local $15 f64) (local $16 f64) - (local $17 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -255,9 +248,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -315,7 +307,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -323,7 +314,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -366,46 +357,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -414,16 +405,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -432,62 +423,55 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 1.4426950407214463 f64.mul - local.set $15 - local.get $14 + local.set $14 local.get $13 + local.get $12 f64.add f64.const 1.6751713164886512e-10 f64.mul - local.get $14 + local.get $13 f64.const 1.4426950407214463 f64.mul f64.add - local.set $16 + local.set $15 local.get $3 f64.convert_i32_s - local.set $17 - local.get $17 - local.get $15 + local.set $16 + local.get $16 + local.get $14 f64.add - local.set $9 + local.set $8 + local.get $15 local.get $16 - local.get $17 - local.get $9 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $16 - local.get $9 local.set $15 - local.get $16 + local.get $8 + local.set $14 local.get $15 + local.get $14 f64.add ) - (func $../../examples/mandelbrot/assembly/index/clamp (; 2 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - local.get $0 - local.get $1 - f64.max - local.get $2 - f64.min - ) - (func $../../examples/mandelbrot/assembly/index/computeLine (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $../../examples/mandelbrot/assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -506,6 +490,9 @@ (local $19 f64) (local $20 i32) (local $21 f64) + (local $22 f64) + (local $23 f64) + (local $24 f64) local.get $1 f64.convert_i32_u f64.const 1 @@ -689,17 +676,26 @@ i32.const 1 i32.sub f64.convert_i32_s - local.get $18 - i32.const 1 - i32.add - f64.convert_i32_u - local.get $21 - f64.sub - local.get $10 - f64.mul - f64.const 0 - f64.const 1 - call $../../examples/mandelbrot/assembly/index/clamp + block $../../examples/mandelbrot/assembly/index/clamp|inlined.0 (result f64) + local.get $18 + i32.const 1 + i32.add + f64.convert_i32_u + local.get $21 + f64.sub + local.get $10 + f64.mul + local.set $24 + f64.const 0 + local.set $23 + f64.const 1 + local.set $22 + local.get $24 + local.get $23 + f64.max + local.get $22 + f64.min + end f64.mul i32.trunc_f64_u local.set $20 @@ -722,6 +718,6 @@ unreachable end ) - (func $null (; 4 ;) (type $FUNCSIG$v) + (func $null (; 3 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/many-locals.json b/tests/compiler/many-locals.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index 8883c436a0..53e206bd23 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -2,11 +2,9 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) (func $many-locals/testI32 (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) diff --git a/tests/compiler/many-locals.untouched.wat b/tests/compiler/many-locals.untouched.wat index 10bd0b5dbd..7229e7671d 100644 --- a/tests/compiler/many-locals.untouched.wat +++ b/tests/compiler/many-locals.untouched.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) (start $start) @@ -799,10 +797,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 42 @@ -812,10 +810,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memcpy.json b/tests/compiler/memcpy.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index 371321f69e..4abc28ce13 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\12") + (data (i32.const 24) "m\00e\00m\00c\00p\00y\00.\00t\00s") (global $memcpy/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "memcpy" (func $memcpy/memcpy)) (start $start) (func $memcpy/memcpy (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -23,7 +21,7 @@ local.get $1 i32.const 3 i32.and - local.get $2 + i32.const 0 local.get $2 select if @@ -887,10 +885,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -899,10 +897,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -915,10 +913,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -927,10 +925,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -939,10 +937,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -951,10 +949,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -963,10 +961,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 13 @@ -980,10 +978,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -997,10 +995,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -1009,10 +1007,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -1021,10 +1019,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -1033,10 +1031,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 168 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 1bc3694e60..5e7661bbe5 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -2,16 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memcpy/base i32 (i32.const 8)) (global $memcpy/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "memcpy" (func $memcpy/memcpy)) (start $start) (func $memcpy/memcpy (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -29,7 +27,7 @@ i32.const 4 i32.rem_u else - local.get $2 + i32.const 0 end if block @@ -1244,10 +1242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1257,10 +1255,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1274,10 +1272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1287,10 +1285,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1302,10 +1300,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1317,10 +1315,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1332,10 +1330,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1354,10 +1352,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1376,10 +1374,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1391,10 +1389,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1406,10 +1404,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memcpy/base @@ -1421,10 +1419,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 168 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memmove.json b/tests/compiler/memmove.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/memmove.optimized.wat b/tests/compiler/memmove.optimized.wat index af49c1b14b..0c411976ab 100644 --- a/tests/compiler/memmove.optimized.wat +++ b/tests/compiler/memmove.optimized.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\14") + (data (i32.const 24) "m\00e\00m\00m\00o\00v\00e\00.\00t\00s") (global $memmove/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $memmove/memmove (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -216,10 +214,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -228,10 +226,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -244,10 +242,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -256,10 +254,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -268,10 +266,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -280,10 +278,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -292,10 +290,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 13 @@ -309,10 +307,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -326,10 +324,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -338,10 +336,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -350,10 +348,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -362,10 +360,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memmove.untouched.wat b/tests/compiler/memmove.untouched.wat index 0a0707b916..0b35b3900d 100644 --- a/tests/compiler/memmove.untouched.wat +++ b/tests/compiler/memmove.untouched.wat @@ -2,16 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memmove/base i32 (i32.const 8)) (global $memmove/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $memmove/memmove (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -261,10 +259,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -274,10 +272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -291,10 +289,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -304,10 +302,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -319,10 +317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -334,10 +332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -349,10 +347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -371,10 +369,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -393,10 +391,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -408,10 +406,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -423,10 +421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memmove/base @@ -438,10 +436,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memset.json b/tests/compiler/memset.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/memset.optimized.wat b/tests/compiler/memset.optimized.wat index a74f638c0f..44cf52957b 100644 --- a/tests/compiler/memset.optimized.wat +++ b/tests/compiler/memset.optimized.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\12") + (data (i32.const 24) "m\00e\00m\00s\00e\00t\00.\00t\00s") (global $memset/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $memset/memset (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -237,7 +235,7 @@ end ) (func $start:memset (; 2 ;) (type $FUNCSIG$v) - i32.const 32 + i32.const 44 global.set $memset/dest global.get $memset/dest i32.const 1 @@ -249,10 +247,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -263,10 +261,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -281,10 +279,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -295,10 +293,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -309,10 +307,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -323,10 +321,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/memset.untouched.wat b/tests/compiler/memset.untouched.wat index e4acbbb5f0..1423ed49d1 100644 --- a/tests/compiler/memset.untouched.wat +++ b/tests/compiler/memset.untouched.wat @@ -2,15 +2,14 @@ (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $memset/dest (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $memset/memset (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -291,10 +290,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -306,10 +305,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -326,10 +325,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -341,10 +340,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -356,10 +355,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $memset/dest @@ -371,10 +370,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/merge.json b/tests/compiler/merge.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/merge.optimized.wat b/tests/compiler/merge.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/merge.optimized.wat +++ b/tests/compiler/merge.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/merge.untouched.wat b/tests/compiler/merge.untouched.wat index b4d854ae7c..e1dceafa81 100644 --- a/tests/compiler/merge.untouched.wat +++ b/tests/compiler/merge.untouched.wat @@ -13,9 +13,7 @@ (global $merge/typeFunction_test (mut i32) (i32.const 0)) (global $merge/enumNamespace.val i32 (i32.const 1)) (global $merge/namespaceEnum.val i32 (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $merge/namespaceType.test (; 0 ;) (type $FUNCSIG$v) nop diff --git a/tests/compiler/named-export-default.json b/tests/compiler/named-export-default.json new file mode 100644 index 0000000000..b1da366ff4 --- /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-export-default.optimized.wat b/tests/compiler/named-export-default.optimized.wat index 2249847b51..0886d5cce7 100644 --- a/tests/compiler/named-export-default.optimized.wat +++ b/tests/compiler/named-export-default.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "default" (func $named-export-default/get3)) (func $named-export-default/get3 (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 3 diff --git a/tests/compiler/named-export-default.untouched.wat b/tests/compiler/named-export-default.untouched.wat index 4aae7011ac..3f1ff0ab82 100644 --- a/tests/compiler/named-export-default.untouched.wat +++ b/tests/compiler/named-export-default.untouched.wat @@ -4,9 +4,7 @@ (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)) (export "default" (func $named-export-default/get3)) (func $named-export-default/get3 (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 3 diff --git a/tests/compiler/named-import-default.json b/tests/compiler/named-import-default.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/named-import-default.optimized.wat b/tests/compiler/named-import-default.optimized.wat index 55fca5c159..e9b05938fc 100644 --- a/tests/compiler/named-import-default.optimized.wat +++ b/tests/compiler/named-import-default.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "getValue" (func $named-import-default/getValue)) (func $named-import-default/getValue (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 3 diff --git a/tests/compiler/named-import-default.untouched.wat b/tests/compiler/named-import-default.untouched.wat index d54881d010..f24ee8a33a 100644 --- a/tests/compiler/named-import-default.untouched.wat +++ b/tests/compiler/named-import-default.untouched.wat @@ -4,9 +4,7 @@ (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)) (export "getValue" (func $named-import-default/getValue)) (func $named-export-default/get3 (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 3 diff --git a/tests/compiler/namespace.json b/tests/compiler/namespace.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/namespace.optimized.wat b/tests/compiler/namespace.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/namespace.optimized.wat +++ b/tests/compiler/namespace.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/namespace.untouched.wat b/tests/compiler/namespace.untouched.wat index 13bbb9ab71..39966a5e53 100644 --- a/tests/compiler/namespace.untouched.wat +++ b/tests/compiler/namespace.untouched.wat @@ -7,9 +7,7 @@ (global $namespace/Outer.Inner.aVar (mut i32) (i32.const 0)) (global $namespace/Outer.Inner.anEnum.ONE i32 (i32.const 1)) (global $namespace/Outer.Inner.anEnum.TWO i32 (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $namespace/Outer.Inner.aFunc (; 0 ;) (type $FUNCSIG$i) (result i32) global.get $namespace/Outer.Inner.aVar diff --git a/tests/compiler/new-without-allocator.json b/tests/compiler/new-without-allocator.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/new-without-allocator.optimized.wat b/tests/compiler/new-without-allocator.optimized.wat index ee41ed9fc1..c5a555fc36 100644 --- a/tests/compiler/new-without-allocator.optimized.wat +++ b/tests/compiler/new-without-allocator.optimized.wat @@ -1,7 +1,8 @@ (module (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) - (memory $0 0) + (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) (export "memory" (memory $0)) diff --git a/tests/compiler/new-without-allocator.ts b/tests/compiler/new-without-allocator.ts index ff9548d52d..a50aeb6134 100644 --- a/tests/compiler/new-without-allocator.ts +++ b/tests/compiler/new-without-allocator.ts @@ -4,3 +4,4 @@ export function test(): i32 { var a = new A(); return 3; } +// Expect error: AS214 diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 8f3933bc3b..e69de29bb2 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -1,34 +0,0 @@ -(module - (type $FUNCSIG$i (func (result i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (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)) - (export "test" (func $new-without-allocator/test)) - (func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - unreachable - ) - (func $new-without-allocator/A#constructor (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - ) - (func $new-without-allocator/test (; 2 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - i32.const 0 - call $new-without-allocator/A#constructor - local.set $0 - i32.const 3 - ) - (func $null (; 3 ;) (type $FUNCSIG$v) - ) -) diff --git a/tests/compiler/nonNullAssertion.optimized.wat b/tests/compiler/nonNullAssertion.optimized.wat deleted file mode 100644 index 4e6f8471fd..0000000000 --- a/tests/compiler/nonNullAssertion.optimized.wat +++ /dev/null @@ -1,88 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (memory $0 0) - (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)) - (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/testObj)) - (export "testArr" (func $nonNullAssertion/testArr)) - (export "testElem" (func $nonNullAssertion/testArr)) - (export "testAll" (func $nonNullAssertion/testAll)) - (export "testAll2" (func $nonNullAssertion/testAll)) - (export "testFn" (func $nonNullAssertion/testFn)) - (export "testFn2" (func $nonNullAssertion/testFn)) - (export "testRet" (func $nonNullAssertion/testFn)) - (export "testObjFn" (func $nonNullAssertion/testObjFn)) - (export "testObjRet" (func $nonNullAssertion/testObjFn)) - (start $start) - (func $nonNullAssertion/testVar (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - ) - (func $nonNullAssertion/testObj (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $nonNullAssertion/testArr (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - ) - (func $nonNullAssertion/testAll (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.load - ) - (func $nonNullAssertion/testFn (; 4 ;) (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/testObjFn (; 5 ;) (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 $start (; 6 ;) (type $FUNCSIG$v) - i32.const 8 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $null (; 7 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/nonNullAssertion.untouched.wat b/tests/compiler/nonNullAssertion.untouched.wat deleted file mode 100644 index a46d255321..0000000000 --- a/tests/compiler/nonNullAssertion.untouched.wat +++ /dev/null @@ -1,182 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (memory $0 0) - (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)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) - (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)) - (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (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:nonNullAssertion (; 1 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - ) - (func $nonNullAssertion/testVar (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - ) - (func $nonNullAssertion/testObj (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $nonNullAssertion/testProp (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.load - ) - (func $~lib/array/Array#__get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $nonNullAssertion/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get - ) - (func $~lib/array/Array#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - ) - (func $nonNullAssertion/testElem (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get - ) - (func $nonNullAssertion/testAll (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get - i32.load - ) - (func $nonNullAssertion/testAll2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - call $~lib/array/Array#__get - i32.load - ) - (func $nonNullAssertion/testFn (; 11 ;) (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 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - local.set $1 - i32.const 0 - global.set $~lib/argc - local.get $1 - call_indirect (type $FUNCSIG$i) - ) - (func $nonNullAssertion/testRet (; 13 ;) (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/testObjFn (; 14 ;) (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 (; 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 $start (; 16 ;) (type $FUNCSIG$v) - call $start:nonNullAssertion - ) - (func $null (; 17 ;) (type $FUNCSIG$v) - ) -) diff --git a/tests/compiler/number.json b/tests/compiler/number.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/number.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 30eaa20237..a176036c65 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -1,53 +1,75 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$iijijij (func (param i32 i64 i32 i64 i32 i64) (result i32))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\01\00\00\000") - (data (i32.const 16) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 72) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 584) "H\00\00\00d") - (data (i32.const 592) "\01\00\00\001") - (data (i32.const 600) "\t\00\00\00n\00u\00m\00b\00e\00r\00.\00t\00s") - (data (i32.const 624) "\03\00\00\000\00.\000") - (data (i32.const 640) "\03\00\00\00N\00a\00N") - (data (i32.const 656) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 680) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 704) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8|inlined.0 (result i64) - local.get $3 - local.set $8 - local.get $6 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i64.load32_u offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $3 - local.set $10 - local.get $7 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i64.load32_u offset=8 - end - local.set $12 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 local.get $2 i32.const 4 i32.sub @@ -345,12 +305,12 @@ i32.const 1 i32.shl i32.add - local.get $11 - local.get $12 + local.get $8 + local.get $9 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -374,30 +334,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $3 - local.set $5 - local.get $6 - local.set $4 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 - i32.store offset=4 + local.get $5 + i32.store end local.get $1 i32.const 10 @@ -407,30 +357,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $8 - local.get $1 - local.set $6 - i32.const 0 - local.set $7 - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store offset=4 + local.get $5 + i32.store else local.get $2 i32.const 1 @@ -439,17 +379,53 @@ i32.const 48 local.get $1 i32.add - local.set $7 + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store16 offset=4 + local.get $5 + i32.store16 + end + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 496 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 496 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 ) - (func $~lib/internal/number/itoa32 (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -459,7 +435,7 @@ local.get $0 i32.eqz if - i32.const 8 + i32.const 24 return end local.get $0 @@ -474,43 +450,55 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 local.get $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $3 - block $~lib/internal/number/utoa32_core|inlined.0 + block $~lib/util/number/utoa32_core|inlined.0 local.get $3 - local.set $4 + local.set $6 local.get $0 local.set $5 local.get $2 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 - call $~lib/internal/number/utoa32_lut + local.get $5 + local.get $4 + call $~lib/util/number/utoa32_lut end local.get $1 if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 return ) - (func $~lib/number/I32#toString (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/I32#toString (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/util/number/itoa + ) + (func $~lib/string/String#get:length (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/itoa + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u ) - (func $~lib/internal/string/compareUnsafe (; 9 ;) (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 (; 12 ;) (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) @@ -533,14 +521,14 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -563,9 +551,8 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -576,9 +563,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -589,11 +575,11 @@ return end local.get $0 - i32.load - local.set $3 - local.get $3 + call $~lib/string/String#get:length + local.set $2 + local.get $2 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -603,23 +589,41 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 - call $~lib/internal/string/compareUnsafe + local.get $2 + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/builtins/isFinite (; 11 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 14 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 12 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 15 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/internal/number/genDigits (; 13 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 16 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__unchecked_get (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $~lib/util/number/genDigits (; 18 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -636,11 +640,10 @@ (local $20 i32) (local $21 i64) (local $22 i64) - (local $23 i32) - (local $24 i32) + (local $23 i64) + (local $24 i64) (local $25 i32) - (local $26 i64) - (local $27 i64) + (local $26 i32) i32.const 0 local.get $4 i32.sub @@ -671,12 +674,12 @@ i64.and local.set $13 local.get $12 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $14 local.get $6 local.set $15 - i32.const 2064 - i32.load + i32.const 1760 + i32.load offset=4 local.set $16 block $break|0 loop $continue|0 @@ -906,7 +909,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $14 i32.const 1 @@ -924,43 +927,33 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 + global.set $~lib/util/number/_K + block $~lib/util/number/grisuRound|inlined.0 local.get $0 - local.set $18 - local.get $15 local.set $20 + local.get $15 + local.set $18 local.get $5 - local.set $21 + local.set $24 local.get $19 - local.set $22 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $16 - local.set $23 - local.get $14 - local.set $24 - i32.const 0 - local.set $25 - local.get $23 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.set $23 + local.get $16 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u local.get $7 i64.extend_i32_s i64.shl - local.set $26 + local.set $22 local.get $10 - local.set $27 - local.get $18 + local.set $21 local.get $20 + local.get $18 i32.const 1 i32.sub i32.const 1 @@ -968,65 +961,62 @@ i32.add local.set $25 local.get $25 - i32.load16_u offset=4 - local.set $24 + i32.load16_u + local.set $26 block $break|2 loop $continue|2 - local.get $22 - local.get $27 + local.get $23 + local.get $21 i64.lt_u - local.tee $23 if (result i32) - local.get $21 - local.get $22 + local.get $24 + local.get $23 i64.sub - local.get $26 + local.get $22 i64.ge_u else - local.get $23 + i32.const 0 end - local.tee $23 if (result i32) + local.get $23 local.get $22 - local.get $26 i64.add - local.get $27 + local.get $21 i64.lt_u - local.tee $23 if (result i32) - local.get $23 + i32.const 1 else - local.get $27 - local.get $22 - i64.sub + local.get $21 + local.get $23 + i64.sub + local.get $23 local.get $22 - local.get $26 i64.add - local.get $27 + local.get $21 i64.sub i64.gt_u end else - local.get $23 + i32.const 0 end if block - local.get $24 + local.get $26 i32.const 1 i32.sub - local.set $24 + local.set $26 + local.get $23 local.get $22 - local.get $26 i64.add - local.set $22 + local.set $23 end br $continue|2 end end end local.get $25 - local.get $24 - i32.store16 offset=4 + local.get $26 + i32.store16 end local.get $15 return @@ -1079,7 +1069,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $13 local.get $9 @@ -1093,85 +1083,72 @@ local.get $5 i64.lt_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $16 - local.set $17 - i32.const 0 - local.get $14 - i32.sub - local.set $24 - i32.const 0 - local.set $25 - local.get $17 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u i64.mul local.set $10 - block $~lib/internal/number/grisuRound|inlined.1 + block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $25 + local.set $26 local.get $15 - local.set $24 + local.set $17 local.get $5 - local.set $27 + local.set $24 local.get $13 - local.set $26 + local.set $23 local.get $8 local.set $22 local.get $10 local.set $21 - local.get $25 - local.get $24 + local.get $26 + local.get $17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $17 - local.get $17 - i32.load16_u offset=4 - local.set $20 + local.set $25 + local.get $25 + i32.load16_u + local.set $18 block $break|4 loop $continue|4 - local.get $26 + local.get $23 local.get $21 i64.lt_u - local.tee $18 if (result i32) - local.get $27 - local.get $26 + local.get $24 + local.get $23 i64.sub local.get $22 i64.ge_u else - local.get $18 + i32.const 0 end - local.tee $18 if (result i32) - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $18 if (result i32) - local.get $18 + i32.const 1 else local.get $21 - local.get $26 + local.get $23 i64.sub - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -1179,26 +1156,26 @@ i64.gt_u end else - local.get $18 + i32.const 0 end if block - local.get $20 + local.get $18 i32.const 1 i32.sub - local.set $20 - local.get $26 + local.set $18 + local.get $23 local.get $22 i64.add - local.set $26 + local.set $23 end br $continue|4 end end end - local.get $17 - local.get $20 - i32.store16 offset=4 + local.get $25 + local.get $18 + i32.store16 end local.get $15 return @@ -1210,1435 +1187,216 @@ end local.get $15 ) - (func $~lib/internal/memory/memcpy (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 19 ;) (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 + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 - block (result i32) + block $break|0 + loop $continue|0 local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + br $continue|0 + end end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 + 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 - i32.load8_u - i32.store8 + end + end + block $break|2 + loop $continue|2 local.get $2 - i32.const 1 - i32.sub - local.set $2 + 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|2 + end 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 + 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 - i32.const 8 + local.get $2 i32.add - local.get $1 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + 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.add - i32.load - i32.store + 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 - i32.const 12 - i32.add - local.get $1 - i32.const 12 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 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 + i32.add + i32.load8_u + i32.store8 + br $continue|5 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 (; 15 ;) (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/number/prettify (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2661,7 +1419,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -2674,13 +1432,12 @@ local.get $1 local.get $3 i32.le_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if block $break|0 @@ -2698,7 +1455,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -2718,7 +1475,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -2727,13 +1484,12 @@ local.get $3 i32.const 0 i32.gt_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if local.get $0 @@ -2742,35 +1498,23 @@ i32.shl i32.add local.set $4 - block $~lib/memory/memory.copy|inlined.0 - local.get $4 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $4 - i32.const 4 - i32.add - local.set $6 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - end + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $3 i32.const 1 i32.shl i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -2779,48 +1523,35 @@ i32.const -6 local.get $3 i32.lt_s - local.tee $4 if (result i32) local.get $3 i32.const 0 i32.le_s else - local.get $4 + i32.const 0 end if i32.const 2 local.get $3 i32.sub local.set $4 - block $~lib/memory/memory.copy|inlined.1 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 1 - i32.shl - i32.add - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $1 - i32.const 1 - i32.shl - local.set $5 - local.get $7 - local.get $6 - local.get $5 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 i32.const 48 i32.const 46 i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store block $break|1 i32.const 2 local.set $5 @@ -2836,7 +1567,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $5 i32.const 1 i32.add @@ -2857,50 +1588,50 @@ if local.get $0 i32.const 101 - i32.store16 offset=6 - block $~lib/internal/number/genExponent|inlined.0 (result i32) + i32.store16 offset=2 + block $~lib/util/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 i32.add - local.set $4 + local.set $5 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.const 0 i32.lt_s local.set $6 local.get $6 if i32.const 0 - local.get $5 + local.get $4 i32.sub - local.set $5 + local.set $4 end - local.get $5 - call $~lib/internal/number/decimalCount32 + local.get $4 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 - block $~lib/internal/number/utoa32_core|inlined.1 - local.get $4 - local.set $8 + block $~lib/util/number/utoa32_core|inlined.1 local.get $5 + local.set $10 + local.get $4 local.set $9 local.get $7 - local.set $10 - local.get $8 - local.get $9 + local.set $8 local.get $10 - call $~lib/internal/number/utoa32_lut + local.get $9 + local.get $8 + call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $6 select - i32.store16 offset=4 + i32.store16 local.get $7 end local.set $1 @@ -2913,38 +1644,26 @@ i32.const 1 i32.shl local.set $7 - block $~lib/memory/memory.copy|inlined.2 - local.get $0 - i32.const 4 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $0 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $7 - i32.const 2 - i32.sub - local.set $4 - local.get $6 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove - end + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $7 i32.add i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $1 - block $~lib/internal/number/genExponent|inlined.1 (result i32) + block $~lib/util/number/genExponent|inlined.1 (result i32) local.get $0 local.get $7 i32.add @@ -2954,42 +1673,42 @@ local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 - i32.const 0 - i32.lt_s local.set $6 local.get $6 + i32.const 0 + i32.lt_s + local.set $5 + local.get $5 if i32.const 0 - local.get $5 + local.get $6 i32.sub - local.set $5 + local.set $6 end - local.get $5 - call $~lib/internal/number/decimalCount32 + local.get $6 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $10 - block $~lib/internal/number/utoa32_core|inlined.2 + local.set $8 + block $~lib/util/number/utoa32_core|inlined.2 local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 local.set $11 - local.get $9 + local.get $6 + local.set $10 local.get $8 + local.set $9 local.get $11 - call $~lib/internal/number/utoa32_lut + local.get $10 + local.get $9 + call $~lib/util/number/utoa32_lut end local.get $4 i32.const 45 i32.const 43 - local.get $6 + local.get $5 select - i32.store16 offset=4 - local.get $10 + i32.store16 + local.get $8 end i32.add local.set $1 @@ -3007,7 +1726,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 17 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 21 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -3023,21 +1742,18 @@ (local $14 i32) (local $15 i32) (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) (local $21 i64) (local $22 i64) (local $23 i64) (local $24 i64) (local $25 i64) - (local $26 i64) + (local $26 i32) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i32) + (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -3049,15 +1765,15 @@ local.set $1 local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end - block $~lib/internal/number/grisu2|inlined.0 (result i32) + block $~lib/util/number/grisu2|inlined.0 (result i32) local.get $1 local.set $3 local.get $0 - local.set $4 - local.get $2 local.set $5 + local.get $2 + local.set $4 local.get $3 i64.reinterpret_f64 local.set $6 @@ -3092,7 +1808,7 @@ i32.add i32.sub local.set $7 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block $~lib/util/number/normalizedBoundaries|inlined.0 local.get $9 local.set $10 local.get $7 @@ -3127,7 +1843,7 @@ i32.add local.set $15 local.get $12 - global.set $~lib/internal/number/_frc_plus + global.set $~lib/util/number/_frc_plus local.get $10 local.get $15 i64.extend_i32_s @@ -3141,12 +1857,12 @@ i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $13 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 - global.get $~lib/internal/number/_exp + block $~lib/util/number/getCachedPower|inlined.0 + global.get $~lib/util/number/_exp local.set $15 i32.const -61 local.get $15 @@ -3178,338 +1894,277 @@ i32.const 3 i32.shl i32.sub - global.set $~lib/internal/number/_K - i32.const 1728 - i32.load - local.set $11 - i32.const 1992 - i32.load - local.set $17 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $11 - local.set $18 - local.get $13 - local.set $19 - i32.const 0 - local.set $20 - local.get $18 - local.get $19 - i32.const 3 - i32.shl - i32.add - local.get $20 - i32.add - i64.load offset=8 - end - global.set $~lib/internal/number/_frc_pow - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $17 - local.set $20 - local.get $13 - local.set $19 - i32.const 0 - local.set $18 - local.get $20 - local.get $19 - i32.const 1 - i32.shl - i32.add - local.get $18 - i32.add - i32.load16_s offset=8 - end - global.set $~lib/internal/number/_exp_pow + global.set $~lib/util/number/_K + i32.const 1448 + local.get $13 + call $~lib/array/Array#__unchecked_get + global.set $~lib/util/number/_frc_pow + i32.const 1672 + local.get $13 + call $~lib/array/Array#__unchecked_get + global.set $~lib/util/number/_exp_pow end local.get $9 i64.clz i32.wrap_i64 - local.set $17 + local.set $13 local.get $9 - local.get $17 + local.get $13 i64.extend_i32_s i64.shl local.set $9 local.get $7 - local.get $17 + local.get $13 i32.sub local.set $7 - global.get $~lib/internal/number/_frc_pow + global.get $~lib/util/number/_frc_pow local.set $12 - global.get $~lib/internal/number/_exp_pow - local.set $11 - block $~lib/internal/number/umul64f|inlined.0 (result i64) + global.get $~lib/util/number/_exp_pow + local.set $14 + block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 - local.set $10 + local.set $17 local.get $12 - local.set $21 - local.get $10 + local.set $10 + local.get $17 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $10 i64.const 4294967295 i64.and - local.set $23 - local.get $10 + local.set $19 + local.get $17 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $10 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $28 - local.get $28 + local.set $24 + local.get $24 i64.const 2147483647 i64.add - local.set $28 - local.get $27 + local.set $24 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $28 + local.set $23 + local.get $24 i64.const 32 i64.shr_u - local.set $28 - local.get $24 - local.get $25 + local.set $24 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $28 + local.get $24 i64.add end - local.set $28 - block $~lib/internal/number/umul64e|inlined.0 (result i32) + local.set $24 + block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $13 - local.get $11 - local.set $14 - local.get $13 + local.set $11 local.get $14 + local.set $15 + local.get $11 + local.get $15 i32.add i32.const 64 i32.add end - local.set $14 - block $~lib/internal/number/umul64f|inlined.1 (result i64) - global.get $~lib/internal/number/_frc_plus - local.set $27 + local.set $15 + block $~lib/util/number/umul64f|inlined.1 (result i64) + global.get $~lib/util/number/_frc_plus + local.set $22 local.get $12 - local.set $26 - local.get $27 + local.set $23 + local.get $22 i64.const 4294967295 i64.and - local.set $25 - local.get $26 + local.set $21 + local.get $23 i64.const 4294967295 i64.and - local.set $24 - local.get $27 + local.set $20 + local.get $22 i64.const 32 i64.shr_u - local.set $23 - local.get $26 + local.set $19 + local.get $23 i64.const 32 i64.shr_u - local.set $22 - local.get $25 - local.get $24 + local.set $18 + local.get $21 + local.get $20 i64.mul - local.set $21 - local.get $23 - local.get $24 + local.set $10 + local.get $19 + local.get $20 i64.mul - local.get $21 + local.get $10 i64.const 32 i64.shr_u i64.add - local.set $10 - local.get $25 - local.get $22 + local.set $17 + local.get $21 + local.get $18 i64.mul - local.get $10 + local.get $17 i64.const 4294967295 i64.and i64.add - local.set $29 - local.get $29 + local.set $25 + local.get $25 i64.const 2147483647 i64.add - local.set $29 - local.get $10 + local.set $25 + local.get $17 i64.const 32 i64.shr_u - local.set $10 - local.get $29 + local.set $17 + local.get $25 i64.const 32 i64.shr_u - local.set $29 - local.get $23 - local.get $22 + local.set $25 + local.get $19 + local.get $18 i64.mul - local.get $10 + local.get $17 i64.add - local.get $29 + local.get $25 i64.add end i64.const 1 i64.sub - local.set $29 - block $~lib/internal/number/umul64e|inlined.1 (result i32) - global.get $~lib/internal/number/_exp - local.set $13 + local.set $25 + block $~lib/util/number/umul64e|inlined.1 (result i32) + global.get $~lib/util/number/_exp + local.set $26 + local.get $14 + local.set $11 + local.get $26 local.get $11 - local.set $15 - local.get $13 - local.get $15 i32.add i32.const 64 i32.add end - local.set $15 - block $~lib/internal/number/umul64f|inlined.2 (result i64) - global.get $~lib/internal/number/_frc_minus + local.set $11 + block $~lib/util/number/umul64f|inlined.2 (result i64) + global.get $~lib/util/number/_frc_minus local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $23 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $23 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $22 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $22 i64.const 4294967295 i64.and i64.add - local.set $30 - local.get $30 + local.set $27 + local.get $27 i64.const 2147483647 i64.add - local.set $30 - local.get $27 + local.set $27 + local.get $22 i64.const 32 i64.shr_u - local.set $27 - local.get $30 + local.set $22 + local.get $27 i64.const 32 i64.shr_u - local.set $30 - local.get $24 - local.get $25 + local.set $27 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $22 i64.add - local.get $30 + local.get $27 i64.add end i64.const 1 i64.add - local.set $30 - local.get $29 - local.get $30 - i64.sub local.set $27 - local.get $4 - local.get $28 - local.get $14 - local.get $29 - local.get $15 + local.get $25 local.get $27 + i64.sub + local.set $22 local.get $5 - call $~lib/internal/number/genDigits + local.get $24 + local.get $15 + local.get $25 + local.get $11 + local.get $22 + local.get $4 + call $~lib/util/number/genDigits end - local.set $31 + local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $31 + local.get $28 local.get $2 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify - local.set $31 - local.get $31 - local.get $2 - i32.add - ) - (func $~lib/internal/string/copyUnsafe (; 18 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $5 + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 4 i32.add - local.set $6 - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove ) - (func $~lib/string/String#substring (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3524,14 +2179,14 @@ i32.eqz if i32.const 0 - i32.const 2072 - i32.const 254 + i32.const 1792 + i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $1 local.tee $4 @@ -3573,6 +2228,8 @@ local.get $5 i32.lt_s select + i32.const 1 + i32.shl local.set $8 local.get $6 local.tee $4 @@ -3582,6 +2239,8 @@ local.get $5 i32.gt_s select + i32.const 1 + i32.shl local.set $9 local.get $9 local.get $8 @@ -3590,49 +2249,88 @@ local.get $3 i32.eqz if - i32.const 2104 + i32.const 1840 return end local.get $8 i32.eqz - local.tee $4 if (result i32) local.get $9 local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl i32.eq else - local.get $4 + i32.const 0 end if local.get $0 return end local.get $3 - call $~lib/internal/string/allocateUnsafe + call $~lib/util/runtime/allocate local.set $10 local.get $10 - i32.const 0 local.get $0 local.get $8 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $10 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/allocator/arena/__memory_free (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/internal/number/dtoa (; 21 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/memory/memory.free (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/util/runtime/discard (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 496 + i32.const 115 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 496 + i32.const 117 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/util/number/dtoa (; 26 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 f64.const 0 f64.eq if - i32.const 624 + i32.const 616 return end local.get $0 @@ -3645,8 +2343,8 @@ i32.const 640 return end - i32.const 656 - i32.const 680 + i32.const 664 + i32.const 704 local.get $0 f64.const 0 f64.lt @@ -3654,268 +2352,242 @@ return end i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $1 local.get $1 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $2 local.get $1 i32.const 0 local.get $2 call $~lib/string/String#substring local.set $3 - block $~lib/internal/string/freeUnsafe|inlined.0 - local.get $1 - local.set $4 - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 16 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.0 - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - end + local.get $1 + call $~lib/util/runtime/discard local.get $3 ) - (func $~lib/number/F64#toString (; 22 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/number/F64#toString (; 27 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 - call $~lib/internal/number/dtoa + call $~lib/util/number/dtoa ) - (func $~lib/number/Bool#toString (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/number/Bool#toString (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - i32.const 2160 + i32.const 1976 else - i32.const 2176 + i32.const 2000 end ) - (func $~lib/number/F32.isSafeInteger (; 24 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - (local $1 i32) + (func $~lib/builtins/isNaN (; 29 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/number/F32.isSafeInteger (; 30 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 f32.abs global.get $~lib/builtins/f32.MAX_SAFE_INTEGER f32.le - local.tee $1 if (result i32) local.get $0 f32.trunc local.get $0 f32.eq else - local.get $1 + i32.const 0 end ) - (func $~lib/number/F32.isInteger (; 25 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - (local $1 f32) - (local $2 i32) - block $~lib/builtins/isFinite|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - local.get $1 - f32.sub - f32.const 0 - f32.eq - end - local.tee $2 - i32.const 0 - i32.ne + (func $~lib/builtins/isFinite (; 31 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.eq + ) + (func $~lib/number/F32.isInteger (; 32 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + call $~lib/builtins/isFinite if (result i32) local.get $0 f32.trunc local.get $0 f32.eq else - local.get $2 + i32.const 0 end ) - (func $~lib/number/F64.isSafeInteger (; 26 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - (local $1 i32) + (func $~lib/number/F64.isSafeInteger (; 33 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 f64.abs global.get $~lib/builtins/f64.MAX_SAFE_INTEGER f64.le - local.tee $1 if (result i32) local.get $0 f64.trunc local.get $0 f64.eq else - local.get $1 + i32.const 0 end ) - (func $~lib/number/F64.isInteger (; 27 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - (local $1 f64) - (local $2 i32) - block $~lib/builtins/isFinite|inlined.0 (result i32) - local.get $0 - local.set $1 - local.get $1 - local.get $1 - f64.sub - f64.const 0 - f64.eq - end - local.tee $2 - i32.const 0 - i32.ne + (func $~lib/number/F64.isInteger (; 34 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + call $~lib/builtins/isFinite if (result i32) local.get $0 f64.trunc local.get $0 f64.eq else - local.get $2 + i32.const 0 end ) - (func $start:number (; 28 ;) (type $FUNCSIG$v) + (func $start:number (; 35 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 f32) - (local $2 f64) - call $start:~lib/allocator/arena + 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 global.get $number/a call $~lib/number/I32#toString - i32.const 592 + i32.const 552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 call $~lib/number/F64#toString - i32.const 2112 + i32.const 1856 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 call $~lib/number/I32#toString - i32.const 2128 + i32.const 1880 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -5 call $~lib/number/I32#toString - i32.const 2136 + i32.const 1904 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 call $~lib/number/I32#toString - i32.const 2144 + i32.const 1928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) global.get $number/a i32.const 1 i32.add + local.tee $0 global.set $number/a - global.get $number/a + local.get $0 end call $~lib/number/I32#toString - i32.const 2152 + i32.const 1952 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) global.get $number/a i32.const 1 i32.sub + local.tee $0 global.set $number/a - global.get $number/a + local.get $0 end call $~lib/number/I32#toString - i32.const 592 + i32.const 552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 i32.eqz call $~lib/number/Bool#toString - i32.const 2160 + i32.const 1976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.eqz call $~lib/number/Bool#toString - i32.const 2176 + i32.const 2000 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -3927,15 +2599,15 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 592 + i32.const 552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -3947,33 +2619,26 @@ local.get $0 end call $~lib/number/I32#toString - i32.const 2152 + i32.const 1952 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isNaN|inlined.0 (result i32) - global.get $~lib/number/F32.NaN - local.set $1 - local.get $1 - local.get $1 - f32.ne - end - i32.const 0 - i32.ne + global.get $~lib/number/F32.NaN + call $~lib/builtins/isNaN i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER @@ -3985,10 +2650,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER @@ -3998,10 +2663,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -4011,10 +2676,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -4024,10 +2689,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -4037,10 +2702,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -4050,10 +2715,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER @@ -4063,10 +2728,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER @@ -4078,10 +2743,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -4091,193 +2756,164 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.EPSILON call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_SAFE_INTEGER call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_SAFE_INTEGER call $~lib/number/F32.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 call $~lib/number/F32.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isNaN|inlined.0 (result i32) - global.get $~lib/number/F64.NaN - local.set $2 - local.get $2 - local.get $2 - f64.ne - end - i32.const 0 - i32.ne + global.get $~lib/number/F64.NaN + call $~lib/builtins/isNaN i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER @@ -4289,10 +2925,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER @@ -4302,10 +2938,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -4315,10 +2951,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -4328,10 +2964,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -4341,10 +2977,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -4354,10 +2990,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -4367,10 +3003,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -4382,10 +3018,10 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -4395,181 +3031,159 @@ i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_SAFE_INTEGER call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER call $~lib/number/F64.isInteger - i32.const 0 - i32.ne i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 call $~lib/number/F64.isInteger i32.const 0 - i32.ne - i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 600 + i32.const 576 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 29 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:number ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat deleted file mode 100644 index 3c219403b3..0000000000 --- a/tests/compiler/object-literal.optimized.wat +++ /dev/null @@ -1,235 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\0b\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") - (data (i32.const 40) "\11\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) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (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/internal/string/compareUnsafe (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 8 - local.set $2 - loop $continue|0 - local.get $1 - if (result i32) - local.get $0 - i32.load16_u offset=4 - local.get $2 - i32.load16_u offset=4 - i32.sub - local.tee $3 - i32.eqz - else - local.get $1 - end - if - local.get $1 - i32.const 1 - i32.sub - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $2 - i32.const 2 - i32.add - local.set $2 - br $continue|0 - end - end - local.get $3 - ) - (func $~lib/string/String.__eq (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 8 - i32.eq - if - i32.const 1 - return - end - local.get $0 - i32.eqz - local.tee $1 - if (result i32) - local.get $1 - else - i32.const 0 - end - if - i32.const 0 - return - end - local.get $0 - i32.load - local.tee $1 - i32.const 8 - i32.load - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - call $~lib/internal/string/compareUnsafe - i32.eqz - ) - (func $object-literal/bar (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 40 - i32.const 9 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 10 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $start:object-literal (; 5 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 80 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - i32.const 8 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 1 - i32.store - local.get $0 - i32.const 8 - i32.store offset=4 - local.get $0 - call $object-literal/bar - i32.const 4 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 2 - i32.store - local.get $0 - i32.load - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 40 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - i32.const 4 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 - i32.const 3 - i32.store - local.get $0 - i32.load - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 40 - i32.const 21 - i32.const 4 - call $~lib/env/abort - unreachable - end - ) - (func $start (; 6 ;) (type $FUNCSIG$v) - call $start:object-literal - ) - (func $null (; 7 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat deleted file mode 100644 index f5dc9f1ccf..0000000000 --- a/tests/compiler/object-literal.untouched.wat +++ /dev/null @@ -1,315 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\0b\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") - (data (i32.const 40) "\11\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/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 80)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) - (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/allocator/arena/__memory_allocate (; 2 ;) (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/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/internal/string/compareUnsafe (; 4 ;) (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) - i32.const 0 - local.set $5 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.set $6 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.set $7 - block $break|0 - loop $continue|0 - local.get $4 - if (result i32) - local.get $6 - i32.load16_u offset=4 - local.get $7 - i32.load16_u offset=4 - i32.sub - local.tee $5 - i32.eqz - else - local.get $4 - end - if - block - local.get $4 - i32.const 1 - i32.sub - local.set $4 - local.get $6 - i32.const 2 - i32.add - local.set $6 - local.get $7 - i32.const 2 - i32.add - local.set $7 - end - br $continue|0 - end - end - end - local.get $5 - ) - (func $~lib/string/String.__eq (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - local.get $0 - i32.const 0 - i32.eq - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.const 0 - i32.eq - end - if - i32.const 0 - return - end - local.get $0 - i32.load - local.set $3 - local.get $3 - local.get $1 - i32.load - i32.ne - if - i32.const 0 - return - end - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $3 - call $~lib/internal/string/compareUnsafe - i32.eqz - ) - (func $object-literal/bar (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - i32.const 1 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 9 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 10 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $object-literal/bar2 (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - i32.const 2 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $object-literal/Foo2#test (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.load - i32.const 3 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 21 - i32.const 4 - call $~lib/env/abort - unreachable - end - ) - (func $start:object-literal (; 9 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - call $start:~lib/allocator/arena - block (result i32) - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - local.get $0 - i32.const 1 - i32.store - local.get $0 - i32.const 8 - i32.store offset=4 - local.get $0 - end - call $object-literal/bar - block (result i32) - i32.const 4 - call $~lib/memory/memory.allocate - local.set $1 - local.get $1 - i32.const 2 - i32.store - local.get $1 - end - call $object-literal/bar2 - block (result i32) - i32.const 4 - call $~lib/memory/memory.allocate - local.set $2 - local.get $2 - i32.const 3 - i32.store - local.get $2 - end - call $object-literal/Foo2#test - ) - (func $start (; 10 ;) (type $FUNCSIG$v) - call $start:object-literal - ) - (func $null (; 11 ;) (type $FUNCSIG$v) - ) -) diff --git a/tests/compiler/optional-typeparameters.json b/tests/compiler/optional-typeparameters.json new file mode 100644 index 0000000000..b1da366ff4 --- /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 2364edb5b5..8aa288831b 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -1,28 +1,43 @@ (module + (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$v (func)) (type $FUNCSIG$i (func (result i32))) - (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $optional-typeparameters/tConcrete (mut i32) (i32.const 0)) (global $optional-typeparameters/tDerived (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (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 $0 - i32.const 8 + 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 $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -30,8 +45,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -57,21 +72,72 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 16 + call $~lib/allocator/arena/__mem_allocate + local.tee $0 + i32.const -1520547049 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 16 + i32.add + ) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 64 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store local.get $0 ) - (func $start (; 1 ;) (type $FUNCSIG$v) - i32.const 8 + (func $start (; 4 ;) (type $FUNCSIG$v) + i32.const 64 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register global.set $optional-typeparameters/tConcrete - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register global.set $optional-typeparameters/tDerived ) - (func $null (; 2 ;) (type $FUNCSIG$v) + (func $null (; 5 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/optional-typeparameters.untouched.wat b/tests/compiler/optional-typeparameters.untouched.wat index 066794dc33..a74e88c3f2 100644 --- a/tests/compiler/optional-typeparameters.untouched.wat +++ b/tests/compiler/optional-typeparameters.untouched.wat @@ -1,38 +1,44 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$v (func)) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$didd (func (param i32 f64 f64) (result f64))) - (memory $0 0) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/util/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/util/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)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 64)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $optional-typeparameters/testConcrete (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/testConcrete (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) - (func $optional-typeparameters/testDerived (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/testDerived (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 ) - (func $start:~lib/allocator/arena (; 2 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -111,49 +117,114 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $optional-typeparameters/TestConcrete#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $optional-typeparameters/TestConcrete#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $optional-typeparameters/TestConcrete#test (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $optional-typeparameters/TestConcrete#test (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 local.get $2 i32.add ) - (func $optional-typeparameters/TestDerived#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $optional-typeparameters/TestDerived#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $optional-typeparameters/TestDerived#test (; 8 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) + (func $optional-typeparameters/TestDerived#test (; 11 ;) (type $FUNCSIG$didd) (param $0 i32) (param $1 f64) (param $2 f64) (result f64) local.get $1 local.get $2 f64.add ) - (func $start:optional-typeparameters (; 9 ;) (type $FUNCSIG$v) + (func $start:optional-typeparameters (; 12 ;) (type $FUNCSIG$v) i32.const 1 call $optional-typeparameters/testConcrete drop i32.const 2 call $optional-typeparameters/testDerived drop - call $start:~lib/allocator/arena + 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 i32.const 0 call $optional-typeparameters/TestConcrete#constructor global.set $optional-typeparameters/tConcrete @@ -171,9 +242,9 @@ call $optional-typeparameters/TestDerived#test drop ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $start (; 13 ;) (type $FUNCSIG$v) call $start:optional-typeparameters ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/overflow.json b/tests/compiler/overflow.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/overflow.optimized.wat b/tests/compiler/overflow.optimized.wat index 75d5ba7122..5388fe30b2 100644 --- a/tests/compiler/overflow.optimized.wat +++ b/tests/compiler/overflow.optimized.wat @@ -1,11 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/overflow.untouched.wat b/tests/compiler/overflow.untouched.wat index bae4097a2e..ea0abbf1fd 100644 --- a/tests/compiler/overflow.untouched.wat +++ b/tests/compiler/overflow.untouched.wat @@ -1,14 +1,12 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:overflow (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -31,10 +29,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -51,10 +49,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -76,10 +74,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -101,10 +99,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -121,10 +119,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -141,10 +139,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -162,10 +160,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -183,10 +181,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -201,10 +199,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 33 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -225,10 +223,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -245,10 +243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 45 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -270,10 +268,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 48 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -295,10 +293,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -315,10 +313,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 54 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -335,10 +333,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 57 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -356,10 +354,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -377,10 +375,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -395,10 +393,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -417,10 +415,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -435,10 +433,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 77 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -458,10 +456,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 80 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -481,10 +479,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 83 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -499,10 +497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -517,10 +515,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 89 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -536,10 +534,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 92 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -555,10 +553,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 95 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -571,10 +569,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 97 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -593,10 +591,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 106 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -611,10 +609,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 109 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -634,10 +632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 112 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -657,10 +655,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 115 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -675,10 +673,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 118 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -693,10 +691,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 121 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -712,10 +710,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 124 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -731,10 +729,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 127 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -747,10 +745,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 129 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end diff --git a/tests/compiler/portable-conversions.json b/tests/compiler/portable-conversions.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/portable-conversions.optimized.wat b/tests/compiler/portable-conversions.optimized.wat index ab02e83b04..f26424d5f8 100644 --- a/tests/compiler/portable-conversions.optimized.wat +++ b/tests/compiler/portable-conversions.optimized.wat @@ -1,17 +1,15 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\17\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00.") + (data (i32.const 24) "p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s") (global $portable-conversions/i (mut i32) (i32.const 1)) (global $portable-conversions/I (mut i64) (i64.const 1)) (global $portable-conversions/f (mut f32) (f32.const 1)) (global $portable-conversions/F (mut f64) (f64.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:portable-conversions (; 1 ;) (type $FUNCSIG$v) global.get $portable-conversions/i @@ -20,10 +18,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -33,10 +31,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -46,10 +44,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -59,10 +57,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -71,10 +69,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -84,10 +82,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -97,10 +95,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -110,20 +108,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -131,10 +129,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -142,10 +140,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -153,10 +151,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -164,20 +162,20 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -185,10 +183,10 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -196,20 +194,20 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -217,10 +215,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -228,10 +226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -239,10 +237,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -251,10 +249,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -264,10 +262,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -277,10 +275,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -290,10 +288,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -302,10 +300,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -315,10 +313,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -328,10 +326,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -341,20 +339,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -362,10 +360,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -373,10 +371,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -384,10 +382,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -395,20 +393,20 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -416,10 +414,10 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -427,20 +425,20 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -448,10 +446,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -459,10 +457,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -470,20 +468,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -491,10 +489,10 @@ i64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -502,10 +500,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -513,10 +511,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -525,10 +523,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -537,10 +535,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -548,10 +546,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -560,10 +558,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -572,10 +570,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -584,10 +582,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -596,10 +594,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -607,10 +605,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/portable-conversions.untouched.wat b/tests/compiler/portable-conversions.untouched.wat index 6ca1d6f251..66015b9a78 100644 --- a/tests/compiler/portable-conversions.untouched.wat +++ b/tests/compiler/portable-conversions.untouched.wat @@ -1,18 +1,16 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\17\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00.\00\00\00\00\00\00\00\00\00\00\00p\00o\00r\00t\00a\00b\00l\00e\00-\00c\00o\00n\00v\00e\00r\00s\00i\00o\00n\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $portable-conversions/i (mut i32) (i32.const 1)) (global $portable-conversions/I (mut i64) (i64.const 1)) (global $portable-conversions/f (mut f32) (f32.const 1)) (global $portable-conversions/F (mut f64) (f64.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:portable-conversions (; 1 ;) (type $FUNCSIG$v) global.get $portable-conversions/i @@ -23,10 +21,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -38,10 +36,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -53,10 +51,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -68,10 +66,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -82,10 +80,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -97,10 +95,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -112,10 +110,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -127,20 +125,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -148,10 +146,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -159,10 +157,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -170,10 +168,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -181,20 +179,20 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -202,10 +200,10 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -213,20 +211,20 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -234,10 +232,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -245,10 +243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -256,10 +254,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -268,10 +266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -281,10 +279,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -294,10 +292,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -307,10 +305,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -319,10 +317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -332,10 +330,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -345,10 +343,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -358,20 +356,20 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -379,10 +377,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -390,10 +388,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -401,10 +399,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -412,20 +410,20 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -433,10 +431,10 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -444,20 +442,20 @@ i64.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -465,10 +463,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -476,10 +474,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -487,10 +485,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -499,10 +497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -511,10 +509,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -523,10 +521,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -535,10 +533,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -547,10 +545,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -559,10 +557,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -570,10 +568,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -582,10 +580,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/i @@ -594,10 +592,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/I @@ -606,10 +604,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/f @@ -618,10 +616,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $portable-conversions/F @@ -629,10 +627,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/possibly-null.json b/tests/compiler/possibly-null.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/possibly-null.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/possibly-null.optimized.wat b/tests/compiler/possibly-null.optimized.wat new file mode 100644 index 0000000000..4af480291f --- /dev/null +++ b/tests/compiler/possibly-null.optimized.wat @@ -0,0 +1,67 @@ +(module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$v (func)) + (memory $0 0) + (export "memory" (memory $0)) + (export "testTrue" (func $possibly-null/testTrue)) + (export "testFalseElse" (func $possibly-null/testTrue)) + (export "testFalseContinuation" (func $possibly-null/testTrue)) + (export "testNeNull" (func $possibly-null/testTrue)) + (export "testEqNullElse" (func $possibly-null/testTrue)) + (export "testEqNullContinuation" (func $possibly-null/testTrue)) + (export "testNotEqNull" (func $possibly-null/testTrue)) + (export "testNotNeNullElse" (func $possibly-null/testTrue)) + (export "testNotNeNullContinuation" (func $possibly-null/testTrue)) + (export "testWhile" (func $possibly-null/testWhile)) + (export "testWhile2" (func $possibly-null/testWhile2)) + (export "testWhile3" (func $possibly-null/testWhile3)) + (export "testLogicalAnd" (func $possibly-null/testTrue)) + (export "testLogicalOr" (func $possibly-null/testTrue)) + (export "testLogicalAndMulti" (func $possibly-null/testLogicalAndMulti)) + (export "testLogicalOrMulti" (func $possibly-null/testLogicalAndMulti)) + (export "testAssign" (func $possibly-null/testLogicalAndMulti)) + (export "testNeverNull" (func $possibly-null/testTrue)) + (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $possibly-null/testWhile (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + loop $continue|0 + local.get $0 + if + i32.const 0 + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testWhile2 (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + loop $continue|0 + local.get $0 + if + local.get $1 + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testWhile3 (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + loop $continue|0 + local.get $0 + if + local.get $1 + local.get $0 + local.get $1 + select + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testLogicalAndMulti (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $null (; 5 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/possibly-null.ts b/tests/compiler/possibly-null.ts new file mode 100644 index 0000000000..4e1d79a989 --- /dev/null +++ b/tests/compiler/possibly-null.ts @@ -0,0 +1,127 @@ +class Ref {} + +// the following makes use of the fact that branches that can be eliminated statically +// won't become compiled, hence the ERROR statement is never executed. + +export function testTrue(a: Ref | null): void { + if (a) { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testFalseElse(a: Ref | null): void { + if (!a) return; + else { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testFalseContinuation(a: Ref | null): void { + if (!a) return; + if (isNullable(a)) ERROR("should be non-nullable"); +} + +export function testNeNull(a: Ref | null): void { + if (a != null) { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testEqNullElse(a: Ref | null): void { + if (a == null) return; + else { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testEqNullContinuation(a: Ref | null): void { + if (a == null) return; + if (isNullable(a)) ERROR("should be non-nullable"); +} + +export function testNotEqNull(a: Ref | null): void { + if (!(a == null)) { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testNotNeNullElse(a: Ref | null): void { + if (!(a != null)) return; + else { + if (isNullable(a)) ERROR("should be non-nullable"); + } +} + +export function testNotNeNullContinuation(a: Ref | null): void { + if (!(a != null)) return; + if (isNullable(a)) ERROR("should be non-nullable"); +} + +export function testWhile(a: Ref | null): void { + while (a) { + if (isNullable(a)) ERROR("should be non-nullable"); + a = null; + if (!isNullable(a)) ERROR("should be nullable again"); + } +} + +export function testWhile2(a: Ref | null, b: Ref | null): void { + while (a) { + if (isNullable(a)) ERROR("should be non-nullable"); + a = b; + if (!isNullable(a)) ERROR("should be nullable again"); + } +} + +export function testWhile3(a: Ref | null, b: Ref | null): void { + while (a) { + if (isNullable(a)) ERROR("should be non-nullable"); + if (b) { + a = b; + if (isNullable(a)) ERROR("should be non-nullable still"); + } + } +} + +function requireNonNull(a: Ref): Ref { + return a; +} + +export function testLogicalAnd(a: Ref | null): void { + a && requireNonNull(a); +} + +export function testLogicalOr(a: Ref | null): void { + !a || requireNonNull(a) != null; +} + +export function testLogicalAndMulti(a: Ref | null, b: Ref | null): void { + if (a && b) { + if (isNullable(a)) ERROR("should be non-nullable"); + if (isNullable(b)) ERROR("should be non-nullable"); + } else { + if (!isNullable(a)) ERROR("should be nullable"); + if (!isNullable(b)) ERROR("should be nullable"); + } +} + +export function testLogicalOrMulti(a: Ref | null, b: Ref | null): void { + if (!a || !b) { + if (!isNullable(a)) ERROR("should be nullable"); + if (!isNullable(b)) ERROR("should be nullable"); + } else { + if (isNullable(a)) ERROR("should be non-nullable"); + if (isNullable(b)) ERROR("should be non-nullable"); + } +} + +export function testAssign(a: Ref | null, b: Ref): void { + a = b; + if (isNullable(a)) ERROR("should be non-nullable"); +} + +export function testNeverNull(a: Ref | null): void { + if (a) { + a!; // INFO AS225: Expression is never 'null'. + } +} diff --git a/tests/compiler/possibly-null.untouched.wat b/tests/compiler/possibly-null.untouched.wat new file mode 100644 index 0000000000..045c0f063b --- /dev/null +++ b/tests/compiler/possibly-null.untouched.wat @@ -0,0 +1,205 @@ +(module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (export "testTrue" (func $possibly-null/testTrue)) + (export "testFalseElse" (func $possibly-null/testFalseElse)) + (export "testFalseContinuation" (func $possibly-null/testFalseContinuation)) + (export "testNeNull" (func $possibly-null/testNeNull)) + (export "testEqNullElse" (func $possibly-null/testEqNullElse)) + (export "testEqNullContinuation" (func $possibly-null/testEqNullContinuation)) + (export "testNotEqNull" (func $possibly-null/testNotEqNull)) + (export "testNotNeNullElse" (func $possibly-null/testNotNeNullElse)) + (export "testNotNeNullContinuation" (func $possibly-null/testNotNeNullContinuation)) + (export "testWhile" (func $possibly-null/testWhile)) + (export "testWhile2" (func $possibly-null/testWhile2)) + (export "testWhile3" (func $possibly-null/testWhile3)) + (export "testLogicalAnd" (func $possibly-null/testLogicalAnd)) + (export "testLogicalOr" (func $possibly-null/testLogicalOr)) + (export "testLogicalAndMulti" (func $possibly-null/testLogicalAndMulti)) + (export "testLogicalOrMulti" (func $possibly-null/testLogicalOrMulti)) + (export "testAssign" (func $possibly-null/testAssign)) + (export "testNeverNull" (func $possibly-null/testNeverNull)) + (func $possibly-null/testTrue (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + nop + end + ) + (func $possibly-null/testFalseElse (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.eqz + if + return + else + nop + end + ) + (func $possibly-null/testFalseContinuation (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.eqz + if + return + end + ) + (func $possibly-null/testNeNull (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.ne + if + nop + end + ) + (func $possibly-null/testEqNullElse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.eq + if + return + else + nop + end + ) + (func $possibly-null/testEqNullContinuation (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.eq + if + return + end + ) + (func $possibly-null/testNotEqNull (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.eq + i32.eqz + if + nop + end + ) + (func $possibly-null/testNotNeNullElse (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + return + else + nop + end + ) + (func $possibly-null/testNotNeNullContinuation (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + return + end + ) + (func $possibly-null/testWhile (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + loop $continue|0 + local.get $0 + if + i32.const 0 + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testWhile2 (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + loop $continue|0 + local.get $0 + if + local.get $1 + local.set $0 + br $continue|0 + end + end + ) + (func $possibly-null/testWhile3 (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + loop $continue|0 + local.get $0 + if + local.get $1 + if + local.get $1 + local.set $0 + end + br $continue|0 + end + end + ) + (func $possibly-null/requireNonNull (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + ) + (func $possibly-null/testLogicalAnd (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if (result i32) + local.get $0 + call $possibly-null/requireNonNull + else + i32.const 0 + end + drop + ) + (func $possibly-null/testLogicalOr (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + call $possibly-null/requireNonNull + i32.const 0 + i32.ne + end + drop + ) + (func $possibly-null/testLogicalAndMulti (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + if (result i32) + local.get $1 + else + i32.const 0 + end + if + nop + else + nop + end + ) + (func $possibly-null/testLogicalOrMulti (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $1 + i32.eqz + end + if + nop + else + nop + end + ) + (func $possibly-null/testAssign (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $1 + local.set $0 + ) + (func $possibly-null/testNeverNull (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + drop + end + ) + (func $null (; 19 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/recursive.json b/tests/compiler/recursive.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/recursive.optimized.wat b/tests/compiler/recursive.optimized.wat index 70374ac5e9..8be1699992 100644 --- a/tests/compiler/recursive.optimized.wat +++ b/tests/compiler/recursive.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "fib" (func $recursive/fib)) (func $recursive/fib (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/recursive.untouched.wat b/tests/compiler/recursive.untouched.wat index 432e9ee8e4..daf56987dc 100644 --- a/tests/compiler/recursive.untouched.wat +++ b/tests/compiler/recursive.untouched.wat @@ -4,9 +4,7 @@ (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)) (export "fib" (func $recursive/fib)) (func $recursive/fib (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/reexport.json b/tests/compiler/reexport.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 5246631d08..5496139f6b 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -2,13 +2,10 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $export/ns.one) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $export/add)) (export "renamed_sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index 057ad25d43..662fe579a4 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "add" (func $export/add)) (export "renamed_sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/rereexport.json b/tests/compiler/rereexport.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 1139e552a6..306f12dff1 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -1,12 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index a8dee375de..7f469d6e96 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) diff --git a/tests/compiler/resolve-nested.json b/tests/compiler/resolve-nested.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index ba434f7178..b351045e63 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -4,10 +4,11 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) + (global $resolve-nested/Outer.InnerClass i32 (i32.const 18)) + (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 19)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "Outer.InnerClass" (global $resolve-nested/Outer.InnerClass)) + (export "Outer.Inner.EvenInnerClass" (global $resolve-nested/Outer.Inner.EvenInnerClass)) (export "Outer.Inner.evenInner" (func $resolve-nested/Outer.Inner.evenInner)) (export "Outer.inner" (func $resolve-nested/Outer.inner)) (export "outer" (func $resolve-nested/outer)) diff --git a/tests/compiler/resolve-nested.untouched.wat b/tests/compiler/resolve-nested.untouched.wat index 9b79543a8e..72b4edb30f 100644 --- a/tests/compiler/resolve-nested.untouched.wat +++ b/tests/compiler/resolve-nested.untouched.wat @@ -20,9 +20,11 @@ (global $resolve-nested/a (mut i32) (i32.const 0)) (global $resolve-nested/b (mut i32) (i32.const 0)) (global $resolve-nested/c (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) + (global $resolve-nested/Outer.InnerClass i32 (i32.const 18)) + (global $resolve-nested/Outer.Inner.EvenInnerClass i32 (i32.const 19)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "Outer.InnerClass" (global $resolve-nested/Outer.InnerClass)) + (export "Outer.Inner.EvenInnerClass" (global $resolve-nested/Outer.Inner.EvenInnerClass)) (export "Outer.Inner.evenInner" (func $resolve-nested/Outer.Inner.evenInner)) (export "Outer.inner" (func $resolve-nested/Outer.inner)) (export "outer" (func $resolve-nested/outer)) diff --git a/tests/compiler/retain-i32.json b/tests/compiler/retain-i32.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index 2578279298..5a77a5e26b 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -1,15 +1,13 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") (global $retain-i32/si (mut i32) (i32.const 0)) (global $retain-i32/ui (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:retain-i32 (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -34,10 +32,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -47,10 +45,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2 @@ -60,10 +58,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -73,10 +71,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -86,10 +84,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -127 @@ -99,10 +97,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -112,10 +110,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -125,10 +123,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -138,10 +136,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -149,10 +147,10 @@ global.get $retain-i32/si if i32.const 0 - i32.const 8 + i32.const 24 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -162,10 +160,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -175,10 +173,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -188,10 +186,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 254 @@ -201,10 +199,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -214,10 +212,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -227,10 +225,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -240,10 +238,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -251,10 +249,10 @@ global.get $retain-i32/ui if i32.const 0 - i32.const 8 + i32.const 24 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/retain-i32.untouched.wat b/tests/compiler/retain-i32.untouched.wat index 3c8ff591f4..93dd760466 100644 --- a/tests/compiler/retain-i32.untouched.wat +++ b/tests/compiler/retain-i32.untouched.wat @@ -2,9 +2,9 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) @@ -18,9 +18,7 @@ (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $retain-i32/si (mut i32) (i32.const 0)) (global $retain-i32/ui (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $retain-i32/test (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 @@ -41,10 +39,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -65,10 +63,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -89,10 +87,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 6 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -113,10 +111,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -137,10 +135,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -161,10 +159,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -185,10 +183,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -205,10 +203,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -225,10 +223,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -245,10 +243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 15 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -265,10 +263,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -285,10 +283,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 17 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -305,10 +303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -325,10 +323,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 19 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) @@ -475,10 +473,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 127 @@ -497,10 +495,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 127 @@ -517,10 +515,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -537,10 +535,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -557,10 +555,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 127 @@ -577,10 +575,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -597,10 +595,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 127 @@ -613,10 +611,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -629,10 +627,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -128 @@ -645,10 +643,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -661,10 +659,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -681,10 +679,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -701,10 +699,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -719,10 +717,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -737,10 +735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -753,10 +751,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -769,10 +767,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -785,10 +783,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/runtime-arena.json b/tests/compiler/runtime-arena.json new file mode 100644 index 0000000000..52d2fbb6c7 --- /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 0000000000..bdacf2606a --- /dev/null +++ b/tests/compiler/runtime-arena.optimized.wat @@ -0,0 +1,331 @@ +(module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param 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/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\1e") + (data (i32.const 80) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 112) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 112 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 112 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 112 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 112 + i32.add + i32.load + end + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (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/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 256 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block (result i32) + local.get $0 + call $~lib/util/runtime/allocate + end + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 112 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 112 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 80 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 11 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 80 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $start (; 12 ;) (type $FUNCSIG$v) + i32.const 256 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + ) + (func $null (; 13 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime-arena.ts b/tests/compiler/runtime-arena.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/compiler/runtime-arena.untouched.wat b/tests/compiler/runtime-arena.untouched.wat new file mode 100644 index 0000000000..b8ba66a346 --- /dev/null +++ b/tests/compiler/runtime-arena.untouched.wat @@ -0,0 +1,392 @@ +(module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param 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/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\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 112) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 112)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 256)) + (export "memory" (memory $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (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/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 12 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 15 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 80 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 17 ;) (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 $null (; 18 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime-default.json b/tests/compiler/runtime-default.json new file mode 100644 index 0000000000..e6739f3d85 --- /dev/null +++ b/tests/compiler/runtime-default.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime trace" + ] +} diff --git a/tests/compiler/runtime-default.optimized.wat b/tests/compiler/runtime-default.optimized.wat new file mode 100644 index 0000000000..8b2edc44c1 --- /dev/null +++ b/tests/compiler/runtime-default.optimized.wat @@ -0,0 +1,1720 @@ +(module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param 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$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\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) "\10\00\00\00(") + (data (i32.const 88) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 128) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08") + (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 $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 128 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 128 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load + end + ) + (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 165 + i32.const 4 + call $~lib/builtins/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 $2 + i32.const 32 + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 189 + i32.const 4 + call $~lib/builtins/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 110 + i32.const 4 + call $~lib/builtins/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 111 + i32.const 11 + call $~lib/builtins/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 452 + i32.const 2 + call $~lib/builtins/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 $2 + i32.const 32 + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 181 + i32.const 4 + call $~lib/builtins/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 159 + i32.const 4 + call $~lib/builtins/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 $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 276 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.tee $2 + i32.const 16 + i32.ge_u + if (result i32) + local.get $2 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 278 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $2 + local.get $2 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $1 + i32.load offset=8 + local.set $2 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=8 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $3 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $3 + local.get $4 + local.get $2 + call $~lib/allocator/tlsf/Root#setHead + local.get $2 + i32.eqz + if + local.get $0 + local.get $3 + local.get $0 + local.get $3 + 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 $3 + 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 102 + i32.const 4 + call $~lib/builtins/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 103 + i32.const 11 + call $~lib/builtins/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 + if (result i32) + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 352 + i32.const 4 + call $~lib/builtins/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 211 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 213 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $5 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $5 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 231 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $2 + i32.store + end + local.get $5 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 244 + i32.const 4 + call $~lib/builtins/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 $4 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $2 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $2 + i32.store offset=8 + local.get $2 + if + local.get $2 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $4 + 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 $4 + i32.shl + i32.or + i32.store + local.get $0 + local.get $4 + local.get $0 + local.get $4 + 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 $2 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + local.get $2 + i32.le_u + select + select + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 399 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=2912 + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 8 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 408 + i32.const 6 + call $~lib/builtins/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 417 + i32.const 6 + call $~lib/builtins/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 + local.get $0 + local.get $2 + i32.store offset=2912 + 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 446 + i32.const 2 + call $~lib/builtins/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 256 + i32.lt_u + if (result i32) + 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 341 + i32.const 16 + call $~lib/builtins/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 $3 + i32.const 1 + i32.and + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 370 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $3 + 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 $4 + 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 $3 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $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 $2 + i32.gt_s + if (result i32) + i32.const 1 + local.get $2 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 280 + local.set $2 + i32.const 280 + global.set $~lib/allocator/tlsf/ROOT + i32.const 3192 + i32.const 0 + i32.store + i32.const 280 + i32.const 0 + i32.store + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 280 + 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 280 + 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 280 + i32.const 3200 + 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 + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + 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 + current_memory + local.tee $0 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $0 + 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 + 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 507 + i32.const 12 + call $~lib/builtins/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 24 + i32.const 510 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/util/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 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + 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 + i32.const 16 + i32.add + ) + (func $~lib/collector/itcm/maybeInit (; 19 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.eqz + if + 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 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 20 ;) (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 $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/__ref_register (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + 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/util/runtime/register (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 280 + i32.le_u + if + i32.const 0 + i32.const 88 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 88 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 26 ;) (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/__ref_link (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + i32.const 0 + end + if + local.get $1 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/runtime.newArray (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + local.tee $3 + if (result i32) + local.get $3 + i32.const 128 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $3 + i32.const 3 + i32.shl + i32.const 128 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $5 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $4 + local.get $3 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + local.set $3 + local.get $2 + i32.load + local.get $1 + i32.ne + if + local.get $1 + local.get $3 + call $~lib/collector/itcm/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $4 + local.get $5 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $4 + i32.add + local.set $4 + loop $continue|0 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + local.get $2 + call $~lib/collector/itcm/__ref_link + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/allocator/tlsf/__mem_free (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 24 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + 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 524 + i32.const 6 + call $~lib/builtins/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 (; 32 ;) (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 + unreachable + end + call $~lib/runtime/__gc_mark_roots + 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.load + local.get $0 + i32.const 16 + i32.add + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + 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 280 + 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_collect (; 33 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $~lib/runtime/runtime.collect (; 34 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start (; 35 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + 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/runtime/__gc_mark_roots (; 37 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/runtime/__gc_mark_members (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $invalid + block $~lib/runtime/Root + block $~lib/array/Array + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/array/Array $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 15 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + return + end + return + end + local.get $1 + i32.load + call $~lib/collector/itcm/__ref_mark + return + end + return + end + unreachable + ) + (func $null (; 39 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime-default.ts b/tests/compiler/runtime-default.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/compiler/runtime-default.untouched.wat b/tests/compiler/runtime-default.untouched.wat new file mode 100644 index 0000000000..23708aa145 --- /dev/null +++ b/tests/compiler/runtime-default.untouched.wat @@ -0,0 +1,2070 @@ +(module + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$ii (func (param 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$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\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) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 128) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (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 $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 128)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 280)) + (export "memory" (memory $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/runtime/runtime.instanceof (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 165 + i32.const 4 + call $~lib/builtins/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 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 189 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + 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) + local.get $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 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 110 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const 3 + 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 111 + i32.const 11 + call $~lib/builtins/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 452 + i32.const 2 + call $~lib/builtins/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 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 181 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + 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 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 159 + i32.const 4 + call $~lib/builtins/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 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 276 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 278 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $4 + local.get $3 + i32.const 8 + i32.div_u + local.set $5 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $4 + local.get $3 + local.get $4 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $5 + local.get $4 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $4 + end + local.get $1 + i32.load offset=4 + local.set $6 + local.get $1 + i32.load offset=8 + local.set $7 + local.get $6 + if + local.get $6 + local.get $7 + i32.store offset=8 + end + local.get $7 + if + local.get $7 + local.get $6 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $4 + local.get $5 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $4 + local.get $5 + local.get $7 + call $~lib/allocator/tlsf/Root#setHead + local.get $7 + i32.eqz + if + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $8 + local.get $0 + local.get $4 + local.get $8 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $8 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $8 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + 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 + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 102 + i32.const 4 + call $~lib/builtins/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 103 + i32.const 11 + call $~lib/builtins/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 + i32.const 1 + i32.and + i32.const 0 + i32.ne + if (result i32) + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 352 + i32.const 4 + call $~lib/builtins/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 211 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 213 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + i32.const 8 + local.get $4 + i32.const 3 + 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 $3 + local.get $3 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 231 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $5 + local.get $6 + i32.const 8 + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $6 + i32.store + local.get $5 + local.set $1 + local.get $6 + local.set $2 + end + local.get $3 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $0 + local.get $1 + local.get $3 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $7 + local.get $7 + i32.const 16 + i32.ge_u + if (result i32) + local.get $7 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 244 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $7 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $7 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $7 + local.get $8 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $9 + local.get $8 + i32.const 8 + 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 + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 399 + i32.const 4 + call $~lib/builtins/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 8 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 408 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $1 + i32.const 8 + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 417 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + i32.const 8 + i32.const 16 + i32.add + i32.const 8 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + i32.const 8 + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + i32.const 1 + i32.or + local.get $4 + i32.const 2 + 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 + i32.const 8 + i32.sub + local.set $8 + local.get $8 + i32.const 0 + i32.const 2 + 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 446 + i32.const 2 + call $~lib/builtins/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 446 + i32.const 2 + call $~lib/builtins/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 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + local.set $3 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $2 + local.get $1 + local.get $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + local.get $3 + i32.const 32 + i32.const 1 + i32.sub + i32.lt_u + if + local.get $3 + i32.const 1 + i32.add + local.set $3 + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + local.set $3 + end + end + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.shl + i32.and + local.set $4 + local.get $4 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $6 + local.get $6 + i32.eqz + if + i32.const 0 + local.set $5 + else + local.get $6 + call $~lib/allocator/tlsf/ffs + local.set $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 24 + i32.const 341 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.set $4 + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $5 + end + else + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $5 + end + local.get $5 + ) + (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 + i32.const 1 + i32.and + i32.const 0 + i32.ne + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 370 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $4 + local.get $4 + i32.const 8 + i32.const 16 + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.set $5 + local.get $5 + local.get $4 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + i32.const 1 + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + local.get $5 + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + i32.const 8 + 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 $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + 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 + i32.const 2916 + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + 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 + i32.const 22 + 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 + i32.const 32 + 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 + i32.const 2916 + 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 + i32.const 1073741824 + 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 + i32.const 16 + 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 $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + 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 507 + i32.const 12 + call $~lib/builtins/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 510 + i32.const 2 + call $~lib/builtins/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/util/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 24 ;) (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/maybeInit (; 25 ;) (type $FUNCSIG$v) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + global.get $~lib/util/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/util/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 + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 26 ;) (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/ManagedObject#set:next (; 27 ;) (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/ManagedObjectList#push (; 28 ;) (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/__ref_register (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/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/util/runtime/register (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 88 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 35 ;) (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 (; 36 ;) (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#unlink (; 37 ;) (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/ManagedObject#makeGray (; 38 ;) (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/__ref_link (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + 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 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + i32.const 0 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/runtime.newArray (; 40 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + nop + local.get $7 + local.get $6 + call $~lib/collector/itcm/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/itcm/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/allocator/tlsf/__mem_free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + i32.const 8 + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 524 + i32.const 6 + call $~lib/builtins/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/memory/memory.free (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 46 ;) (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 + unreachable + end + block + call $~lib/runtime/__gc_mark_roots + 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 + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + 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_collect (; 47 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 48 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 50 ;) (type $FUNCSIG$v) + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 51 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/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/runtime/__gc_mark_roots (; 52 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/array/Array#__traverse (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/runtime/__gc_mark_members (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/runtime/Root + block $~lib/array/Array + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + br_table $invalid $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/array/Array $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 15 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + return + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + return + end + unreachable + ) + (func $null (; 55 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime-none.json b/tests/compiler/runtime-none.json new file mode 100644 index 0000000000..453cb07770 --- /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 0000000000..bb456a1172 --- /dev/null +++ b/tests/compiler/runtime-none.optimized.wat @@ -0,0 +1,8 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (export "memory" (memory $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 0000000000..e69de29bb2 diff --git a/tests/compiler/runtime-none.untouched.wat b/tests/compiler/runtime-none.untouched.wat new file mode 100644 index 0000000000..29ee81b836 --- /dev/null +++ b/tests/compiler/runtime-none.untouched.wat @@ -0,0 +1,9 @@ +(module + (type $FUNCSIG$v (func)) + (memory $0 0) + (table $0 1 funcref) + (elem (i32.const 0) $null) + (export "memory" (memory $0)) + (func $null (; 0 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime/flags.json b/tests/compiler/runtime/flags.json new file mode 100644 index 0000000000..c9fbb95fc1 --- /dev/null +++ b/tests/compiler/runtime/flags.json @@ -0,0 +1,8 @@ +{ + "features": [ + "simd" + ], + "asc_flags": [ + "--runtime trace" + ] +} \ No newline at end of file diff --git a/tests/compiler/runtime/flags.optimized.wat b/tests/compiler/runtime/flags.optimized.wat new file mode 100644 index 0000000000..b72c35d892 --- /dev/null +++ b/tests/compiler/runtime/flags.optimized.wat @@ -0,0 +1,3381 @@ +(module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (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$iiii (func (param i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\11\00\00\00 ") + (data (i32.const 24) "r\00u\00n\00t\00i\00m\00e\00/\00f\00l\00a\00g\00s\00.\00t\00s") + (data (i32.const 56) "\11\00\00\00,") + (data (i32.const 72) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 120) "\11\00\00\00(") + (data (i32.const 136) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 176) ";\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\19\00\00\00\0f\00\00\00)\00\00\00\0f\00\00\00I\00\00\00\0f\00\00\00\89\00\00\00\0f\00\00\00\t\01\00\00\0f\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0f\00\00\00I\06\00\00\0f\00\00\00\1a\00\00\00\00\00\00\00*\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00\n\01\00\00\00\00\00\00J\04\00\00\00\00\00\00J\06\00\00\00\00\00\00\1c\80\00\00\00\00\00\00,@\00\00\00\00\00\00L \00\00\00\00\00\00\8c\10\00\00\00\00\00\00\0c\t\00\00\00\00\00\00\1c \02\00\00\00\00\00\1c \03\00\00\00\00\00L\0c\00\00\00\00\00\00L\0e\00\00\00\00\00\00L&\03\00\00\00\00\00\08") + (data (i32.const 560) "A\04\00\00\0f\00\00\00\08") + (data (i32.const 584) "B\04\00\00\00\00\00\00\08") + (data (i32.const 608) "D \02") + (data (i32.const 624) "D$\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08") + (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 $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/runtime/runtime.flags (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 176 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 176 + i32.add + i32.load + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 2 ;) (type $FUNCSIG$v) + i32.const 18 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 320 + i32.load + end + i32.const 25 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 3 ;) (type $FUNCSIG$v) + i32.const 19 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 328 + i32.load + end + i32.const 41 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 4 ;) (type $FUNCSIG$v) + i32.const 20 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 336 + i32.load + end + i32.const 73 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 5 ;) (type $FUNCSIG$v) + i32.const 21 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 344 + i32.load + end + i32.const 137 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 6 ;) (type $FUNCSIG$v) + i32.const 22 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 352 + i32.load + end + i32.const 265 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 7 ;) (type $FUNCSIG$v) + i32.const 24 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 368 + i32.load + end + i32.const 1097 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 8 ;) (type $FUNCSIG$v) + i32.const 25 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 376 + i32.load + end + i32.const 1609 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 9 ;) (type $FUNCSIG$v) + i32.const 26 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 384 + i32.load + end + i32.const 26 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 10 ;) (type $FUNCSIG$v) + i32.const 27 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 392 + i32.load + end + i32.const 42 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 11 ;) (type $FUNCSIG$v) + i32.const 28 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 400 + i32.load + end + i32.const 74 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 12 ;) (type $FUNCSIG$v) + i32.const 29 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 408 + i32.load + end + i32.const 138 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 13 ;) (type $FUNCSIG$v) + i32.const 30 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 416 + i32.load + end + i32.const 266 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 14 ;) (type $FUNCSIG$v) + i32.const 31 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 424 + i32.load + end + i32.const 1098 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 15 ;) (type $FUNCSIG$v) + i32.const 32 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 432 + i32.load + end + i32.const 1610 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 16 ;) (type $FUNCSIG$v) + i32.const 33 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 440 + i32.load + end + i32.const 32796 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 17 ;) (type $FUNCSIG$v) + i32.const 34 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 448 + i32.load + end + i32.const 16428 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 18 ;) (type $FUNCSIG$v) + i32.const 35 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 456 + i32.load + end + i32.const 8268 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 19 ;) (type $FUNCSIG$v) + i32.const 36 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 464 + i32.load + end + i32.const 4236 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 20 ;) (type $FUNCSIG$v) + i32.const 37 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 472 + i32.load + end + i32.const 2316 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 21 ;) (type $FUNCSIG$v) + i32.const 38 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 480 + i32.load + end + i32.const 139292 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 22 ;) (type $FUNCSIG$v) + i32.const 39 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 488 + i32.load + end + i32.const 204828 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 23 ;) (type $FUNCSIG$v) + i32.const 40 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 496 + i32.load + end + i32.const 3148 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 24 ;) (type $FUNCSIG$v) + i32.const 41 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 504 + i32.load + end + i32.const 3660 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 25 ;) (type $FUNCSIG$v) + i32.const 42 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 512 + i32.load + end + i32.const 206412 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 26 ;) (type $FUNCSIG$v) + i32.const 43 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 520 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 27 ;) (type $FUNCSIG$v) + i32.const 44 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 528 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 28 ;) (type $FUNCSIG$v) + i32.const 45 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 536 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 29 ;) (type $FUNCSIG$v) + i32.const 47 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 552 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 30 ;) (type $FUNCSIG$v) + i32.const 49 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 568 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 31 ;) (type $FUNCSIG$v) + i32.const 50 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 576 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 32 ;) (type $FUNCSIG$v) + i32.const 52 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 592 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 33 ;) (type $FUNCSIG$v) + i32.const 53 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 600 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 34 ;) (type $FUNCSIG$v) + i32.const 55 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 616 + i32.load + end + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 35 ;) (type $FUNCSIG$v) + i32.const 57 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 632 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 36 ;) (type $FUNCSIG$v) + i32.const 58 + i32.const 176 + i32.load + i32.gt_u + if (result i32) + unreachable + else + i32.const 640 + i32.load + end + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:runtime/flags (; 37 ;) (type $FUNCSIG$v) + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/array/Array> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/set/Set> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test<~lib/map/Map> + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + block + call $runtime/flags/test + end + ) + (func $~lib/runtime/runtime.instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 176 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 176 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 39 ;) (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 72 + i32.const 165 + i32.const 4 + call $~lib/builtins/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 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $2 + i32.const 32 + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 189 + i32.const 4 + call $~lib/builtins/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 (; 41 ;) (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 72 + i32.const 110 + i32.const 4 + call $~lib/builtins/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 72 + i32.const 111 + i32.const 11 + call $~lib/builtins/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 452 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + i32.const 32 + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 181 + i32.const 4 + call $~lib/builtins/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 (; 44 ;) (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 72 + i32.const 159 + i32.const 4 + call $~lib/builtins/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 (; 45 ;) (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 $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 276 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.tee $2 + i32.const 16 + i32.ge_u + if (result i32) + local.get $2 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 278 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $2 + local.get $2 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $1 + i32.load offset=8 + local.set $2 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=8 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $3 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $3 + local.get $4 + local.get $2 + call $~lib/allocator/tlsf/Root#setHead + local.get $2 + i32.eqz + if + local.get $0 + local.get $3 + local.get $0 + local.get $3 + 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 $3 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 46 ;) (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 72 + i32.const 102 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 103 + i32.const 11 + call $~lib/builtins/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + if (result i32) + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 352 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 48 ;) (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 72 + i32.const 211 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 213 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $5 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $5 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 231 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $2 + i32.store + end + local.get $5 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 244 + i32.const 4 + call $~lib/builtins/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 $4 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $2 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $2 + i32.store offset=8 + local.get $2 + if + local.get $2 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $4 + 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 $4 + i32.shl + i32.or + i32.store + local.get $0 + local.get $4 + local.get $0 + local.get $4 + 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 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + local.get $2 + i32.le_u + select + select + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 399 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=2912 + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 8 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 72 + i32.const 408 + i32.const 6 + call $~lib/builtins/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 72 + i32.const 417 + i32.const 6 + call $~lib/builtins/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 + local.get $0 + local.get $2 + i32.store offset=2912 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 446 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + 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 72 + i32.const 341 + i32.const 16 + call $~lib/builtins/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 (; 52 ;) (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 $3 + i32.const 1 + i32.and + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 370 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $3 + 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 $4 + 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 $3 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $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 (; 53 ;) (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 $2 + i32.gt_s + if (result i32) + i32.const 1 + local.get $2 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 656 + local.set $2 + i32.const 656 + global.set $~lib/allocator/tlsf/ROOT + i32.const 3568 + i32.const 0 + i32.store + i32.const 656 + i32.const 0 + i32.store + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 656 + 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 656 + 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 656 + i32.const 3576 + 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 + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + 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 + current_memory + local.tee $0 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $0 + 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 + 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 72 + i32.const 507 + i32.const 12 + call $~lib/builtins/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 72 + i32.const 510 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/util/runtime/allocate (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + 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 + i32.const 16 + i32.add + ) + (func $~lib/collector/itcm/maybeInit (; 55 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/collector/itcm/state + i32.eqz + if + 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 + ) + (func $~lib/collector/itcm/ManagedObjectList#push (; 56 ;) (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 $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/__ref_register (; 57 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + 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/util/runtime/register (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 656 + i32.le_u + if + i32.const 0 + i32.const 136 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 136 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + block + local.get $0 + call $~lib/collector/itcm/__ref_register + end + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 17 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/collector/itcm/ManagedObject#makeGray (; 62 ;) (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/__ref_link (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + call $~lib/collector/itcm/maybeInit + global.get $~lib/collector/itcm/white + i32.eqz + local.get $1 + i32.const 16 + i32.sub + local.tee $1 + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + if (result i32) + global.get $~lib/collector/itcm/white + local.get $0 + i32.const 16 + i32.sub + i32.load offset=8 + i32.const 3 + i32.and + i32.eq + else + i32.const 0 + end + if + local.get $1 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/runtime.newArray (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + local.tee $3 + if (result i32) + local.get $3 + i32.const 176 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $3 + i32.const 3 + i32.shl + i32.const 176 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $5 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $4 + local.get $3 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + local.set $3 + local.get $2 + i32.load + local.get $1 + i32.ne + if + local.get $1 + local.get $3 + call $~lib/collector/itcm/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $4 + local.get $5 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $4 + i32.add + local.set $4 + loop $continue|0 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + local.get $2 + call $~lib/collector/itcm/__ref_link + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 66 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/allocator/tlsf/__mem_free (; 67 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 72 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + 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 72 + i32.const 524 + i32.const 6 + call $~lib/builtins/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 (; 68 ;) (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 + unreachable + end + call $~lib/runtime/__gc_mark_roots + 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.load + local.get $0 + i32.const 16 + i32.add + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + 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 656 + 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_collect (; 69 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + ) + (func $~lib/runtime/runtime.collect (; 70 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $start (; 71 ;) (type $FUNCSIG$v) + call $start:runtime/flags + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 59 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 72 ;) (type $FUNCSIG$vi) (param $0 i32) + call $~lib/collector/itcm/maybeInit + 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/runtime/__gc_mark_roots (; 73 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/array/Array#__traverse (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $2 + call $~lib/runtime/__gc_mark_members + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/array/Array#__traverse (; 75 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/set/Set#__traverse (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/set/Set#__traverse (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + local.get $1 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + end + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 79 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 80 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load offset=4 + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load offset=4 + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.load offset=4 + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/array/Array#__traverse (; 83 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.tee $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 47 + local.get $2 + call $~lib/runtime/__gc_mark_members + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/set/Set#__traverse (; 84 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 3 + i32.shl + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 50 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 8 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 53 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/map/Map#__traverse (; 86 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.tee $1 + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=16 + i32.const 12 + i32.mul + local.get $1 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $1 + i32.load offset=4 + local.tee $2 + call $~lib/collector/itcm/__ref_mark + i32.const 55 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 12 + i32.add + local.set $1 + br $continue|0 + end + end + ) + (func $~lib/runtime/__gc_mark_members (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $folding-inner1 + block $folding-inner0 + block $invalid + block $~lib/runtime/Root + block $runtime/flags/InnerCycleMapValue + block $runtime/flags/InnerCycleMapKey + block $~lib/map/Map + block $runtime/flags/IndirectCycleMapValue + block $~lib/map/Map + block $runtime/flags/IndirectCycleMapKey + block $runtime/flags/InnerCycleSet + block $~lib/set/Set + block $runtime/flags/IndirectCycleSet + block $runtime/flags/InnerCycleArray + block $~lib/array/Array + block $runtime/flags/IndirectCycleArray + block $runtime/flags/IndirectCycleBack + block $runtime/flags/IndirectCycle + block $runtime/flags/DirectCycle + block $runtime/flags/NoCycle + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $runtime/flags/Ref + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/vector/V128 + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + i32.const 1 + i32.sub + br_table $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/vector/V128 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $folding-inner0 $runtime/flags/Ref $~lib/array/Array $~lib/array/Array $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/set/Set $~lib/set/Set $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $folding-inner1 $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $runtime/flags/NoCycle $runtime/flags/DirectCycle $runtime/flags/IndirectCycle $runtime/flags/IndirectCycleBack $runtime/flags/IndirectCycleArray $~lib/array/Array $runtime/flags/InnerCycleArray $runtime/flags/IndirectCycleSet $~lib/set/Set $runtime/flags/InnerCycleSet $runtime/flags/IndirectCycleMapKey $~lib/map/Map $runtime/flags/IndirectCycleMapValue $~lib/map/Map $runtime/flags/InnerCycleMapKey $runtime/flags/InnerCycleMapValue $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 16 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + return + end + return + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 44 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 46 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 45 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 48 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 47 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 51 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 50 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 54 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 56 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 53 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + i32.const 55 + local.get $0 + call $~lib/runtime/__gc_mark_members + end + return + end + return + end + unreachable + end + local.get $1 + i32.load + call $~lib/collector/itcm/__ref_mark + return + end + local.get $1 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $1 + i32.load offset=8 + call $~lib/collector/itcm/__ref_mark + ) + (func $null (; 88 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime/flags.ts b/tests/compiler/runtime/flags.ts new file mode 100644 index 0000000000..2c642c9a7d --- /dev/null +++ b/tests/compiler/runtime/flags.ts @@ -0,0 +1,121 @@ +import { runtime, __runtime_id } from "runtime"; +import { RTTIFlags } from "common/rtti"; + +function test(flags: RTTIFlags): void { + assert( + runtime.flags(__runtime_id()) + == + flags + ); +} + +// structure flags + +class Ref {} + +const VALUE_ALIGN_REF = sizeof() == 4 ? RTTIFlags.VALUE_ALIGN_2 : RTTIFlags.VALUE_ALIGN_3; +const KEY_ALIGN_REF = sizeof() == 4 ? RTTIFlags.KEY_ALIGN_2 : RTTIFlags.KEY_ALIGN_3; + +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | VALUE_ALIGN_REF | RTTIFlags.VALUE_MANAGED); +test>(RTTIFlags.ARRAY | RTTIFlags.ACYCLIC | VALUE_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED); + +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | VALUE_ALIGN_REF | RTTIFlags.VALUE_MANAGED); +test>(RTTIFlags.SET | RTTIFlags.ACYCLIC | VALUE_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED); + +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_4 | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_3 | RTTIFlags.VALUE_ALIGN_1); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_2 | RTTIFlags.VALUE_ALIGN_2); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_1 | RTTIFlags.VALUE_ALIGN_3); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_ALIGN_4); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | KEY_ALIGN_REF | RTTIFlags.KEY_MANAGED | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC |KEY_ALIGN_REF | RTTIFlags.KEY_NULLABLE | RTTIFlags.KEY_MANAGED | RTTIFlags.VALUE_ALIGN_0); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_ALIGN_0 | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); +test>(RTTIFlags.MAP | RTTIFlags.ACYCLIC | RTTIFlags.KEY_NULLABLE | RTTIFlags.KEY_MANAGED | KEY_ALIGN_REF | RTTIFlags.VALUE_NULLABLE | RTTIFlags.VALUE_MANAGED | VALUE_ALIGN_REF); + +// cycle detection + +class NoCycle { + a: i32; +} + +test(RTTIFlags.ACYCLIC); + +class DirectCycle { + a: DirectCycle; +} + +test(RTTIFlags.NONE); + +class IndirectCycle { + a: IndirectCycleBack; +} +class IndirectCycleBack { + a: IndirectCycle; +} + +test(RTTIFlags.NONE); + +// array + +class IndirectCycleArray { + a: Array; +} + +test(RTTIFlags.NONE); + +class InnerCycleArray { + a: IndirectCycleArray; +} + +test(RTTIFlags.ACYCLIC); + +// set + +class IndirectCycleSet { + a: Set; +} + +test(RTTIFlags.NONE); + +class InnerCycleSet { + a: IndirectCycleSet; +} + +test(RTTIFlags.ACYCLIC); + +// map + +class IndirectCycleMapKey { + a: Map; +} + +test(RTTIFlags.NONE); + +class IndirectCycleMapValue { + a: Map; +} + +test(RTTIFlags.NONE); + +class InnerCycleMapKey { + a: IndirectCycleMapKey; +} + +test(RTTIFlags.ACYCLIC); + +class InnerCycleMapValue { + a: IndirectCycleMapValue; +} + +test(RTTIFlags.ACYCLIC); diff --git a/tests/compiler/runtime/flags.untouched.wat b/tests/compiler/runtime/flags.untouched.wat new file mode 100644 index 0000000000..8f396002f6 --- /dev/null +++ b/tests/compiler/runtime/flags.untouched.wat @@ -0,0 +1,3992 @@ +(module + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (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$iiii (func (param i32 i32 i32) (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\11\00\00\00 \00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00f\00l\00a\00g\00s\00.\00t\00s\00") + (data (i32.const 56) "\11\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 120) "\11\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 176) ";\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\19\00\00\00\0f\00\00\00)\00\00\00\0f\00\00\00I\00\00\00\0f\00\00\00\89\00\00\00\0f\00\00\00\t\01\00\00\0f\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0f\00\00\00I\06\00\00\0f\00\00\00\1a\00\00\00\00\00\00\00*\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00\n\01\00\00\00\00\00\00J\04\00\00\00\00\00\00J\06\00\00\00\00\00\00\1c\80\00\00\00\00\00\00,@\00\00\00\00\00\00L \00\00\00\00\00\00\8c\10\00\00\00\00\00\00\0c\t\00\00\00\00\00\00\1c \02\00\00\00\00\00\1c \03\00\00\00\00\00L\0c\00\00\00\00\00\00L\0e\00\00\00\00\00\00L&\03\00\00\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00A\04\00\00\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00B\04\00\00\00\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00D \02\00\00\00\00\00\00\00\00\00\00\00\00\00D$\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $runtime/flags/VALUE_ALIGN_REF i32 (i32.const 64)) + (global $runtime/flags/KEY_ALIGN_REF i32 (i32.const 8192)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (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 $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 176)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 656)) + (export "memory" (memory $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/runtime/runtime.flags (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 18 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 19 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 20 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 21 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 22 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 24 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/array/Array> (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 25 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 26 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 27 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 28 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 29 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 30 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 31 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/set/Set> (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 32 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 33 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 34 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 35 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 36 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 37 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 38 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 39 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 40 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 41 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test<~lib/map/Map> (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 42 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 43 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 44 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 45 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 47 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 49 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 50 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 52 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 33 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 53 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 55 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 57 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/flags/test (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 58 + call $~lib/runtime/runtime.flags + local.get $0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 5 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:runtime/flags (; 37 ;) (type $FUNCSIG$v) + i32.const 1 + i32.const 8 + i32.or + i32.const 16 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 8 + i32.or + i32.const 32 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 8 + i32.or + i32.const 64 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 8 + i32.or + i32.const 128 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 8 + i32.or + i32.const 256 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 8 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + i32.const 1024 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 1 + i32.const 8 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + i32.const 512 + i32.or + i32.const 1024 + i32.or + call $runtime/flags/test<~lib/array/Array> + i32.const 2 + i32.const 8 + i32.or + i32.const 16 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 8 + i32.or + i32.const 32 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 8 + i32.or + i32.const 64 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 8 + i32.or + i32.const 128 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 8 + i32.or + i32.const 256 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 8 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + i32.const 1024 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 2 + i32.const 8 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + i32.const 512 + i32.or + i32.const 1024 + i32.or + call $runtime/flags/test<~lib/set/Set> + i32.const 4 + i32.const 8 + i32.or + i32.const 32768 + i32.or + i32.const 16 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + i32.const 16384 + i32.or + i32.const 32 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + i32.const 8192 + i32.or + i32.const 64 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + i32.const 4096 + i32.or + i32.const 128 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + i32.const 2048 + i32.or + i32.const 256 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + global.get $runtime/flags/KEY_ALIGN_REF + i32.or + i32.const 131072 + i32.or + i32.const 16 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + global.get $runtime/flags/KEY_ALIGN_REF + i32.or + i32.const 65536 + i32.or + i32.const 131072 + i32.or + i32.const 16 + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + i32.const 2048 + i32.or + i32.const 1024 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + i32.const 2048 + i32.or + i32.const 512 + i32.or + i32.const 1024 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 4 + i32.const 8 + i32.or + i32.const 65536 + i32.or + i32.const 131072 + i32.or + global.get $runtime/flags/KEY_ALIGN_REF + i32.or + i32.const 512 + i32.or + i32.const 1024 + i32.or + global.get $runtime/flags/VALUE_ALIGN_REF + i32.or + call $runtime/flags/test<~lib/map/Map> + i32.const 8 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 8 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 8 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 0 + call $runtime/flags/test + i32.const 8 + call $runtime/flags/test + i32.const 8 + call $runtime/flags/test + ) + (func $~lib/runtime/runtime.instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/util/runtime/adjust (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 40 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 165 + i32.const 4 + call $~lib/builtins/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 (; 42 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 189 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + 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 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=2912 + ) + (func $~lib/allocator/tlsf/Block#get:right (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 110 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 72 + i32.const 111 + i32.const 11 + call $~lib/builtins/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/fls (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 452 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 181 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + i32.mul + local.get $2 + i32.add + i32.const 4 + i32.mul + i32.add + i32.load offset=96 + ) + (func $~lib/allocator/tlsf/Root#getSLMap (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 159 + i32.const 4 + call $~lib/builtins/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 (; 48 ;) (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 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 276 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 278 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $4 + local.get $3 + i32.const 8 + i32.div_u + local.set $5 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $4 + local.get $3 + local.get $4 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $5 + local.get $4 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $4 + end + local.get $1 + i32.load offset=4 + local.set $6 + local.get $1 + i32.load offset=8 + local.set $7 + local.get $6 + if + local.get $6 + local.get $7 + i32.store offset=8 + end + local.get $7 + if + local.get $7 + local.get $6 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $4 + local.get $5 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $4 + local.get $5 + local.get $7 + call $~lib/allocator/tlsf/Root#setHead + local.get $7 + i32.eqz + if + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $8 + local.get $0 + local.get $4 + local.get $8 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $8 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $8 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 102 + i32.const 4 + call $~lib/builtins/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 72 + i32.const 103 + i32.const 11 + call $~lib/builtins/abort + unreachable + else + local.get $1 + end + ) + (func $~lib/allocator/tlsf/Root#setJump (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.const 0 + i32.ne + if (result i32) + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 352 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 4 + i32.sub + local.get $1 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 51 ;) (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 72 + i32.const 211 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 213 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + i32.const 8 + local.get $4 + i32.const 3 + 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 $3 + local.get $3 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 231 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $5 + local.get $6 + i32.const 8 + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $6 + i32.store + local.get $5 + local.set $1 + local.get $6 + local.set $2 + end + local.get $3 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $0 + local.get $1 + local.get $3 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $7 + local.get $7 + i32.const 16 + i32.ge_u + if (result i32) + local.get $7 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 244 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $7 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $7 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $7 + local.get $8 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $9 + local.get $8 + i32.const 8 + 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 (; 52 ;) (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 + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 399 + i32.const 4 + call $~lib/builtins/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 8 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 408 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $1 + i32.const 8 + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 417 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + i32.const 8 + i32.const 16 + i32.add + i32.const 8 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + i32.const 8 + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + i32.const 1 + i32.or + local.get $4 + i32.const 2 + 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 + i32.const 8 + i32.sub + local.set $8 + local.get $8 + i32.const 0 + i32.const 2 + 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 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 446 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/ffs (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 446 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 55 ;) (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 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + local.set $3 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $2 + local.get $1 + local.get $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + local.get $3 + i32.const 32 + i32.const 1 + i32.sub + i32.lt_u + if + local.get $3 + i32.const 1 + i32.add + local.set $3 + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + local.set $3 + end + end + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.shl + i32.and + local.set $4 + local.get $4 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $6 + local.get $6 + i32.eqz + if + i32.const 0 + local.set $5 + else + local.get $6 + call $~lib/allocator/tlsf/ffs + local.set $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 72 + i32.const 341 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.set $4 + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $5 + end + else + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $5 + end + local.get $5 + ) + (func $~lib/allocator/tlsf/Root#use (; 56 ;) (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 + i32.const 1 + i32.and + i32.const 0 + i32.ne + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 370 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $4 + local.get $4 + i32.const 8 + i32.const 16 + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.set $5 + local.get $5 + local.get $4 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + i32.const 1 + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + local.get $5 + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + i32.const 8 + i32.add + ) + (func $~lib/allocator/tlsf/__mem_allocate (; 57 ;) (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 $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + 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 + i32.const 2916 + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + 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 + i32.const 22 + 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 + i32.const 32 + 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 + i32.const 2916 + 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 + i32.const 1073741824 + 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 + i32.const 16 + 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 $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + 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 72 + i32.const 507 + i32.const 12 + call $~lib/builtins/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 510 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $7 + local.get $0 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/memory/memory.allocate (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 59 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/collector/itcm/ManagedObjectList#clear (; 60 ;) (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/maybeInit (; 61 ;) (type $FUNCSIG$v) + global.get $~lib/collector/itcm/state + i32.const 0 + i32.eq + if + global.get $~lib/util/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/util/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 + ) + (func $~lib/collector/itcm/ManagedObject#set:color (; 62 ;) (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/ManagedObject#set:next (; 63 ;) (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/ManagedObjectList#push (; 64 ;) (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/__ref_register (; 65 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/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/util/runtime/register (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/itcm/__ref_register + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 17 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 70 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/collector/itcm/ManagedObject#get:color (; 71 ;) (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 (; 72 ;) (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#unlink (; 73 ;) (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/ManagedObject#makeGray (; 74 ;) (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/__ref_link (; 75 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + 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 + if (result i32) + block $~lib/collector/itcm/refToObj|inlined.3 (result i32) + local.get $0 + local.set $2 + local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + end + call $~lib/collector/itcm/ManagedObject#get:color + global.get $~lib/collector/itcm/white + i32.eq + else + i32.const 0 + end + if + local.get $3 + call $~lib/collector/itcm/ManagedObject#makeGray + end + ) + (func $~lib/runtime/runtime.newArray (; 76 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + nop + local.get $7 + local.get $6 + call $~lib/collector/itcm/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/itcm/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 59 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/itcm/__ref_link + ) + (func $~lib/runtime/runtime.release (; 79 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/allocator/tlsf/__mem_free (; 80 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + i32.const 8 + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 524 + i32.const 6 + call $~lib/builtins/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/memory/memory.free (; 81 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/collector/itcm/step (; 82 ;) (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 + unreachable + end + block + call $~lib/runtime/__gc_mark_roots + 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 + local.get $0 + i32.load + block $~lib/collector/itcm/objToRef|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + end + call $~lib/runtime/__gc_mark_members + else + call $~lib/runtime/__gc_mark_roots + 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_collect (; 83 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/maybeInit + block $break|0 + loop $continue|0 + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + if + call $~lib/collector/itcm/step + br $continue|0 + end + end + end + block $break|1 + loop $continue|1 + call $~lib/collector/itcm/step + global.get $~lib/collector/itcm/state + i32.const 1 + i32.ne + br_if $continue|1 + end + end + ) + (func $~lib/runtime/runtime.collect (; 84 ;) (type $FUNCSIG$v) + call $~lib/collector/itcm/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 86 ;) (type $FUNCSIG$v) + call $start:runtime/flags + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $~lib/collector/itcm/__ref_mark (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/collector/itcm/maybeInit + block $~lib/collector/itcm/refToObj|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + global.get $~lib/util/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/runtime/__gc_mark_roots (; 88 ;) (type $FUNCSIG$v) + (local $0 i32) + global.get $~lib/runtime/ROOT + local.tee $0 + if + local.get $0 + call $~lib/collector/itcm/__ref_mark + end + ) + (func $~lib/array/Array#__traverse (; 89 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 90 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 93 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/array/Array#__traverse (; 94 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + block $break|0 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + block + local.get $1 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $3 + call $~lib/runtime/__gc_mark_members + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array#__traverse (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + block $break|0 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + block + local.get $1 + i32.load + local.set $3 + local.get $3 + if + local.get $3 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $3 + call $~lib/runtime/__gc_mark_members + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + br $continue|0 + end + end + end + ) + (func $~lib/set/Set#__traverse (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 97 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 98 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 99 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 100 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/set/Set#__traverse (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/set/ENTRY_SIZE|inlined.0 (result i32) + i32.const 8 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/set/ENTRY_SIZE|inlined.1 (result i32) + i32.const 8 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/set/Set#__traverse (; 102 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/set/ENTRY_SIZE|inlined.0 (result i32) + i32.const 8 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + end + local.get $2 + block $~lib/set/ENTRY_SIZE|inlined.1 (result i32) + i32.const 8 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 103 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 104 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 106 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 107 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + ) + (func $~lib/map/Map#__traverse (; 108 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 109 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 110 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 111 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 112 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + if + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 23 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/array/Array#__traverse (; 113 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + local.get $0 + i32.load offset=8 + i32.add + local.set $2 + block $break|0 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + block + local.get $1 + i32.load + local.set $3 + local.get $3 + call $~lib/collector/itcm/__ref_mark + i32.const 47 + local.get $3 + call $~lib/runtime/__gc_mark_members + local.get $1 + i32.const 4 + i32.add + local.set $1 + end + br $continue|0 + end + end + end + ) + (func $~lib/set/Set#__traverse (; 114 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/set/ENTRY_SIZE|inlined.0 (result i32) + i32.const 8 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=4 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 50 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/set/ENTRY_SIZE|inlined.1 (result i32) + i32.const 8 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 115 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 53 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/map/Map#__traverse (; 116 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load + call $~lib/collector/itcm/__ref_mark + local.get $0 + i32.load offset=8 + local.set $1 + local.get $1 + call $~lib/collector/itcm/__ref_mark + local.get $1 + local.set $2 + local.get $2 + local.get $0 + i32.load offset=16 + block $~lib/map/ENTRY_SIZE|inlined.0 (result i32) + i32.const 12 + end + i32.mul + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + local.set $4 + local.get $4 + i32.load offset=8 + i32.const 1 + i32.and + i32.eqz + if + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + call $~lib/collector/itcm/__ref_mark + i32.const 55 + local.get $5 + call $~lib/runtime/__gc_mark_members + end + local.get $2 + block $~lib/map/ENTRY_SIZE|inlined.1 (result i32) + i32.const 12 + end + i32.add + local.set $2 + end + br $continue|0 + end + end + end + ) + (func $~lib/runtime/__gc_mark_members (; 117 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $invalid + block $~lib/runtime/Root + block $runtime/flags/InnerCycleMapValue + block $runtime/flags/InnerCycleMapKey + block $~lib/map/Map + block $runtime/flags/IndirectCycleMapValue + block $~lib/map/Map + block $runtime/flags/IndirectCycleMapKey + block $runtime/flags/InnerCycleSet + block $~lib/set/Set + block $runtime/flags/IndirectCycleSet + block $runtime/flags/InnerCycleArray + block $~lib/array/Array + block $runtime/flags/IndirectCycleArray + block $runtime/flags/IndirectCycleBack + block $runtime/flags/IndirectCycle + block $runtime/flags/DirectCycle + block $runtime/flags/NoCycle + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/map/Map + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/set/Set + block $~lib/array/Array + block $~lib/array/Array + block $runtime/flags/Ref + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/array/Array + block $~lib/string/String + block $~lib/arraybuffer/ArrayBuffer + block $~lib/arraybuffer/ArrayBufferView + block $~lib/vector/V128 + block $~lib/number/F64 + block $~lib/number/F32 + block $~lib/number/Bool + block $~lib/number/Usize + block $~lib/number/U64 + block $~lib/number/U32 + block $~lib/number/U16 + block $~lib/number/U8 + block $~lib/number/Isize + block $~lib/number/I64 + block $~lib/number/I32 + block $~lib/number/I16 + block $~lib/number/I8 + local.get $0 + br_table $invalid $~lib/number/I8 $~lib/number/I16 $~lib/number/I32 $~lib/number/I64 $~lib/number/Isize $~lib/number/U8 $~lib/number/U16 $~lib/number/U32 $~lib/number/U64 $~lib/number/Usize $~lib/number/Bool $~lib/number/F32 $~lib/number/F64 $~lib/vector/V128 $~lib/arraybuffer/ArrayBufferView $~lib/arraybuffer/ArrayBuffer $~lib/string/String $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $~lib/array/Array $runtime/flags/Ref $~lib/array/Array $~lib/array/Array $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/set/Set $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $~lib/map/Map $runtime/flags/NoCycle $runtime/flags/DirectCycle $runtime/flags/IndirectCycle $runtime/flags/IndirectCycleBack $runtime/flags/IndirectCycleArray $~lib/array/Array $runtime/flags/InnerCycleArray $runtime/flags/IndirectCycleSet $~lib/set/Set $runtime/flags/InnerCycleSet $runtime/flags/IndirectCycleMapKey $~lib/map/Map $runtime/flags/IndirectCycleMapValue $~lib/map/Map $runtime/flags/InnerCycleMapKey $runtime/flags/InnerCycleMapValue $~lib/runtime/Root $invalid + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 16 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + return + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 44 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 46 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 45 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 48 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/array/Array#__traverse + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 47 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 51 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/set/Set#__traverse + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 50 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 54 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 56 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + call $~lib/map/Map#__traverse + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 53 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + local.get $1 + i32.load + local.tee $2 + if + local.get $2 + call $~lib/collector/itcm/__ref_mark + i32.const 55 + local.get $2 + call $~lib/runtime/__gc_mark_members + end + return + end + return + end + unreachable + ) + (func $null (; 118 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/runtime/instanceof.json b/tests/compiler/runtime/instanceof.json new file mode 100644 index 0000000000..85b9ce0f6e --- /dev/null +++ b/tests/compiler/runtime/instanceof.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime arena" + ] +} \ No newline at end of file diff --git a/tests/compiler/runtime/instanceof.optimized.wat b/tests/compiler/runtime/instanceof.optimized.wat new file mode 100644 index 0000000000..0f9b512d38 --- /dev/null +++ b/tests/compiler/runtime/instanceof.optimized.wat @@ -0,0 +1,888 @@ +(module + (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$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\16") + (data (i32.const 80) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r") + (data (i32.const 104) "\10\00\00\00*") + (data (i32.const 120) "r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") + (data (i32.const 168) "\10\00\00\00\0e") + (data (i32.const 184) "g\00c\00.\00l\00i\00n\00k") + (data (i32.const 200) "\10\00\00\00\12") + (data (i32.const 216) "g\00c\00.\00u\00n\00l\00i\00n\00k") + (data (i32.const 240) "\10\00\00\00\14") + (data (i32.const 256) "g\00c\00.\00c\00o\00l\00l\00e\00c\00t") + (data (i32.const 280) "\15\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\11\00\00\00\08\00\00\00\12\00\00\00I\00\00\00\0e\00\00\00\08") + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (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 $runtime/instanceof/animal (mut i32) (i32.const 0)) + (global $runtime/instanceof/cat (mut i32) (i32.const 0)) + (global $runtime/instanceof/blackcat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableAnimal (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableCat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableBlackcat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullAnimal (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullCat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullBlackcat (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $runtime/instanceof/main)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (func $~lib/allocator/arena/__mem_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/util/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 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + 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 + i32.const 16 + i32.add + ) + (func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 456 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $runtime/instanceof/Animal#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + end + ) + (func $runtime/instanceof/Cat#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + end + call $runtime/instanceof/Animal#constructor + ) + (func $runtime/instanceof/BlackCat#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + call $runtime/instanceof/Cat#constructor + ) + (func $~lib/runtime/runtime.instanceof (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 280 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $start:runtime/instanceof (; 10 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 456 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 0 + call $runtime/instanceof/Animal#constructor + global.set $runtime/instanceof/animal + i32.const 0 + call $runtime/instanceof/Cat#constructor + global.set $runtime/instanceof/cat + call $runtime/instanceof/BlackCat#constructor + global.set $runtime/instanceof/blackcat + global.get $runtime/instanceof/animal + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/animal + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 14 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/cat + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 17 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/cat + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 18 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/blackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 21 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/blackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 22 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $runtime/instanceof/Animal#constructor + global.set $runtime/instanceof/nullableAnimal + i32.const 0 + call $runtime/instanceof/Cat#constructor + global.set $runtime/instanceof/nullableCat + call $runtime/instanceof/BlackCat#constructor + global.set $runtime/instanceof/nullableBlackcat + global.get $runtime/instanceof/nullableAnimal + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 28 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableAnimal + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 29 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableAnimal + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 30 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 32 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 33 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 34 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 36 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 37 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 38 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + if + i32.const 0 + i32.const 120 + i32.const 44 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 45 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 46 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullCat + if + i32.const 0 + i32.const 120 + i32.const 48 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullCat + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 49 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullCat + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 50 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + if + i32.const 0 + i32.const 120 + i32.const 52 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 53 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + local.tee $0 + if (result i32) + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + else + i32.const 0 + end + if + i32.const 0 + i32.const 120 + i32.const 54 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/instanceof/main (; 11 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:runtime/instanceof + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + i32.const 1 + global.set $~lib/started + end + ) + (func $~lib/runtime/runtime.flags (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 280 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $gc/_dummy/__ref_link (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 184 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/link_count + i32.const 1 + i32.add + global.set $gc/_dummy/link_count + local.get $0 + global.set $gc/_dummy/link_ref + local.get $0 + global.set $gc/_dummy/link_parentRef + ) + (func $gc/_dummy/__ref_unlink (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 216 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/unlink_count + i32.const 1 + i32.add + global.set $gc/_dummy/unlink_count + local.get $0 + global.set $gc/_dummy/unlink_ref + local.get $1 + global.set $gc/_dummy/unlink_parentRef + ) + (func $~lib/runtime/runtime.newArray (; 18 ;) (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 + local.tee $3 + if (result i32) + local.get $3 + i32.const 280 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $3 + i32.const 3 + i32.shl + i32.const 280 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $6 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $4 + local.get $3 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + local.set $5 + local.get $2 + i32.load + local.tee $3 + local.get $1 + i32.ne + if + local.get $3 + if + local.get $3 + local.get $5 + call $gc/_dummy/__ref_unlink + end + local.get $1 + local.get $5 + call $gc/_dummy/__ref_link + end + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $4 + local.get $6 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $4 + i32.add + local.set $4 + loop $continue|0 + local.get $1 + local.get $4 + i32.lt_u + if + local.get $1 + i32.load + local.tee $0 + if + local.get $0 + local.get $2 + call $gc/_dummy/__ref_link + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_unlink + ) + (func $~lib/runtime/runtime.collect (; 21 ;) (type $FUNCSIG$v) + i32.const 256 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/collect_count + i32.const 1 + i32.add + global.set $gc/_dummy/collect_count + ) + (func $null (; 22 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/runtime/instanceof.ts b/tests/compiler/runtime/instanceof.ts new file mode 100644 index 0000000000..9c66214116 --- /dev/null +++ b/tests/compiler/runtime/instanceof.ts @@ -0,0 +1,56 @@ +import { __runtime_id } from "runtime"; +import "../gc/_dummy"; + +class Animal {} +class Cat extends Animal {} +class BlackCat extends Cat {} + +var animal: Animal = new Animal(); +var cat: Animal = new Cat(); +var blackcat: Animal = new BlackCat(); + +assert(animal instanceof Animal); // static true +assert(!(animal instanceof Cat)); // dynamic false +assert(!(animal instanceof BlackCat)); // dynamic false + +assert(cat instanceof Animal); // static true +assert(cat instanceof Cat); // dynamic true +assert(!(cat instanceof BlackCat)); // dynamic false + +assert(blackcat instanceof Animal); // static true +assert(blackcat instanceof Cat); // dynamic true +assert(blackcat instanceof BlackCat); // dynamic true + +var nullableAnimal: Animal | null = new Animal(); +var nullableCat: Animal | null = new Cat(); +var nullableBlackcat: Animal | null = new BlackCat(); + +assert(nullableAnimal instanceof Animal); // static true +assert(!(nullableAnimal instanceof Cat)); // dynamic false +assert(!(nullableAnimal instanceof BlackCat)); // dynamic false + +assert(nullableCat instanceof Animal); // static true +assert(nullableCat instanceof Cat); // dynamic true +assert(!(nullableCat instanceof BlackCat)); // dynamic false + +assert(nullableBlackcat instanceof Animal); // static true +assert(nullableBlackcat instanceof Cat); // dynamic true +assert(nullableBlackcat instanceof BlackCat); // dynamic true + +var nullAnimal: Animal | null = null; +var nullCat: Animal | null = null; +var nullBlackcat: Animal | null = null; + +assert(!(nullAnimal instanceof Animal)); // static false +assert(!(nullAnimal instanceof Cat)); // dynamic false +assert(!(nullAnimal instanceof BlackCat)); // dynamic false + +assert(!(nullCat instanceof Animal)); // static false +assert(!(nullCat instanceof Cat)); // dynamic false +assert(!(nullCat instanceof BlackCat)); // dynamic false + +assert(!(nullBlackcat instanceof Animal)); // static false +assert(!(nullBlackcat instanceof Cat)); // dynamic false +assert(!(nullBlackcat instanceof BlackCat)); // dynamic false + +@start export function main(): void {} diff --git a/tests/compiler/runtime/instanceof.untouched.wat b/tests/compiler/runtime/instanceof.untouched.wat new file mode 100644 index 0000000000..d3bee43c27 --- /dev/null +++ b/tests/compiler/runtime/instanceof.untouched.wat @@ -0,0 +1,1071 @@ +(module + (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$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vii (func (param i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r\00") + (data (i32.const 104) "\10\00\00\00*\00\00\00\00\00\00\00\00\00\00\00r\00u\00n\00t\00i\00m\00e\00/\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (data (i32.const 168) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00l\00i\00n\00k\00") + (data (i32.const 200) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00u\00n\00l\00i\00n\00k\00") + (data (i32.const 240) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00g\00c\00.\00c\00o\00l\00l\00e\00c\00t\00") + (data (i32.const 280) "\15\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\11\00\00\00\08\00\00\00\12\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $gc/_dummy/collect_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_count (mut i32) (i32.const 0)) + (global $gc/_dummy/register_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_count (mut i32) (i32.const 0)) + (global $gc/_dummy/link_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/link_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_count (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_ref (mut i32) (i32.const 0)) + (global $gc/_dummy/unlink_parentRef (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_count (mut i32) (i32.const 0)) + (global $gc/_dummy/mark_ref (mut i32) (i32.const 0)) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $runtime/instanceof/animal (mut i32) (i32.const 0)) + (global $runtime/instanceof/cat (mut i32) (i32.const 0)) + (global $runtime/instanceof/blackcat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableAnimal (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableCat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullableBlackcat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullAnimal (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullCat (mut i32) (i32.const 0)) + (global $runtime/instanceof/nullBlackcat (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 280)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 456)) + (export "memory" (memory $0)) + (export "main" (func $runtime/instanceof/main)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (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/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $gc/_dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 80 + i32.const 1 + local.get $0 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/register_count + i32.const 1 + i32.add + global.set $gc/_dummy/register_count + local.get $0 + global.set $gc/_dummy/register_ref + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $gc/_dummy/__ref_register + local.get $0 + ) + (func $runtime/instanceof/Animal#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $runtime/instanceof/Cat#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + call $runtime/instanceof/Animal#constructor + local.set $0 + local.get $0 + ) + (func $runtime/instanceof/BlackCat#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + call $runtime/instanceof/Cat#constructor + local.set $0 + local.get $0 + ) + (func $~lib/runtime/runtime.instanceof (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $start:runtime/instanceof (; 12 ;) (type $FUNCSIG$v) + (local $0 i32) + 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 + i32.const 0 + call $runtime/instanceof/Animal#constructor + global.set $runtime/instanceof/animal + i32.const 0 + call $runtime/instanceof/Cat#constructor + global.set $runtime/instanceof/cat + i32.const 0 + call $runtime/instanceof/BlackCat#constructor + global.set $runtime/instanceof/blackcat + block (result i32) + global.get $runtime/instanceof/animal + drop + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/animal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 13 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/animal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 14 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + block (result i32) + global.get $runtime/instanceof/cat + drop + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 16 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/cat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 17 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/cat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 18 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + block (result i32) + global.get $runtime/instanceof/blackcat + drop + i32.const 1 + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 20 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/blackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 21 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/blackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 22 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $runtime/instanceof/Animal#constructor + global.set $runtime/instanceof/nullableAnimal + i32.const 0 + call $runtime/instanceof/Cat#constructor + global.set $runtime/instanceof/nullableCat + i32.const 0 + call $runtime/instanceof/BlackCat#constructor + global.set $runtime/instanceof/nullableBlackcat + global.get $runtime/instanceof/nullableAnimal + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 28 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableAnimal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 29 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableAnimal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 30 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 32 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 33 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableCat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 34 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 36 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 37 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullableBlackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 38 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + i32.const 0 + i32.ne + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 44 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 45 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullAnimal + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 46 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullCat + i32.const 0 + i32.ne + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 48 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullCat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 49 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullCat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 50 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + i32.const 0 + i32.ne + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 52 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 18 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 53 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $runtime/instanceof/nullBlackcat + local.tee $0 + i32.eqz + if (result i32) + i32.const 0 + else + local.get $0 + i32.const 19 + call $~lib/runtime/runtime.instanceof + end + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 54 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $runtime/instanceof/main (; 13 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $~lib/runtime/runtime.flags (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $gc/_dummy/__ref_link (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 184 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/link_count + i32.const 1 + i32.add + global.set $gc/_dummy/link_count + local.get $0 + global.set $gc/_dummy/link_ref + local.get $0 + global.set $gc/_dummy/link_parentRef + ) + (func $gc/_dummy/__ref_unlink (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + i32.const 216 + i32.const 2 + local.get $0 + f64.convert_i32_u + local.get $1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/unlink_count + i32.const 1 + i32.add + global.set $gc/_dummy/unlink_count + local.get $0 + global.set $gc/_dummy/unlink_ref + local.get $1 + global.set $gc/_dummy/unlink_parentRef + ) + (func $~lib/runtime/runtime.newArray (; 21 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $gc/_dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $gc/_dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $gc/_dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $gc/_dummy/__ref_unlink + ) + (func $gc/_dummy/__ref_collect (; 25 ;) (type $FUNCSIG$v) + i32.const 256 + i32.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + global.get $gc/_dummy/collect_count + i32.const 1 + i32.add + global.set $gc/_dummy/collect_count + ) + (func $~lib/runtime/runtime.collect (; 26 ;) (type $FUNCSIG$v) + call $gc/_dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 28 ;) (type $FUNCSIG$v) + call $start:runtime/instanceof + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $null (; 29 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/scoped.json b/tests/compiler/scoped.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/scoped.optimized.wat b/tests/compiler/scoped.optimized.wat index 393c758087..e340413096 100644 --- a/tests/compiler/scoped.optimized.wat +++ b/tests/compiler/scoped.optimized.wat @@ -1,10 +1,7 @@ (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)) (start $start) (func $start:scoped (; 0 ;) (type $FUNCSIG$v) (local $0 i32) diff --git a/tests/compiler/scoped.untouched.wat b/tests/compiler/scoped.untouched.wat index eb15d593b2..f6f37e3def 100644 --- a/tests/compiler/scoped.untouched.wat +++ b/tests/compiler/scoped.untouched.wat @@ -7,9 +7,7 @@ (global $scoped/aGlobal (mut i32) (i32.const 1)) (global $scoped/aConstant i32 (i32.const 3)) (global $scoped/aStartFunctionLocal (mut i32) (i32.const 2)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $scoped/fn (; 0 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) diff --git a/tests/compiler/simd.json b/tests/compiler/simd.json index 15ece5b46c..2344125c9b 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/simd.optimized.wat b/tests/compiler/simd.optimized.wat index 2505ac86a0..78cef42102 100644 --- a/tests/compiler/simd.optimized.wat +++ b/tests/compiler/simd.optimized.wat @@ -1,21 +1,10 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\07\00\00\00s\00i\00m\00d\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) "\11\00\00\00\0e") + (data (i32.const 24) "s\00i\00m\00d\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) (func $start (; 0 ;) (type $FUNCSIG$v) - i32.const 32 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - ) - (func $null (; 1 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/simd.ts b/tests/compiler/simd.ts index 677f95852b..d3642682c3 100644 --- a/tests/compiler/simd.ts +++ b/tests/compiler/simd.ts @@ -1,7 +1,5 @@ // hint: asc tests/compiler/simd --enable simd --validate -import "allocator/arena"; - function test_v128(): void { // equality and inequality assert( diff --git a/tests/compiler/simd.untouched.wat b/tests/compiler/simd.untouched.wat index a4bfc46ad2..a90a70d500 100644 --- a/tests/compiler/simd.untouched.wat +++ b/tests/compiler/simd.untouched.wat @@ -1,31 +1,15 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\07\00\00\00s\00i\00m\00d\00.\00t\00s\00") + (data (i32.const 8) "\11\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00s\00i\00m\00d\00.\00t\00s\00") (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)) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (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 $simd/test_v128 (; 2 ;) (type $FUNCSIG$v) + (func $simd/test_v128 (; 1 ;) (type $FUNCSIG$v) v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d i8x16.eq @@ -35,10 +19,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 7 + i32.const 24 + i32.const 5 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -50,10 +34,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 12 + i32.const 24 + i32.const 10 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -67,10 +51,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 18 + i32.const 24 + i32.const 16 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -84,10 +68,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 25 + i32.const 24 + i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -101,10 +85,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 32 + i32.const 24 + i32.const 30 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -117,10 +101,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 39 + i32.const 24 + i32.const 37 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d @@ -135,14 +119,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 45 + i32.const 24 + i32.const 43 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $simd/test_i8x16 (; 3 ;) (type $FUNCSIG$v) + (func $simd/test_i8x16 (; 2 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -161,10 +145,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 62 + i32.const 24 + i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -179,10 +163,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 64 + i32.const 24 + i32.const 62 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -198,10 +182,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 66 + i32.const 24 + i32.const 64 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -215,10 +199,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 67 + i32.const 24 + i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -232,10 +216,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 68 + i32.const 24 + i32.const 66 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -248,10 +232,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 69 + i32.const 24 + i32.const 67 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -265,10 +249,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 74 + i32.const 24 + i32.const 72 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -282,10 +266,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 75 + i32.const 24 + i32.const 73 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -297,10 +281,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 76 + i32.const 24 + i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -314,10 +298,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 77 + i32.const 24 + i32.const 75 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -331,10 +315,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 82 + i32.const 24 + i32.const 80 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x7f7f7f7e 0x7f7f7f7f 0x7f7f7f7f 0x7f7f7f7f @@ -350,10 +334,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 87 + i32.const 24 + i32.const 85 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0xfffffffe 0xffffffff 0xffffffff 0xffffffff @@ -369,10 +353,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 93 + i32.const 24 + i32.const 91 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x80808081 0x80808080 0x80808080 0x80808080 @@ -388,10 +372,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 99 + i32.const 24 + i32.const 97 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -407,10 +391,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 105 + i32.const 24 + i32.const 103 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -426,10 +410,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 111 + i32.const 24 + i32.const 109 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2 @@ -445,10 +429,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 112 + i32.const 24 + i32.const 110 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -464,10 +448,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 113 + i32.const 24 + i32.const 111 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -479,10 +463,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 114 + i32.const 24 + i32.const 112 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -495,10 +479,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 115 + i32.const 24 + i32.const 113 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -527,10 +511,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 120 + i32.const 24 + i32.const 118 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -544,10 +528,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 121 + i32.const 24 + i32.const 119 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -561,10 +545,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 122 + i32.const 24 + i32.const 120 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -578,10 +562,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 123 + i32.const 24 + i32.const 121 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -595,10 +579,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 124 + i32.const 24 + i32.const 122 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -612,10 +596,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 125 + i32.const 24 + i32.const 123 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -629,10 +613,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 126 + i32.const 24 + i32.const 124 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -646,10 +630,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 127 + i32.const 24 + i32.const 125 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -663,10 +647,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 128 + i32.const 24 + i32.const 126 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -680,14 +664,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 129 + i32.const 24 + i32.const 127 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $simd/test_i16x8 (; 4 ;) (type $FUNCSIG$v) + (func $simd/test_i16x8 (; 3 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -706,10 +690,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 134 + i32.const 24 + i32.const 132 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -724,10 +708,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 136 + i32.const 24 + i32.const 134 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -743,10 +727,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 138 + i32.const 24 + i32.const 136 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -760,10 +744,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 139 + i32.const 24 + i32.const 137 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -777,10 +761,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 140 + i32.const 24 + i32.const 138 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -793,10 +777,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 141 + i32.const 24 + i32.const 139 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -810,10 +794,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 146 + i32.const 24 + i32.const 144 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -827,10 +811,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 147 + i32.const 24 + i32.const 145 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -842,10 +826,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 148 + i32.const 24 + i32.const 146 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -859,10 +843,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 149 + i32.const 24 + i32.const 147 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -876,10 +860,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 154 + i32.const 24 + i32.const 152 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x7fff7ffe 0x7fff7fff 0x7fff7fff 0x7fff7fff @@ -895,10 +879,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 159 + i32.const 24 + i32.const 157 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0xfffffffe 0xffffffff 0xffffffff 0xffffffff @@ -914,10 +898,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 165 + i32.const 24 + i32.const 163 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x80008001 0x80008000 0x80008000 0x80008000 @@ -933,10 +917,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 171 + i32.const 24 + i32.const 169 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -952,10 +936,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 177 + i32.const 24 + i32.const 175 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -971,10 +955,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 183 + i32.const 24 + i32.const 181 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2 @@ -990,10 +974,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 184 + i32.const 24 + i32.const 182 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -1009,10 +993,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 185 + i32.const 24 + i32.const 183 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -1024,10 +1008,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 186 + i32.const 24 + i32.const 184 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1040,10 +1024,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 187 + i32.const 24 + i32.const 185 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1072,10 +1056,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 192 + i32.const 24 + i32.const 190 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1089,10 +1073,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 193 + i32.const 24 + i32.const 191 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1106,10 +1090,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 194 + i32.const 24 + i32.const 192 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1123,10 +1107,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 195 + i32.const 24 + i32.const 193 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1140,10 +1124,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 196 + i32.const 24 + i32.const 194 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1157,10 +1141,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 197 + i32.const 24 + i32.const 195 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1174,10 +1158,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 198 + i32.const 24 + i32.const 196 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1191,10 +1175,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 199 + i32.const 24 + i32.const 197 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1208,10 +1192,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 200 + i32.const 24 + i32.const 198 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1225,14 +1209,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 201 + i32.const 24 + i32.const 199 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $simd/test_i32x4 (; 5 ;) (type $FUNCSIG$v) + (func $simd/test_i32x4 (; 4 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -1251,10 +1235,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 206 + i32.const 24 + i32.const 204 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1269,10 +1253,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 208 + i32.const 24 + i32.const 206 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1288,10 +1272,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 210 + i32.const 24 + i32.const 208 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1305,10 +1289,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 211 + i32.const 24 + i32.const 209 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1322,10 +1306,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 212 + i32.const 24 + i32.const 210 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1338,10 +1322,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 213 + i32.const 24 + i32.const 211 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1351,10 +1335,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 218 + i32.const 24 + i32.const 216 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1364,10 +1348,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 219 + i32.const 24 + i32.const 217 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1381,10 +1365,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 220 + i32.const 24 + i32.const 218 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1398,10 +1382,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 225 + i32.const 24 + i32.const 223 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1417,10 +1401,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 230 + i32.const 24 + i32.const 228 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2 @@ -1436,10 +1420,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 231 + i32.const 24 + i32.const 229 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -1455,10 +1439,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 232 + i32.const 24 + i32.const 230 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -1470,10 +1454,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 233 + i32.const 24 + i32.const 231 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1486,10 +1470,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 234 + i32.const 24 + i32.const 232 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1518,10 +1502,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 239 + i32.const 24 + i32.const 237 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1535,10 +1519,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 240 + i32.const 24 + i32.const 238 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1552,10 +1536,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 241 + i32.const 24 + i32.const 239 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1569,10 +1553,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 242 + i32.const 24 + i32.const 240 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1586,10 +1570,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 243 + i32.const 24 + i32.const 241 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1603,10 +1587,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 24 + i32.const 242 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1620,10 +1604,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 245 + i32.const 24 + i32.const 243 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1637,10 +1621,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 246 + i32.const 24 + i32.const 244 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -1654,10 +1638,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 247 + i32.const 24 + i32.const 245 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -1671,10 +1655,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 248 + i32.const 24 + i32.const 246 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1689,10 +1673,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 249 + i32.const 24 + i32.const 247 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1707,14 +1691,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 254 + i32.const 24 + i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $simd/test_i64x2 (; 6 ;) (type $FUNCSIG$v) + (func $simd/test_i64x2 (; 5 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -1729,10 +1713,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 263 + i32.const 24 + i32.const 261 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -1747,10 +1731,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 265 + i32.const 24 + i32.const 263 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1766,10 +1750,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 267 + i32.const 24 + i32.const 265 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1783,10 +1767,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 268 + i32.const 24 + i32.const 266 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1799,10 +1783,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 269 + i32.const 24 + i32.const 267 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1812,10 +1796,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 274 + i32.const 24 + i32.const 272 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1825,10 +1809,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 275 + i32.const 24 + i32.const 273 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -1842,10 +1826,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 276 + i32.const 24 + i32.const 274 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1859,10 +1843,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 281 + i32.const 24 + i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -1878,10 +1862,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 286 + i32.const 24 + i32.const 284 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -1897,10 +1881,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 287 + i32.const 24 + i32.const 285 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -1916,10 +1900,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 288 + i32.const 24 + i32.const 286 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000001 0x00000000 0x00000000 0x00000000 @@ -1931,10 +1915,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 289 + i32.const 24 + i32.const 287 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -1947,10 +1931,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 290 + i32.const 24 + i32.const 288 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -1965,10 +1949,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 291 + i32.const 24 + i32.const 289 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -1983,14 +1967,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 296 + i32.const 24 + i32.const 294 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $simd/test_f32x4 (; 7 ;) (type $FUNCSIG$v) + (func $simd/test_f32x4 (; 6 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -2010,10 +1994,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 305 + i32.const 24 + i32.const 303 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2028,10 +2012,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 307 + i32.const 24 + i32.const 305 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2047,10 +2031,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 309 + i32.const 24 + i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2064,10 +2048,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 310 + i32.const 24 + i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2081,10 +2065,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 311 + i32.const 24 + i32.const 309 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2102,10 +2086,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 313 + i32.const 24 + i32.const 311 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -2119,10 +2103,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 314 + i32.const 24 + i32.const 312 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2135,10 +2119,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 315 + i32.const 24 + i32.const 313 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2148,10 +2132,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 316 + i32.const 24 + i32.const 314 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2161,10 +2145,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 317 + i32.const 24 + i32.const 315 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2178,10 +2162,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 318 + i32.const 24 + i32.const 316 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2195,10 +2179,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 323 + i32.const 24 + i32.const 321 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -2226,10 +2210,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 332 + i32.const 24 + i32.const 330 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2243,10 +2227,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 333 + i32.const 24 + i32.const 331 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2260,10 +2244,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 334 + i32.const 24 + i32.const 332 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -2277,10 +2261,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 335 + i32.const 24 + i32.const 333 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -2294,10 +2278,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 336 + i32.const 24 + i32.const 334 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2311,10 +2295,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 337 + i32.const 24 + i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2328,10 +2312,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 338 + i32.const 24 + i32.const 336 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2345,10 +2329,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 339 + i32.const 24 + i32.const 337 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2361,10 +2345,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 340 + i32.const 24 + i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x40800000 0x41100000 0x41800000 0x41c80000 @@ -2377,10 +2361,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 341 + i32.const 24 + i32.const 339 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -2395,10 +2379,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 342 + i32.const 24 + i32.const 340 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -2413,14 +2397,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 347 + i32.const 24 + i32.const 345 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $simd/test_f64x2 (; 8 ;) (type $FUNCSIG$v) + (func $simd/test_f64x2 (; 7 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) (local $2 v128) @@ -2440,10 +2424,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 356 + i32.const 24 + i32.const 354 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -2458,10 +2442,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 358 + i32.const 24 + i32.const 356 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2477,10 +2461,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 360 + i32.const 24 + i32.const 358 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2494,10 +2478,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 361 + i32.const 24 + i32.const 359 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2511,10 +2495,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 362 + i32.const 24 + i32.const 360 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2532,10 +2516,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 364 + i32.const 24 + i32.const 362 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -2549,10 +2533,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 365 + i32.const 24 + i32.const 363 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2565,10 +2549,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 366 + i32.const 24 + i32.const 364 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2578,10 +2562,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 367 + i32.const 24 + i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2591,10 +2575,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 368 + i32.const 24 + i32.const 366 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 @@ -2608,10 +2592,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 369 + i32.const 24 + i32.const 367 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2625,10 +2609,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 374 + i32.const 24 + i32.const 372 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -2656,10 +2640,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 383 + i32.const 24 + i32.const 381 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2673,10 +2657,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 384 + i32.const 24 + i32.const 382 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2690,10 +2674,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 385 + i32.const 24 + i32.const 383 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -2707,10 +2691,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 386 + i32.const 24 + i32.const 384 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 @@ -2724,10 +2708,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 387 + i32.const 24 + i32.const 385 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2741,10 +2725,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 388 + i32.const 24 + i32.const 386 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2758,10 +2742,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 389 + i32.const 24 + i32.const 387 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2775,10 +2759,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 390 + i32.const 24 + i32.const 388 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 @@ -2791,10 +2775,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 391 + i32.const 24 + i32.const 389 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end v128.const i32x4 0x00000000 0x40100000 0x00000000 0x40220000 @@ -2807,10 +2791,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 392 + i32.const 24 + i32.const 390 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -2825,10 +2809,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 393 + i32.const 24 + i32.const 391 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -2843,14 +2827,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 398 + i32.const 24 + i32.const 396 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $simd/test_v8x16 (; 9 ;) (type $FUNCSIG$v) + (func $simd/test_v8x16 (; 8 ;) (type $FUNCSIG$v) (local $0 v128) (local $1 v128) v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c @@ -2868,29 +2852,26 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 408 + i32.const 24 + i32.const 406 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start:simd (; 10 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - block - call $simd/test_v128 - call $simd/test_i8x16 - call $simd/test_i16x8 - call $simd/test_i32x4 - call $simd/test_i64x2 - call $simd/test_f32x4 - call $simd/test_f64x2 - call $simd/test_v8x16 - end + (func $start:simd (; 9 ;) (type $FUNCSIG$v) + call $simd/test_v128 + call $simd/test_i8x16 + call $simd/test_i16x8 + call $simd/test_i32x4 + call $simd/test_i64x2 + call $simd/test_f32x4 + call $simd/test_f64x2 + call $simd/test_v8x16 ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 10 ;) (type $FUNCSIG$v) call $start:simd ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 11 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/static-this.json b/tests/compiler/static-this.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/static-this.optimized.wat b/tests/compiler/static-this.optimized.wat index 77dcc8da54..ab59dfb01f 100644 --- a/tests/compiler/static-this.optimized.wat +++ b/tests/compiler/static-this.optimized.wat @@ -1,14 +1,12 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") (global $static-this/Foo.bar (mut i32) (i32.const 42)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $FUNCSIG$v) global.get $static-this/Foo.bar @@ -16,10 +14,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/static-this.untouched.wat b/tests/compiler/static-this.untouched.wat index 8ec8c05601..839a41d180 100644 --- a/tests/compiler/static-this.untouched.wat +++ b/tests/compiler/static-this.untouched.wat @@ -2,15 +2,13 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $static-this/Foo.bar (mut i32) (i32.const 42)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $static-this/Foo.getBar (; 1 ;) (type $FUNCSIG$i) (result i32) global.get $static-this/Foo.bar @@ -22,10 +20,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/allocator_arena.json b/tests/compiler/std/allocator_arena.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index 719ce56c7c..7e7d9d6247 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -1,24 +1,21 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00,") + (data (i32.const 24) "s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) (global $std/allocator_arena/i (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -68,1108 +65,279 @@ global.set $~lib/allocator/arena/offset local.get $0 ) - (func $~lib/internal/memory/memset (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - local.get $0 - i32.const 18 - i32.store8 - local.get $0 - i32.const 42 - i32.add - local.tee $1 - i32.const 1 - i32.sub - i32.const 18 - i32.store8 - local.get $0 - i32.const 1 - i32.add - i32.const 18 - i32.store8 - local.get $0 - i32.const 2 - i32.add - i32.const 18 - i32.store8 - local.get $1 - i32.const 2 - i32.sub - i32.const 18 - i32.store8 - local.get $1 - i32.const 3 - i32.sub - i32.const 18 - i32.store8 - local.get $0 - i32.const 3 - i32.add - i32.const 18 - i32.store8 - local.get $1 - i32.const 4 - i32.sub - i32.const 18 - i32.store8 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $1 - local.get $0 - i32.add - local.tee $0 - i32.const 303174162 - i32.store - i32.const 42 - local.get $1 - i32.sub - i32.const -4 - i32.and - local.tee $1 - local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 303174162 - i32.store - local.get $1 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - i32.const 303174162 - i32.store - local.get $0 - i32.const 8 - i32.add - i32.const 303174162 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 303174162 - i32.store - local.get $2 - i32.const 8 - i32.sub - i32.const 303174162 - i32.store - local.get $1 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - i32.const 303174162 - i32.store - local.get $0 - i32.const 16 - i32.add - i32.const 303174162 - i32.store - local.get $0 - i32.const 20 - i32.add - i32.const 303174162 - i32.store - local.get $0 - i32.const 24 - i32.add - i32.const 303174162 - i32.store - local.get $0 - local.get $1 - i32.add - local.tee $2 - i32.const 28 - i32.sub - i32.const 303174162 - i32.store - local.get $2 - i32.const 24 - i32.sub - i32.const 303174162 - i32.store - local.get $2 - i32.const 20 - i32.sub - i32.const 303174162 - i32.store - local.get $2 - i32.const 16 - i32.sub - i32.const 303174162 - 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 + block $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 18 + i32.store8 + local.get $0 + i32.const 42 + i32.add + local.tee $1 + i32.const 1 + i32.sub + i32.const 18 + i32.store8 + local.get $0 + i32.const 1 + i32.add + i32.const 18 + i32.store8 + local.get $0 + i32.const 2 + i32.add + i32.const 18 + i32.store8 local.get $1 - i32.const 32 - i32.ge_u - if - local.get $0 - i64.const 1302123111085380114 - i64.store - local.get $0 - i32.const 8 - i32.add - i64.const 1302123111085380114 - i64.store - local.get $0 - i32.const 16 - i32.add - i64.const 1302123111085380114 - i64.store - local.get $0 - i32.const 24 - i32.add - i64.const 1302123111085380114 - 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/memory/memcpy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 42 - local.set $3 - loop $continue|0 + i32.const 2 + i32.sub + i32.const 18 + i32.store8 + local.get $1 + i32.const 3 + i32.sub + i32.const 18 + i32.store8 + local.get $0 + i32.const 3 + i32.add + i32.const 18 + i32.store8 local.get $1 + i32.const 4 + i32.sub + i32.const 18 + i32.store8 + i32.const 42 + i32.const 0 + local.get $0 + i32.sub i32.const 3 i32.and - local.get $3 - local.get $3 - select - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 303174162 + i32.store + local.get $2 + i32.const -4 + i32.and + local.tee $1 + local.get $0 + i32.add + i32.const 4 + i32.sub + i32.const 303174162 + i32.store + local.get $1 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + i32.const 303174162 + i32.store + local.get $0 + i32.const 8 + i32.add + i32.const 303174162 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 12 + i32.sub + i32.const 303174162 + i32.store + local.get $2 + i32.const 8 + i32.sub + i32.const 303174162 + i32.store + local.get $1 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + i32.const 303174162 + i32.store + local.get $0 + i32.const 16 + i32.add + i32.const 303174162 + i32.store + local.get $0 + i32.const 20 + i32.add + i32.const 303174162 + i32.store + local.get $0 + i32.const 24 + i32.add + i32.const 303174162 + i32.store + local.get $0 + local.get $1 + i32.add + local.tee $2 + i32.const 28 + i32.sub + i32.const 303174162 + i32.store + local.get $2 + i32.const 24 + i32.sub + i32.const 303174162 + i32.store + local.get $2 + i32.const 20 + i32.sub + i32.const 303174162 + i32.store + local.get $2 + i32.const 16 + i32.sub + i32.const 303174162 + 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 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $3 - i32.const 16 + i32.const 32 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 + i64.const 1302123111085380114 + i64.store local.get $0 i32.const 8 i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store + i64.const 1302123111085380114 + i64.store local.get $0 - i32.const 12 + i32.const 16 i32.add - local.get $1 - i32.const 12 + i64.const 1302123111085380114 + i64.store + local.get $0 + i32.const 24 i32.add - i32.load - i32.store + i64.const 1302123111085380114 + i64.store local.get $1 - i32.const 16 - i32.add + i32.const 32 + i32.sub local.set $1 local.get $0 - i32.const 16 + i32.const 32 i32.add local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|1 + br $continue|0 end end - local.get $3 - 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 $3 - 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 $3 - 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 $3 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $3 - 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 $2 - i32.const 1 - i32.ne - if - local.get $2 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $2 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 3 - i32.sub - local.set $3 - loop $continue|3 - local.get $3 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $2 - 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 $2 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $2 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $2 - 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 $2 - 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 $3 - i32.const 16 - i32.sub - local.set $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.sub - local.set $3 - loop $continue|4 - local.get $3 - i32.const 18 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $2 - 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 $2 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $2 - 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 $2 - 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 $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|4 - end - end - br $break|2 - end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - loop $continue|5 - local.get $3 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $2 - 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 $2 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $2 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $2 - 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 $2 - 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 $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|5 - end - end - end - end - local.get $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 end ) - (func $~lib/internal/memory/memmove (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) i32.const 42 local.set $2 - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - i32.const 42 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - i32.const 42 - i32.add - local.get $1 - i32.le_u - end - if + block $~lib/util/memory/memmove|inlined.0 local.get $0 local.get $1 - 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 + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + 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 - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 1 - i32.sub - local.set $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 @@ -1184,100 +352,71 @@ 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.const 1 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 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq 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 + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 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 + 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|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -1285,106 +424,39 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 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/memcmp (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/allocator_arena (; 4 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) (local $2 i32) - (local $3 i32) - i32.const 42 - local.set $2 - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $continue|0 - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 - end - ) - (func $start:std/allocator_arena (; 6 ;) (type $FUNCSIG$v) - i32.const 56 + i32.const 72 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate global.set $std/allocator_arena/ptr1 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate global.set $std/allocator_arena/ptr2 global.get $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr2 i32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/allocator_arena/ptr1 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill i32.const 0 global.set $std/allocator_arena/i loop $repeat|0 @@ -1400,10 +472,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 27 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else global.get $std/allocator_arena/i @@ -1417,7 +489,7 @@ end global.get $std/allocator_arena/ptr2 global.get $std/allocator_arena/ptr1 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy i32.const 0 global.set $std/allocator_arena/i loop $repeat|1 @@ -1433,10 +505,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 27 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else global.get $std/allocator_arena/i @@ -1448,37 +520,83 @@ unreachable end end - global.get $std/allocator_arena/ptr1 - global.get $std/allocator_arena/ptr2 - call $~lib/internal/memory/memcmp + block $~lib/util/memory/memcmp|inlined.0 (result i32) + i32.const 42 + local.set $0 + i32.const 0 + global.get $std/allocator_arena/ptr2 + local.tee $1 + global.get $std/allocator_arena/ptr1 + local.tee $2 + i32.eq + br_if $~lib/util/memory/memcmp|inlined.0 + drop + loop $continue|2 + local.get $0 + if (result i32) + local.get $2 + i32.load8_u + local.get $1 + i32.load8_u + i32.eq + else + i32.const 0 + end + if + local.get $0 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + i32.const 1 + i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $continue|2 + end + end + local.get $0 + if (result i32) + local.get $2 + i32.load8_u + local.get $1 + i32.load8_u + i32.sub + else + i32.const 0 + end + end if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate global.set $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr1 - i32.const 56 + i32.const 72 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 5 ;) (type $FUNCSIG$v) call $start:std/allocator_arena ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 6 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index 7b16588c60..bab984aa68 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -1,38 +1,24 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/allocator_arena/size i32 (i32.const 42)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/allocator_arena/size i32 (i32.const 42)) (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) (global $std/allocator_arena/i (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 68)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (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/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -111,1769 +97,513 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/memory/memset (; 3 ;) (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 + (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) 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 + call $~lib/allocator/arena/__mem_allocate + return ) - (func $~lib/internal/memory/memcpy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 3 ;) (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 $6 i64) + block $~lib/util/memory/memset|inlined.0 local.get $2 - i32.const 8 - i32.and + i32.eqz 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 + br $~lib/util/memory/memset|inlined.0 end + local.get $0 + local.get $1 + i32.store8 + local.get $0 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 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 local.get $2 i32.const 2 - i32.and + i32.le_u 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 + br $~lib/util/memory/memset|inlined.0 end - local.get $2 + local.get $0 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.add + local.get $1 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 + local.get $0 + i32.const 2 + i32.add + local.get $1 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 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 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 + 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 + br $~lib/util/memory/memset|inlined.0 end - i32.load8_u + local.get $0 + i32.const 3 + i32.add + local.get $1 i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 5 ;) (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 + i32.const 4 + i32.sub local.get $1 + i32.store8 + local.get $2 + i32.const 8 i32.le_u - end - if + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 local.get $0 - local.get $1 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if + local.get $5 + 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 7 + i32.const 255 i32.and + i32.mul + local.set $4 local.get $0 - i32.const 7 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 + end + ) + (func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 i32.eq if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 - 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 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 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.const 1 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 + br $continue|2 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 + 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.const 1 - i32.sub - local.set $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + 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 - 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 + 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 - 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|4 end - br $continue|3 end end end - block $break|4 - loop $continue|4 + block $break|5 + loop $continue|5 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 + 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 - 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/memcmp (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - local.get $1 - i32.eq - if - i32.const 0 - return - end - block $break|0 - loop $continue|0 - local.get $2 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.eq - else - local.get $3 - end - if - block - local.get $2 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - i32.const 1 - i32.add - local.set $0 - local.get $1 - i32.const 1 - i32.add - local.set $1 - end - br $continue|0 - end - end - end - local.get $2 - if (result i32) - local.get $0 - i32.load8_u - local.get $1 - i32.load8_u - i32.sub - else - i32.const 0 end ) - (func $~lib/allocator/arena/__memory_free (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/allocator/arena/__memory_reset (; 8 ;) (type $FUNCSIG$v) + (func $~lib/memory/memory.free (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/allocator/arena/__mem_reset (; 7 ;) (type $FUNCSIG$v) global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset ) + (func $~lib/memory/memory.reset (; 8 ;) (type $FUNCSIG$v) + call $~lib/allocator/arena/__mem_reset + ) (func $start:std/allocator_arena (; 9 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - call $start:~lib/allocator/arena - block $~lib/memory/memory.allocate|inlined.0 (result i32) - global.get $std/allocator_arena/size - local.set $0 - local.get $0 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + (local $3 i32) + (local $4 i32) + (local $5 i32) + 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 + global.get $std/allocator_arena/size + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr1 - block $~lib/memory/memory.allocate|inlined.1 (result i32) - global.get $std/allocator_arena/size - local.set $0 - local.get $0 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end + global.get $std/allocator_arena/size + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr2 global.get $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr2 @@ -1881,24 +611,16 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/memory/memory.fill|inlined.0 - global.get $std/allocator_arena/ptr1 - local.set $0 - i32.const 18 - local.set $1 - global.get $std/allocator_arena/size - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memset - end + global.get $std/allocator_arena/ptr1 + i32.const 18 + global.get $std/allocator_arena/size + call $~lib/memory/memory.fill block $break|0 i32.const 0 global.set $std/allocator_arena/i @@ -1917,10 +639,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 27 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/allocator_arena/i @@ -1932,18 +654,10 @@ end unreachable end - block $~lib/memory/memory.copy|inlined.0 - global.get $std/allocator_arena/ptr2 - local.set $2 - global.get $std/allocator_arena/ptr1 - local.set $1 - global.get $std/allocator_arena/size - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/internal/memory/memmove - end + global.get $std/allocator_arena/ptr2 + global.get $std/allocator_arena/ptr1 + global.get $std/allocator_arena/size + call $~lib/memory/memory.copy block $break|1 i32.const 0 global.set $std/allocator_arena/i @@ -1962,10 +676,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 27 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/allocator_arena/i @@ -1979,52 +693,88 @@ end block $~lib/memory/memory.compare|inlined.0 (result i32) global.get $std/allocator_arena/ptr1 - local.set $0 + local.set $2 global.get $std/allocator_arena/ptr2 local.set $1 global.get $std/allocator_arena/size - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcmp + local.set $0 + block $~lib/util/memory/memcmp|inlined.0 (result i32) + local.get $2 + local.set $5 + local.get $1 + local.set $4 + local.get $0 + local.set $3 + local.get $5 + local.get $4 + i32.eq + if + i32.const 0 + br $~lib/util/memory/memcmp|inlined.0 + end + block $break|2 + loop $continue|2 + local.get $3 + i32.const 0 + i32.ne + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.eq + else + i32.const 0 + end + if + block + local.get $3 + i32.const 1 + i32.sub + local.set $3 + local.get $5 + i32.const 1 + i32.add + local.set $5 + local.get $4 + i32.const 1 + i32.add + local.set $4 + end + br $continue|2 + end + end + end + local.get $3 + if (result i32) + local.get $5 + i32.load8_u + local.get $4 + i32.load8_u + i32.sub + else + i32.const 0 + end + end end i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/memory/memory.free|inlined.0 - global.get $std/allocator_arena/ptr1 - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - block $~lib/memory/memory.free|inlined.1 - global.get $std/allocator_arena/ptr2 - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 - end - block $~lib/memory/memory.reset|inlined.0 - call $~lib/allocator/arena/__memory_reset - br $~lib/memory/memory.reset|inlined.0 - end - block $~lib/memory/memory.allocate|inlined.2 (result i32) - global.get $std/allocator_arena/size - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end + global.get $std/allocator_arena/ptr1 + call $~lib/memory/memory.free + global.get $std/allocator_arena/ptr2 + call $~lib/memory/memory.free + call $~lib/memory/memory.reset + global.get $std/allocator_arena/size + call $~lib/memory/memory.allocate global.set $std/allocator_arena/ptr1 global.get $std/allocator_arena/ptr1 global.get $~lib/memory/HEAP_BASE @@ -2038,10 +788,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/array-access.json b/tests/compiler/std/array-access.json new file mode 100644 index 0000000000..b1da366ff4 --- /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.optimized.wat b/tests/compiler/std/array-access.optimized.wat index a9133fb21b..e70fc97cb0 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -1,112 +1,138 @@ (module (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$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 16) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 48) "\04\00\00\00n\00u\00l\00l") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 56) "\10") + (data (i32.const 72) "\10\00\00\00\1c") + (data (i32.const 88) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00\08") + (data (i32.const 136) "n\00u\00l\00l") (export "memory" (memory $0)) - (export "table" (table $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) - (func $std/array-access/i32ArrayArrayElementAccess (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 0 + (func $~lib/array/Array<~lib/array/Array>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort unreachable end - i32.load - local.tee $0 - i32.load + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end - ) - (func $std/array-access/stringArrayPropertyAccess (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add i32.load - local.tee $0 - i32.load + ) + (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + i32.const 4 + i32.add i32.load ) - (func $~lib/internal/string/compareUnsafe (; 3 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get + call $~lib/array/Array#__get + ) + (func $std/array-access/stringArrayPropertyAccess (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) - i32.const 8 - local.set $3 local.get $1 i32.const 1 i32.shl local.get $0 i32.add + local.set $0 + i32.const 72 local.set $1 loop $continue|0 local.get $2 if (result i32) + local.get $0 + i32.load16_u local.get $1 - i32.load16_u offset=4 - local.get $3 - i32.load16_u offset=4 + i32.load16_u i32.sub - local.tee $4 + local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 i32.const 1 i32.sub local.set $2 - local.get $1 + local.get $0 i32.const 2 i32.add - local.set $1 - local.get $3 + local.set $0 + local.get $1 i32.const 2 i32.add - local.set $3 + local.set $1 br $continue|0 end end - local.get $4 + local.get $3 ) - (func $~lib/string/String#startsWith (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#startsWith (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -114,18 +140,26 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 229 + i32.const 88 + i32.const 178 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 8 + i32.const 60 i32.load - local.tee $2 + i32.const 1 + i32.shr_u + local.tee $1 + local.set $2 + local.get $1 i32.const 0 local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $1 i32.const 0 local.get $1 @@ -142,91 +176,36 @@ local.get $0 local.get $3 local.get $2 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 + (func $std/array-access/stringArrayMethodCall (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get call $~lib/string/String#startsWith ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 0 + (func $std/array-access/stringArrayArrayPropertyAccess (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.load - local.tee $0 - i32.load - i32.const 2 + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get + i32.const 1 + call $~lib/array/Array<~lib/array/Array>#__get + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.load ) - (func $std/array-access/stringArrayArrayMethodCall (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 0 + (func $std/array-access/stringArrayArrayMethodCall (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array<~lib/array/Array>#__get + i32.const 1 + call $~lib/array/Array<~lib/array/Array>#__get call $~lib/string/String#startsWith ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 10 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index fb344029cd..518cfbf2d0 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -1,138 +1,155 @@ (module (type $FUNCSIG$ii (func (param i32) (result i32))) (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$iiii (func (param i32 i32 i32) (result 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))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\00\00\00\00") - (data (i32.const 16) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 48) "\04\00\00\00n\00u\00l\00l\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 72) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) (export "stringArrayArrayPropertyAccess" (func $std/array-access/stringArrayArrayPropertyAccess)) (export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall)) - (func $~lib/array/Array<~lib/array/Array>#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array<~lib/array/Array>#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#__unchecked_get ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__unchecked_get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $std/array-access/i32ArrayArrayElementAccess (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/i32ArrayArrayElementAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get i32.const 1 call $~lib/array/Array#__get ) - (func $~lib/array/Array<~lib/string/String>#__get (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array<~lib/string/String>#__get (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#__unchecked_get + ) + (func $~lib/string/String#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u ) - (func $std/array-access/stringArrayPropertyAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayPropertyAccess (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.load + call $~lib/string/String#get:length ) - (func $~lib/internal/string/compareUnsafe (; 6 ;) (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) @@ -155,14 +172,14 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -185,7 +202,7 @@ end local.get $5 ) - (func $~lib/string/String#startsWith (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#startsWith (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -198,23 +215,23 @@ i32.eqz if i32.const 0 - i32.const 16 - i32.const 229 + i32.const 88 + i32.const 178 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 0 i32.eq if - i32.const 48 + i32.const 136 local.set $1 end local.get $2 local.set $3 local.get $0 - i32.load + call $~lib/string/String#get:length local.set $4 local.get $3 local.tee $5 @@ -233,7 +250,7 @@ select local.set $7 local.get $1 - i32.load + call $~lib/string/String#get:length local.set $8 local.get $8 local.get $7 @@ -249,68 +266,75 @@ local.get $1 i32.const 0 local.get $8 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array-access/stringArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayMethodCall (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 8 + i32.const 72 i32.const 0 call $~lib/string/String#startsWith ) - (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__unchecked_get (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 24 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__unchecked_get ) - (func $std/array-access/stringArrayArrayPropertyAccess (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayPropertyAccess (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.load + call $~lib/string/String#get:length ) - (func $std/array-access/stringArrayArrayMethodCall (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array-access/stringArrayArrayMethodCall (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array<~lib/string/String>>#__get i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 8 + i32.const 72 i32.const 0 call $~lib/string/String#startsWith ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 17 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array-literal.json b/tests/compiler/std/array-literal.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 dd76e7ad42..81fc76cd45 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,35 +1,93 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$viiii (func (param i32 i32 i32 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$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03") - (data (i32.const 17) "\01\02") - (data (i32.const 24) "\08\00\00\00\03") - (data (i32.const 32) "\14\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") - (data (i32.const 80) "\0c") - (data (i32.const 92) "\01\00\00\00\02") - (data (i32.const 112) "P\00\00\00\03") - (data (i32.const 128) "x") - (data (i32.const 136) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 168) "\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 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\0f\00\00\00\03") + (data (i32.const 25) "\01\02") + (data (i32.const 32) "\11\00\00\00\10") + (data (i32.const 48) "\18\00\00\00\18\00\00\00\03\00\00\00\03") + (data (i32.const 64) "\10\00\00\00(") + (data (i32.const 80) "s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00\1a") + (data (i32.const 136) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 168) "\0f\00\00\00\0c") + (data (i32.const 188) "\01\00\00\00\02") + (data (i32.const 200) "\12\00\00\00\10") + (data (i32.const 216) "\b8\00\00\00\b8\00\00\00\0c\00\00\00\03") + (data (i32.const 232) "\0f") + (data (i32.const 248) "\12\00\00\00\10") + (data (i32.const 264) "\f8\00\00\00\f8") + (data (i32.const 280) "\10\00\00\00(") + (data (i32.const 296) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 336) "\17\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00\08") + (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 264)) + (global $std/array-literal/i (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/array-literal/emptyArrayI32 (mut i32) (i32.const 128)) - (global $std/array-literal/i (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRefWithCtor (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 136 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_s + ) + (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 136 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -91,814 +149,615 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (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 168 - 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.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 3 ;) (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 + i32.store offset=4 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 + i32.store offset=8 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 + i32.store offset=12 local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 + i32.const 16 i32.add - i32.const 0 - i32.store8 + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) 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.const 528 i32.le_u if - return + i32.const 0 + i32.const 296 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end - i32.const 0 local.get $0 + i32.const 16 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 + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 296 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + ) + (func $~lib/util/runtime/makeArray (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) 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 + call $~lib/util/runtime/allocate local.get $1 - local.get $2 - i32.sub + call $~lib/util/runtime/register 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/array/Array#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) i32.const 3 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $1 - i32.const 8 - call $~lib/allocator/arena/__memory_allocate + local.get $0 + i32.shl local.tee $0 - i32.const 0 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.tee $2 + local.tee $3 + local.get $1 + i32.load + i32.ne + drop + local.get $1 + local.get $3 i32.store - local.get $0 - i32.const 0 + local.get $1 + local.get $2 i32.store offset=4 - local.get $0 local.get $1 - i32.store local.get $0 - i32.const 3 - i32.store offset=4 + i32.store offset=8 local.get $1 - i32.const 8 - i32.add i32.const 3 - call $~lib/internal/memory/memset - local.get $0 + i32.store offset=12 + local.get $1 ) - (func $~lib/array/Array#constructor (; 5 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - (local $1 i32) - i32.const 12 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $1 - i32.const 8 - call $~lib/allocator/arena/__memory_allocate - local.tee $0 + (func $std/array-literal/Ref#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - i32.store - local.get $0 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + ) + (func $std/array-literal/RefWithCtor#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) i32.const 0 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store - local.get $0 - i32.const 3 - i32.store offset=4 - local.get $1 - i32.const 8 - i32.add - i32.const 12 - call $~lib/internal/memory/memset - local.get $0 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register ) - (func $start:std/array-literal (; 6 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 9 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 232 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - i32.const 28 + (local $2 i32) + i32.const 60 i32.load i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 48 i32.const 0 - i32.const 24 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + call $~lib/array/Array#__get if i32.const 0 - i32.const 32 + i32.const 80 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 48 i32.const 1 - i32.const 24 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.const 1 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + call $~lib/array/Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 48 i32.const 2 - i32.const 24 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + call $~lib/array/Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 116 + i32.const 228 i32.load i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 216 i32.const 0 - i32.const 112 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get if i32.const 0 - i32.const 32 + i32.const 80 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 216 i32.const 1 - i32.const 112 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 216 i32.const 2 - i32.const 112 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/emptyArrayI32 - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 32 + i32.const 80 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#constructor + i32.const 528 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 0 + i32.const 17 + call $~lib/util/runtime/makeArray + local.tee $2 + i32.load offset=4 local.tee $0 - i32.load global.get $std/array-literal/i local.tee $1 - i32.store8 offset=8 + i32.store8 local.get $1 i32.const 1 i32.add + local.tee $1 global.set $std/array-literal/i local.get $0 - i32.load - i32.const 1 - i32.add - global.get $std/array-literal/i - local.tee $1 - i32.store8 offset=8 local.get $1 + i32.store8 offset=1 + global.get $std/array-literal/i i32.const 1 i32.add + local.tee $1 global.set $std/array-literal/i local.get $0 - i32.load - i32.const 2 - i32.add - global.get $std/array-literal/i - i32.store8 offset=8 - local.get $0 + local.get $1 + i32.store8 offset=2 + local.get $2 global.set $std/array-literal/dynamicArrayI8 global.get $std/array-literal/dynamicArrayI8 - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array-literal/dynamicArrayI8 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.const 0 + call $~lib/array/Array#__get if i32.const 0 - i32.const 32 + i32.const 80 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array-literal/dynamicArrayI8 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.const 1 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.const 1 + call $~lib/array/Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array-literal/dynamicArrayI8 - i32.load - local.tee $0 - i32.load - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + i32.const 2 + call $~lib/array/Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 global.set $std/array-literal/i - call $~lib/array/Array#constructor + i32.const 2 + i32.const 18 + call $~lib/util/runtime/makeArray + local.tee $2 + i32.load offset=4 local.tee $0 - i32.load global.get $std/array-literal/i local.tee $1 - i32.store offset=8 + i32.store local.get $1 i32.const 1 i32.add + local.tee $1 global.set $std/array-literal/i local.get $0 - i32.load - i32.const 4 - i32.add - global.get $std/array-literal/i - local.tee $1 - i32.store offset=8 local.get $1 + i32.store offset=4 + global.get $std/array-literal/i i32.const 1 i32.add + local.tee $1 global.set $std/array-literal/i local.get $0 - i32.load - i32.const 8 - i32.add - global.get $std/array-literal/i + local.get $1 i32.store offset=8 - local.get $0 + local.get $2 global.set $std/array-literal/dynamicArrayI32 global.get $std/array-literal/dynamicArrayI32 - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array-literal/dynamicArrayI32 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get if i32.const 0 - i32.const 32 + i32.const 80 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array-literal/dynamicArrayI32 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array-literal/dynamicArrayI32 - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#constructor - local.set $0 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 - local.get $0 - i32.load - local.get $1 - i32.store offset=8 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + i32.const 2 + i32.const 20 + call $~lib/util/runtime/makeArray + local.tee $2 + i32.load offset=4 + local.tee $0 + call $std/array-literal/Ref#constructor + i32.store local.get $0 - i32.load - i32.const 4 - i32.add - local.get $1 - i32.store offset=8 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + call $std/array-literal/Ref#constructor + i32.store offset=4 local.get $0 - i32.load - i32.const 8 - i32.add - local.get $1 + call $std/array-literal/Ref#constructor i32.store offset=8 - local.get $0 + local.get $2 global.set $std/array-literal/dynamicArrayRef global.get $std/array-literal/dynamicArrayRef - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#constructor - local.set $0 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 - local.get $0 - i32.load - local.get $1 - i32.store offset=8 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + i32.const 2 + i32.const 22 + call $~lib/util/runtime/makeArray + local.tee $2 + i32.load offset=4 + local.tee $0 + call $std/array-literal/RefWithCtor#constructor + i32.store local.get $0 - i32.load - i32.const 4 - i32.add - local.get $1 - i32.store offset=8 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $1 + call $std/array-literal/RefWithCtor#constructor + i32.store offset=4 local.get $0 - i32.load - i32.const 8 - i32.add - local.get $1 + call $std/array-literal/RefWithCtor#constructor i32.store offset=8 - local.get $0 + local.get $2 global.set $std/array-literal/dynamicArrayRefWithCtor global.get $std/array-literal/dynamicArrayRefWithCtor - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 32 + i32.const 80 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 7 ;) (type $FUNCSIG$v) - call $start:std/array-literal + (func $~lib/runtime/runtime.instanceof (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 336 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 336 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.flags (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 336 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 336 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + if (result i32) + local.get $2 + i32.const 336 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 336 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) + (func $~lib/runtime/runtime.collect (; 17 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 18 ;) (type $FUNCSIG$v) + call $start:std/array-literal + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) ) diff --git a/tests/compiler/std/array-literal.ts b/tests/compiler/std/array-literal.ts index 1fdd31d51e..2418d30605 100644 --- a/tests/compiler/std/array-literal.ts +++ b/tests/compiler/std/array-literal.ts @@ -1,4 +1,4 @@ -import "allocator/arena"; +import "collector/dummy"; const staticArrayI8: i8[] = [0, 1, 2]; assert(staticArrayI8.length == 3); diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index d1ccb10ff2..f51516df75 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -1,119 +1,122 @@ (module - (type $FUNCSIG$v (func)) + (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))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\00\00\00\00\00\00\01\02\00\00\00\00\00") - (data (i32.const 24) "\08\00\00\00\03\00\00\00") - (data (i32.const 32) "\14\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") - (data (i32.const 80) "\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 112) "P\00\00\00\03\00\00\00") - (data (i32.const 120) "\00\00\00\00\00\00\00\00") - (data (i32.const 128) "x\00\00\00\00\00\00\00") - (data (i32.const 136) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 168) "\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") + (data (i32.const 8) "\0f\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\01\02") + (data (i32.const 32) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\18\00\00\00\03\00\00\00\03\00\00\00") + (data (i32.const 64) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 168) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 200) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\00\00\00\b8\00\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 232) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 248) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f8\00\00\00\f8\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 280) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 336) "\17\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\04\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (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/util/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 $std/array-literal/staticArrayI8 i32 (i32.const 24)) - (global $std/array-literal/staticArrayI32 i32 (i32.const 112)) - (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 128)) - (global $std/array-literal/i (mut i32) (i32.const 0)) + (global $~lib/util/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)) (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRefWithCtor (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 228)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 336)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 528)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (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/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__unchecked_get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.get $2 - i32.load + i32.const 0 + i32.shl + i32.add + i32.load8_s + ) + (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 0 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 + i32.ge_u + if i32.const 0 - i32.shl - i32.add - local.get $5 - i32.add - i32.load8_s offset=8 - else + i32.const 136 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array#__get (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 136 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/internal/arraybuffer/computeSize (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -121,7 +124,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -200,747 +203,453 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 168 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/internal/memory/memset (; 8 ;) (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 + i32.store offset=4 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 + i32.const 0 + i32.store offset=8 local.get $1 - i32.store8 - local.get $0 - i32.const 2 - i32.add + i32.const 0 + i32.store offset=12 local.get $1 - i32.store8 - local.get $0 - local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE i32.add - i32.const 2 - i32.sub - local.get $1 - i32.store8 + ) + (func $~lib/collector/dummy/__ref_register (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/register (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) 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 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - return + i32.const 0 + i32.const 296 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + global.get $~lib/util/runtime/HEADER_SIZE i32.sub - local.get $1 - i32.store8 + local.set $2 local.get $2 - i32.const 8 - i32.le_u + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 296 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable end - i32.const 0 + local.get $2 + local.get $1 + i32.store local.get $0 - i32.sub - i32.const 3 - i32.and - local.set $3 + call $~lib/collector/dummy/__ref_register local.get $0 - local.get $3 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 + ) + (func $~lib/collector/dummy/__ref_link (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/util/runtime/makeArray (; 16 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/util/runtime/allocate 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 + call $~lib/util/runtime/register local.set $4 local.get $0 + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.set $6 local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + local.get $9 + if + local.get $9 + local.get $7 + call $~lib/collector/dummy/__ref_unlink + end + local.get $8 + local.get $7 + call $~lib/collector/dummy/__ref_link + local.get $8 + else + local.get $8 + end i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end local.get $4 - i32.store - local.get $2 - i32.const 8 - i32.le_u + ) + (func $std/array-literal/Ref#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz if - return + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + local.set $0 end local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.store + ) + (func $~lib/array/Array#get:length (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) 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/array/Array#constructor (; 9 ;) (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 $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.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 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array#__unchecked_set (; 10 ;) (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.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store8 offset=8 - ) - (func $~lib/array/Array#constructor (; 11 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.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 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.1 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array#__unchecked_set (; 12 ;) (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.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - ) - (func $std/array-literal/Ref#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.load offset=12 + ) + (func $std/array-literal/RefWithCtor#constructor (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/array/Array#constructor (; 14 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.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 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.2 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array#__unchecked_set (; 15 ;) (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.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - ) - (func $std/array-literal/RefWithCtor#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/memory/memory.allocate - local.set $0 - end + (func $~lib/array/Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + i32.load offset=12 ) - (func $~lib/array/Array#constructor (; 17 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.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 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.3 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array#__unchecked_set (; 18 ;) (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.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - ) - (func $start:std/array-literal (; 19 ;) (type $FUNCSIG$v) + (func $start:std/array-literal (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - call $start:~lib/allocator/arena - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array-literal/staticArrayI8 - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array-literal/staticArrayI8 + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI8 i32.const 0 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI8 i32.const 1 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI8 i32.const 2 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array-literal/staticArrayI32 - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array-literal/staticArrayI32 + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI32 @@ -951,10 +660,10 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI32 @@ -965,10 +674,10 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/staticArrayI32 @@ -979,181 +688,175 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/array-literal/emptyArrayI32 - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array-literal/emptyArrayI32 + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + 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 block (result i32) - i32.const 0 i32.const 3 - call $~lib/array/Array#constructor + i32.const 0 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + local.set $0 + local.get $0 + i32.load offset=4 local.set $1 local.get $1 - i32.const 0 global.get $std/array-literal/i - call $~lib/array/Array#__unchecked_set + i32.store8 local.get $1 - i32.const 1 block (result i32) global.get $std/array-literal/i i32.const 1 i32.add + local.tee $2 global.set $std/array-literal/i - global.get $std/array-literal/i + local.get $2 end - call $~lib/array/Array#__unchecked_set + i32.store8 offset=1 local.get $1 - i32.const 2 block (result i32) global.get $std/array-literal/i i32.const 1 i32.add + local.tee $2 global.set $std/array-literal/i - global.get $std/array-literal/i + local.get $2 end - call $~lib/array/Array#__unchecked_set - local.get $1 - end - global.set $std/array-literal/dynamicArrayI8 - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/array-literal/dynamicArrayI8 - local.set $1 - local.get $1 - i32.load offset=4 + i32.store8 offset=2 + local.get $0 end + global.set $std/array-literal/dynamicArrayI8 + global.get $std/array-literal/dynamicArrayI8 + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 i32.const 0 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 i32.const 1 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI8 i32.const 2 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 global.set $std/array-literal/i block (result i32) - i32.const 0 i32.const 3 - call $~lib/array/Array#constructor - local.set $2 - local.get $2 + i32.const 2 + i32.const 18 i32.const 0 + call $~lib/util/runtime/makeArray + local.set $1 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $0 global.get $std/array-literal/i - call $~lib/array/Array#__unchecked_set - local.get $2 - i32.const 1 + i32.store + local.get $0 block (result i32) global.get $std/array-literal/i i32.const 1 i32.add + local.tee $2 global.set $std/array-literal/i - global.get $std/array-literal/i + local.get $2 end - call $~lib/array/Array#__unchecked_set - local.get $2 - i32.const 2 + i32.store offset=4 + local.get $0 block (result i32) global.get $std/array-literal/i i32.const 1 i32.add + local.tee $2 global.set $std/array-literal/i - global.get $std/array-literal/i + local.get $2 end - call $~lib/array/Array#__unchecked_set - local.get $2 + i32.store offset=8 + local.get $1 end global.set $std/array-literal/dynamicArrayI32 - block $~lib/array/Array#get:length|inlined.2 (result i32) - global.get $std/array-literal/dynamicArrayI32 - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/array-literal/dynamicArrayI32 + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -1164,10 +867,10 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -1178,10 +881,10 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array-literal/dynamicArrayI32 @@ -1192,96 +895,362 @@ i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) - i32.const 0 i32.const 3 - call $~lib/array/Array#constructor - local.set $3 - local.get $3 - i32.const 0 - i32.const 0 - call $std/array-literal/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 - i32.const 1 - i32.const 0 - call $std/array-literal/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 i32.const 2 + i32.const 20 i32.const 0 - call $std/array-literal/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 - end - global.set $std/array-literal/dynamicArrayRef - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array-literal/dynamicArrayRef - local.set $3 - local.get $3 + call $~lib/util/runtime/makeArray + local.set $0 + local.get $0 i32.load offset=4 + local.set $1 + local.get $1 + block (result i32) + i32.const 0 + call $std/array-literal/Ref#constructor + local.set $2 + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store + local.get $1 + block (result i32) + i32.const 0 + call $std/array-literal/Ref#constructor + local.set $2 + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store offset=4 + local.get $1 + block (result i32) + i32.const 0 + call $std/array-literal/Ref#constructor + local.set $2 + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store offset=8 + local.get $0 end + global.set $std/array-literal/dynamicArrayRef + global.get $std/array-literal/dynamicArrayRef + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) - i32.const 0 i32.const 3 - call $~lib/array/Array#constructor - local.set $4 - local.get $4 - i32.const 0 - i32.const 0 - call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__unchecked_set - local.get $4 - i32.const 1 - i32.const 0 - call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__unchecked_set - local.get $4 i32.const 2 + i32.const 22 i32.const 0 - call $std/array-literal/RefWithCtor#constructor - call $~lib/array/Array#__unchecked_set - local.get $4 - end - global.set $std/array-literal/dynamicArrayRefWithCtor - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array-literal/dynamicArrayRefWithCtor - local.set $4 - local.get $4 + call $~lib/util/runtime/makeArray + local.set $1 + local.get $1 i32.load offset=4 + local.set $0 + local.get $0 + block (result i32) + i32.const 0 + call $std/array-literal/RefWithCtor#constructor + local.set $2 + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store + local.get $0 + block (result i32) + i32.const 0 + call $std/array-literal/RefWithCtor#constructor + local.set $2 + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store offset=4 + local.get $0 + block (result i32) + i32.const 0 + call $std/array-literal/RefWithCtor#constructor + local.set $2 + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store offset=8 + local.get $1 end + global.set $std/array-literal/dynamicArrayRefWithCtor + global.get $std/array-literal/dynamicArrayRefWithCtor + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 32 + i32.const 80 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 28 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register + local.set $0 end + local.get $0 ) - (func $start (; 20 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.retain (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 32 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 33 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 35 ;) (type $FUNCSIG$v) call $start:std/array-literal + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 21 ;) (type $FUNCSIG$v) + (func $null (; 36 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/array.json b/tests/compiler/std/array.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 abb65df0f0..d488ca16e0 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -1,352 +1,424 @@ (module - (type $FUNCSIG$v (func)) (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$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 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))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$vj (func (param i64))) (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) + (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$id (func (param f64) (result i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$iiid (func (param i32 i32 f64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$iiij (func (param i32 i32 i64) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 40) "\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") - (data (i32.const 104) "\03\00\00\00a\00b\00c") - (data (i32.const 120) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 152) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 216) "\05\00\00\00\00\00\00\00\01\02\03\04\05") - (data (i32.const 232) "\d8\00\00\00\05") - (data (i32.const 240) "\05\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 256) "\f0\00\00\00\05") - (data (i32.const 264) "\05") - (data (i32.const 280) "\08\01\00\00\05") - (data (i32.const 288) "\05\00\00\00\00\00\00\00\01\01") - (data (i32.const 304) " \01\00\00\05") - (data (i32.const 312) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 328) "8\01\00\00\05") - (data (i32.const 336) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 352) "P\01\00\00\05") - (data (i32.const 360) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 392) "h\01\00\00\05") - (data (i32.const 400) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 432) "\90\01\00\00\05") - (data (i32.const 440) "\14") - (data (i32.const 472) "\b8\01\00\00\05") - (data (i32.const 480) "\14\00\00\00\00\00\00\00\01\00\00\00\01") - (data (i32.const 512) "\e0\01\00\00\05") - (data (i32.const 520) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 552) "\08\02\00\00\05") - (data (i32.const 560) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 592) "0\02\00\00\05") - (data (i32.const 608) "X\02") - (data (i32.const 624) "h\02") - (data (i32.const 632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 664) "x\02\00\00\05") - (data (i32.const 672) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 704) "\a0\02\00\00\05") - (data (i32.const 712) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 744) "\c8\02\00\00\05") - (data (i32.const 752) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") - (data (i32.const 784) "\f0\02\00\00\05") - (data (i32.const 792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 824) "\18\03\00\00\05") - (data (i32.const 832) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 864) "@\03\00\00\05") - (data (i32.const 872) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 904) "h\03\00\00\05") - (data (i32.const 912) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 944) "\90\03\00\00\05") - (data (i32.const 952) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 984) "\b8\03\00\00\05") - (data (i32.const 992) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1024) "\e0\03\00\00\05") - (data (i32.const 1032) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1064) "\08\04\00\00\05") - (data (i32.const 1072) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1104) "0\04\00\00\05") - (data (i32.const 1112) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1144) "X\04\00\00\05") - (data (i32.const 1152) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1184) "\80\04\00\00\05") - (data (i32.const 1192) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1224) "\a8\04\00\00\05") - (data (i32.const 1232) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1264) "\d0\04\00\00\05") - (data (i32.const 1272) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1304) "\f8\04\00\00\05") - (data (i32.const 1312) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1344) " \05\00\00\05") - (data (i32.const 1352) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1384) "H\05\00\00\05") - (data (i32.const 1392) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1424) "p\05\00\00\05") - (data (i32.const 1432) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1464) "\98\05\00\00\05") - (data (i32.const 1472) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") - (data (i32.const 1504) "\c0\05\00\00\05") - (data (i32.const 1512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1544) "\e8\05\00\00\05") - (data (i32.const 1552) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") - (data (i32.const 1584) "\10\06\00\00\05") - (data (i32.const 1592) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1624) "8\06\00\00\05") - (data (i32.const 1632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1664) "`\06\00\00\05") - (data (i32.const 1680) "\88\06") - (data (i32.const 1688) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1720) "\98\06\00\00\05") - (data (i32.const 1728) "\0c\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1760) "\c0\06\00\00\03") - (data (i32.const 1768) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 1784) "\e8\06\00\00\02") - (data (i32.const 1792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1825) "\07\00\00\05") - (data (i32.const 1832) "\08\00\00\00\00\00\00\00\03\00\00\00\04") - (data (i32.const 1848) "(\07\00\00\02") - (data (i32.const 1856) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05") - (data (i32.const 1888) "@\07\00\00\03") - (data (i32.const 1896) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1928) "h\07\00\00\05") - (data (i32.const 1936) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 1952) "\90\07\00\00\01") - (data (i32.const 1960) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 1992) "\a8\07\00\00\04") - (data (i32.const 2000) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2032) "\d0\07\00\00\05") - (data (i32.const 2040) "\04\00\00\00\00\00\00\00\05") - (data (i32.const 2056) "\f8\07\00\00\01") - (data (i32.const 2064) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04") - (data (i32.const 2096) "\10\08\00\00\04") - (data (i32.const 2104) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2136) "8\08\00\00\05") - (data (i32.const 2144) "\08\00\00\00\00\00\00\00\04\00\00\00\05") - (data (i32.const 2160) "`\08\00\00\02") - (data (i32.const 2168) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 2200) "x\08\00\00\03") - (data (i32.const 2208) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2240) "\a0\08\00\00\05") - (data (i32.const 2248) "\04\00\00\00\00\00\00\00\04") - (data (i32.const 2264) "\c8\08\00\00\01") - (data (i32.const 2272) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05") - (data (i32.const 2304) "\e0\08\00\00\04") - (data (i32.const 2312) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2344) "\08\t\00\00\05") - (data (i32.const 2352) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 2368) "0\t\00\00\01") - (data (i32.const 2376) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2408) "H\t\00\00\04") - (data (i32.const 2416) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2448) "p\t\00\00\05") - (data (i32.const 2464) "\98\t") - (data (i32.const 2472) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2504) "\a8\t\00\00\05") - (data (i32.const 2512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2544) "\d0\t\00\00\05") - (data (i32.const 2560) "\f8\t") - (data (i32.const 2568) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2600) "\08\n\00\00\05") - (data (i32.const 2608) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2640) "0\n\00\00\05") - (data (i32.const 2656) "X\n") - (data (i32.const 2664) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2696) "h\n\00\00\05") - (data (i32.const 2704) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2736) "\90\n\00\00\05") - (data (i32.const 2752) "\b8\n") - (data (i32.const 2760) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2792) "\c8\n\00\00\05") - (data (i32.const 2800) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2832) "\f0\n\00\00\05") - (data (i32.const 2848) "\18\0b") - (data (i32.const 2856) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") - (data (i32.const 2888) "(\0b\00\00\05") - (data (i32.const 2896) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 2928) "V\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") - (data (i32.const 3104) " ") - (data (i32.const 3114) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") - (data (i32.const 3168) " \0c\00\00\08") - (data (i32.const 3176) " ") - (data (i32.const 3186) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") - (data (i32.const 3240) "h\0c\00\00\08") - (data (i32.const 3248) "@") - (data (i32.const 3262) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") - (data (i32.const 3302) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") - (data (i32.const 3376) "\b0\0c\00\00\08") - (data (i32.const 3384) "@") - (data (i32.const 3398) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") - (data (i32.const 3430) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") - (data (i32.const 3512) "8\0d\00\00\08") - (data (i32.const 3520) "\14\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3552) "\c0\0d\00\00\05") - (data (i32.const 3560) "\14\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") - (data (i32.const 3592) "\e8\0d\00\00\05") - (data (i32.const 3600) "\14\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") - (data (i32.const 3632) "\10\0e\00\00\05") - (data (i32.const 3640) "\14") - (data (i32.const 3652) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") - (data (i32.const 3672) "8\0e\00\00\05") - (data (i32.const 3688) "`\0e") - (data (i32.const 3696) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 3712) "p\0e\00\00\01") - (data (i32.const 3720) "\08\00\00\00\00\00\00\00\02\00\00\00\01") - (data (i32.const 3736) "\88\0e\00\00\02") - (data (i32.const 3744) "\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01") - (data (i32.const 3776) "\a0\0e\00\00\04") - (data (i32.const 3784) "\10") - (data (i32.const 3796) "\01\00\00\00\02\00\00\00\03") - (data (i32.const 3816) "\c8\0e\00\00\04") - (data (i32.const 3824) "\04\00\00\00\00\00\00\00\01") - (data (i32.const 3840) "\f0\0e\00\00\01") - (data (i32.const 3848) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 3864) "\08\0f\00\00\02") - (data (i32.const 3872) "\01\00\00\00a") - (data (i32.const 3880) "\01\00\00\00b") - (data (i32.const 3888) "\02\00\00\00a\00b") - (data (i32.const 3896) "\02\00\00\00b\00a") - (data (i32.const 3912) "\1c\00\00\00\00\00\00\00 \0f\00\00(\0f\00\00 \0f\00\000\0f\00\008\0f\00\00@\0f") - (data (i32.const 3976) "H\0f\00\00\07") - (data (i32.const 3984) "\1c\00\00\00\00\00\00\00@\0f\00\00 \0f\00\00 \0f\00\000\0f\00\00(\0f\00\008\0f") - (data (i32.const 4048) "\90\0f\00\00\07") - (data (i32.const 4056) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 4088) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 4144) "\04\00\00\00n\00u\00l\00l") - (data (i32.const 4160) "\02\00\00\00\00\00\00\00\01") - (data (i32.const 4176) "@\10\00\00\02") - (data (i32.const 4184) "\04\00\00\00t\00r\00u\00e") - (data (i32.const 4200) "\05\00\00\00f\00a\00l\00s\00e") - (data (i32.const 4216) "\01\00\00\00,") - (data (i32.const 4224) "\02\00\00\00\00\00\00\00\01") - (data (i32.const 4240) "\80\10\00\00\02") - (data (i32.const 4248) "\n\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e") - (data (i32.const 4272) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4304) "\b0\10\00\00\03") - (data (i32.const 4312) "\01\00\00\000") - (data (i32.const 4320) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 4832) "\e0\10\00\00d") - (data (i32.const 4840) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") - (data (i32.const 4872) "\e8\12\00\00\03") - (data (i32.const 4880) "\05\00\00\001\00-\002\00-\003") - (data (i32.const 4896) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 4928) " \13\00\00\03") - (data (i32.const 4936) "\01\00\00\00-") - (data (i32.const 4944) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03") - (data (i32.const 4976) "P\13\00\00\03") - (data (i32.const 4984) "\08") - (data (i32.const 4995) "\80\00\00\00\80") - (data (i32.const 5000) "x\13\00\00\02") - (data (i32.const 5008) "\02\00\00\00_\00_") - (data (i32.const 5016) "\08") - (data (i32.const 5027) "\80\00\00\00\80") - (data (i32.const 5032) "\98\13\00\00\02") - (data (i32.const 5040) "\18\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 5096) "0") - (data (i32.const 5118) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") - (data (i32.const 5160) "\e8\13\00\00\06") - (data (i32.const 5168) "\02\00\00\00,\00 ") - (data (i32.const 5176) "\03\00\00\000\00.\000") - (data (i32.const 5192) "\03\00\00\00N\00a\00N") - (data (i32.const 5208) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5232) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 5256) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/internal/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/internal/sort/COMPARATOR<~lib/string/String>~anonymous|0) + (data (i32.const 8) "\10\00\00\00&") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00(") + (data (i32.const 80) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00\06") + (data (i32.const 136) "a\00b\00c") + (data (i32.const 144) "\10\00\00\00\18") + (data (i32.const 160) "s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 184) "\0f\00\00\00\05") + (data (i32.const 200) "\01\02\03\04\05") + (data (i32.const 208) "\14\00\00\00\10") + (data (i32.const 224) "\c8\00\00\00\c8\00\00\00\05\00\00\00\05") + (data (i32.const 240) "\0f\00\00\00\05") + (data (i32.const 256) "\01\01\01\04\05") + (data (i32.const 264) "\10\00\00\00\1a") + (data (i32.const 280) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 312) "\0f\00\00\00\05") + (data (i32.const 336) "\0f\00\00\00\05") + (data (i32.const 352) "\01\01") + (data (i32.const 360) "\0f\00\00\00\05") + (data (i32.const 376) "\01\01\00\02\02") + (data (i32.const 384) "\0f\00\00\00\05") + (data (i32.const 400) "\01\01\00\02\02") + (data (i32.const 408) "\0f\00\00\00\14") + (data (i32.const 424) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 448) "\15\00\00\00\10") + (data (i32.const 464) "\a8\01\00\00\a8\01\00\00\14\00\00\00\05") + (data (i32.const 480) "\0f\00\00\00\14") + (data (i32.const 496) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 520) "\0f\00\00\00\14") + (data (i32.const 560) "\0f\00\00\00\14") + (data (i32.const 576) "\01\00\00\00\01") + (data (i32.const 600) "\0f\00\00\00\14") + (data (i32.const 616) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 640) "\0f\00\00\00\14") + (data (i32.const 656) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 680) "\0f") + (data (i32.const 696) "\0f") + (data (i32.const 712) "\11\00\00\00\10") + (data (i32.const 728) "\c8\02\00\00\c8\02") + (data (i32.const 744) "\0f\00\00\00\14") + (data (i32.const 760) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 784) "\0f\00\00\00\14") + (data (i32.const 800) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 824) "\0f\00\00\00\14") + (data (i32.const 840) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 864) "\0f\00\00\00\14") + (data (i32.const 880) "\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05") + (data (i32.const 904) "\0f\00\00\00\14") + (data (i32.const 920) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 944) "\0f\00\00\00\14") + (data (i32.const 960) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 984) "\0f\00\00\00\14") + (data (i32.const 1000) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1024) "\0f\00\00\00\14") + (data (i32.const 1040) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1064) "\0f\00\00\00\14") + (data (i32.const 1080) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1104) "\0f\00\00\00\14") + (data (i32.const 1120) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1144) "\0f\00\00\00\14") + (data (i32.const 1160) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1184) "\0f\00\00\00\14") + (data (i32.const 1200) "\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1224) "\0f\00\00\00\14") + (data (i32.const 1240) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1264) "\0f\00\00\00\14") + (data (i32.const 1280) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 1304) "\0f\00\00\00\14") + (data (i32.const 1320) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1344) "\0f\00\00\00\14") + (data (i32.const 1360) "\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1384) "\0f\00\00\00\14") + (data (i32.const 1400) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1424) "\0f\00\00\00\14") + (data (i32.const 1440) "\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1464) "\0f\00\00\00\14") + (data (i32.const 1480) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1504) "\0f\00\00\00\14") + (data (i32.const 1520) "\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1544) "\0f\00\00\00\14") + (data (i32.const 1560) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1584) "\0f\00\00\00\14") + (data (i32.const 1600) "\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05") + (data (i32.const 1624) "\0f\00\00\00\14") + (data (i32.const 1640) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1664) "\0f\00\00\00\14") + (data (i32.const 1680) "\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05") + (data (i32.const 1704) "\0f\00\00\00\14") + (data (i32.const 1720) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1744) "\11\00\00\00\10") + (data (i32.const 1760) "\b8\06\00\00\b8\06\00\00\14\00\00\00\05") + (data (i32.const 1776) "\0f\00\00\00\14") + (data (i32.const 1792) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1816) "\0f") + (data (i32.const 1832) "\0f\00\00\00\14") + (data (i32.const 1848) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1872) "\0f\00\00\00\0c") + (data (i32.const 1888) "\03\00\00\00\04\00\00\00\05") + (data (i32.const 1904) "\0f\00\00\00\08") + (data (i32.const 1920) "\01\00\00\00\02") + (data (i32.const 1928) "\0f\00\00\00\14") + (data (i32.const 1944) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 1968) "\0f\00\00\00\08") + (data (i32.const 1984) "\03\00\00\00\04") + (data (i32.const 1992) "\0f\00\00\00\0c") + (data (i32.const 2008) "\01\00\00\00\02\00\00\00\05") + (data (i32.const 2024) "\0f\00\00\00\14") + (data (i32.const 2040) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2064) "\0f\00\00\00\04") + (data (i32.const 2080) "\01") + (data (i32.const 2088) "\0f\00\00\00\10") + (data (i32.const 2104) "\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2120) "\0f\00\00\00\14") + (data (i32.const 2136) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2160) "\0f\00\00\00\04") + (data (i32.const 2176) "\05") + (data (i32.const 2184) "\0f\00\00\00\10") + (data (i32.const 2200) "\01\00\00\00\02\00\00\00\03\00\00\00\04") + (data (i32.const 2216) "\0f\00\00\00\14") + (data (i32.const 2232) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2256) "\0f\00\00\00\08") + (data (i32.const 2272) "\04\00\00\00\05") + (data (i32.const 2280) "\0f\00\00\00\0c") + (data (i32.const 2296) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 2312) "\0f\00\00\00\14") + (data (i32.const 2328) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2352) "\0f\00\00\00\04") + (data (i32.const 2368) "\04") + (data (i32.const 2376) "\0f\00\00\00\10") + (data (i32.const 2392) "\01\00\00\00\02\00\00\00\03\00\00\00\05") + (data (i32.const 2408) "\0f\00\00\00\14") + (data (i32.const 2424) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2448) "\0f\00\00\00\04") + (data (i32.const 2464) "\01") + (data (i32.const 2472) "\0f\00\00\00\10") + (data (i32.const 2488) "\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2504) "\0f\00\00\00\14") + (data (i32.const 2520) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2544) "\0f") + (data (i32.const 2560) "\0f\00\00\00\14") + (data (i32.const 2576) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2600) "\0f\00\00\00\14") + (data (i32.const 2616) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2640) "\0f") + (data (i32.const 2656) "\0f\00\00\00\14") + (data (i32.const 2672) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2696) "\0f\00\00\00\14") + (data (i32.const 2712) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2736) "\0f") + (data (i32.const 2752) "\0f\00\00\00\14") + (data (i32.const 2768) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2792) "\0f\00\00\00\14") + (data (i32.const 2808) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2832) "\0f") + (data (i32.const 2848) "\0f\00\00\00\14") + (data (i32.const 2864) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2888) "\0f\00\00\00\14") + (data (i32.const 2904) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2928) "\0f") + (data (i32.const 2944) "\0f\00\00\00\14") + (data (i32.const 2960) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05") + (data (i32.const 2984) "\10\00\00\00\18") + (data (i32.const 3000) "~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 3024) "\10\00\00\00\ac") + (data (i32.const 3040) "A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?") + (data (i32.const 3216) "\0f\00\00\00 ") + (data (i32.const 3234) "\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3264) "\16\00\00\00\10") + (data (i32.const 3280) "\a0\0c\00\00\a0\0c\00\00 \00\00\00\08") + (data (i32.const 3296) "\0f\00\00\00 ") + (data (i32.const 3314) "\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3344) "\0f\00\00\00@") + (data (i32.const 3366) "\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?") + (data (i32.const 3406) "\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3424) "\17\00\00\00\10") + (data (i32.const 3440) " \0d\00\00 \0d\00\00@\00\00\00\08") + (data (i32.const 3456) "\0f\00\00\00@") + (data (i32.const 3478) "\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf") + (data (i32.const 3510) "\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3536) "\0f\00\00\00\14") + (data (i32.const 3552) "\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02") + (data (i32.const 3576) "\11\00\00\00\10") + (data (i32.const 3592) "\e0\0d\00\00\e0\0d\00\00\14\00\00\00\05") + (data (i32.const 3608) "\0f\00\00\00\14") + (data (i32.const 3624) "\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02") + (data (i32.const 3648) "\0f\00\00\00\14") + (data (i32.const 3664) "\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02") + (data (i32.const 3688) "\15\00\00\00\10") + (data (i32.const 3704) "P\0e\00\00P\0e\00\00\14\00\00\00\05") + (data (i32.const 3720) "\0f\00\00\00\14") + (data (i32.const 3740) "\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3760) "\0f") + (data (i32.const 3776) "\11\00\00\00\10") + (data (i32.const 3792) "\c0\0e\00\00\c0\0e") + (data (i32.const 3808) "\0f\00\00\00\04") + (data (i32.const 3824) "\01") + (data (i32.const 3832) "\11\00\00\00\10") + (data (i32.const 3848) "\f0\0e\00\00\f0\0e\00\00\04\00\00\00\01") + (data (i32.const 3864) "\0f\00\00\00\08") + (data (i32.const 3880) "\02\00\00\00\01") + (data (i32.const 3888) "\11\00\00\00\10") + (data (i32.const 3904) "(\0f\00\00(\0f\00\00\08\00\00\00\02") + (data (i32.const 3920) "\0f\00\00\00\10") + (data (i32.const 3936) "\03\00\00\00\02\00\00\00\01") + (data (i32.const 3952) "\11\00\00\00\10") + (data (i32.const 3968) "`\0f\00\00`\0f\00\00\10\00\00\00\04") + (data (i32.const 3984) "\0f\00\00\00\10") + (data (i32.const 4004) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 4016) "\11\00\00\00\10") + (data (i32.const 4032) "\a0\0f\00\00\a0\0f\00\00\10\00\00\00\04") + (data (i32.const 4048) "\0f\00\00\00\04") + (data (i32.const 4064) "\01") + (data (i32.const 4072) "\0f\00\00\00\08") + (data (i32.const 4088) "\01\00\00\00\02") + (data (i32.const 4096) "\10\00\00\00\02") + (data (i32.const 4112) "a") + (data (i32.const 4120) "\10\00\00\00\02") + (data (i32.const 4136) "b") + (data (i32.const 4144) "\10\00\00\00\04") + (data (i32.const 4160) "a\00b") + (data (i32.const 4168) "\10\00\00\00\04") + (data (i32.const 4184) "b\00a") + (data (i32.const 4192) "\10") + (data (i32.const 4208) "\0f\00\00\00\1c") + (data (i32.const 4224) "\10\10\00\00(\10\00\00\10\10\00\00@\10\00\00X\10\00\00p\10") + (data (i32.const 4256) "\1b\00\00\00\10") + (data (i32.const 4272) "\80\10\00\00\80\10\00\00\1c\00\00\00\07") + (data (i32.const 4288) "\0f\00\00\00\1c") + (data (i32.const 4304) "p\10\00\00\10\10\00\00\10\10\00\00@\10\00\00(\10\00\00X\10") + (data (i32.const 4336) "\1b\00\00\00\10") + (data (i32.const 4352) "\d0\10\00\00\d0\10\00\00\1c\00\00\00\07") + (data (i32.const 4368) "\10\00\00\00\1c") + (data (i32.const 4384) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 4416) "\10\00\00\00\08") + (data (i32.const 4432) "n\00u\00l\00l") + (data (i32.const 4440) "\0f\00\00\00\02") + (data (i32.const 4456) "\01") + (data (i32.const 4464) "\10\00\00\00\08") + (data (i32.const 4480) "t\00r\00u\00e") + (data (i32.const 4488) "\10\00\00\00\n") + (data (i32.const 4504) "f\00a\00l\00s\00e") + (data (i32.const 4520) "\10\00\00\00\02") + (data (i32.const 4536) ",") + (data (i32.const 4544) "\0f\00\00\00\02") + (data (i32.const 4560) "\01") + (data (i32.const 4568) "\10\00\00\00\14") + (data (i32.const 4584) "t\00r\00u\00e\00,\00f\00a\00l\00s\00e") + (data (i32.const 4608) "\0f\00\00\00\0c") + (data (i32.const 4624) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4640) "\10\00\00\00\02") + (data (i32.const 4656) "0") + (data (i32.const 4664) "\0f\00\00\00\90\01") + (data (i32.const 4680) "0\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") + (data (i32.const 5080) "\15\00\00\00\10") + (data (i32.const 5096) "H\12\00\00H\12\00\00\90\01\00\00d") + (data (i32.const 5112) "\0f\00\00\00\0c") + (data (i32.const 5128) "\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5144) "\10\00\00\00\n") + (data (i32.const 5160) "1\00-\002\00-\003") + (data (i32.const 5176) "\0f\00\00\00\0c") + (data (i32.const 5192) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 5208) "\10\00\00\00\02") + (data (i32.const 5224) "-") + (data (i32.const 5232) "\0f\00\00\00\0c") + (data (i32.const 5248) "\01\00\00\00\02\00\00\00\03") + (data (i32.const 5264) "\0f\00\00\00\08") + (data (i32.const 5283) "\80\00\00\00\80") + (data (i32.const 5288) "\10\00\00\00\04") + (data (i32.const 5304) "_\00_") + (data (i32.const 5312) "\0f\00\00\00\08") + (data (i32.const 5331) "\80\00\00\00\80") + (data (i32.const 5336) "\10\00\00\000") + (data (i32.const 5352) "-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008") + (data (i32.const 5400) "\0f\00\00\000") + (data (i32.const 5430) "\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 5464) "\10\00\00\00\04") + (data (i32.const 5480) ",\00 ") + (data (i32.const 5488) "\10\00\00\00\06") + (data (i32.const 5504) "0\00.\000") + (data (i32.const 5512) "\10\00\00\00\06") + (data (i32.const 5528) "N\00a\00N") + (data (i32.const 5536) "\10\00\00\00\12") + (data (i32.const 5552) "-\00I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 5576) "\10\00\00\00\10") + (data (i32.const 5592) "I\00n\00f\00i\00n\00i\00t\00y") + (data (i32.const 5608) "\0f\00\00\00\b8\02") + (data (i32.const 5624) "\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $~lib/util/sort/COMPARATOR~anonymous|0 $start:std/array~anonymous|44 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/Null (mut i32) (i32.const 0)) - (global $std/array/arr8 (mut i32) (i32.const 232)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/array/arr32 (mut i32) (i32.const 392)) + (global $std/array/arr8 (mut i32) (i32.const 224)) + (global $std/array/arr32 (mut i32) (i32.const 464)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 624)) + (global $std/array/source (mut i32) (i32.const 728)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1624)) + (global $std/array/sarr (mut i32) (i32.const 1760)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -357,15 +429,15 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3168)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3376)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3552)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3632)) - (global $std/array/reversed0 (mut i32) (i32.const 3688)) - (global $std/array/reversed1 (mut i32) (i32.const 3712)) - (global $std/array/reversed2 (mut i32) (i32.const 3736)) - (global $std/array/reversed4 (mut i32) (i32.const 3776)) - (global $std/array/expected4 (mut i32) (i32.const 3816)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 3280)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 3440)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 3592)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 3704)) + (global $std/array/reversed0 (mut i32) (i32.const 3792)) + (global $std/array/reversed1 (mut i32) (i32.const 3848)) + (global $std/array/reversed2 (mut i32) (i32.const 3904)) + (global $std/array/reversed4 (mut i32) (i32.const 3968)) + (global $std/array/expected4 (mut i32) (i32.const 4032)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -375,23 +447,33 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 3976)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4048)) + (global $std/array/randomStringsActual (mut i32) (i32.const 4272)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 4352)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $std/array/refArr (mut i32) (i32.const 0)) - (global $std/array/subarr32 (mut i32) (i32.const 7736)) - (global $std/array/subarr8 (mut i32) (i32.const 7832)) - (global $std/array/subarrU32 (mut i32) (i32.const 7904)) + (global $std/array/subarr32 (mut i32) (i32.const 0)) + (global $std/array/subarr8 (mut i32) (i32.const 0)) + (global $std/array/subarrU32 (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (export "main" (func $std/array/main)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -453,1888 +535,1065 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 3 ;) (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 40 - 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.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 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 - local.tee $3 - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $3 - 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 + i32.store offset=4 local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $2 i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.sub - local.set $3 - local.get $0 - local.get $2 - i32.add - local.tee $0 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - local.tee $1 - i32.store - local.get $3 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 12 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 8 - i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 28 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 24 - i32.sub + i32.store offset=8 local.get $1 - i32.store - local.get $3 - i32.const 20 - i32.sub + i32.const 0 + i32.store offset=12 local.get $1 - i32.store - local.get $3 i32.const 16 - i32.sub - local.get $1 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 - local.get $0 i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 - local.get $1 - i64.extend_i32_u - local.tee $4 - local.get $4 - i64.const 32 - i64.shl - i64.or - local.set $4 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - local.get $0 - local.get $4 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 - end - end ) - (func $~lib/array/Array#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - local.get $0 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 2 - i32.shl - local.tee $3 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 - i32.const 8 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - i32.const 0 - i32.store - local.get $1 - i32.const 0 - i32.store offset=4 - local.get $1 - local.get $2 - i32.store - local.get $1 - local.get $0 - i32.store offset=4 - local.get $2 - i32.const 8 - i32.add - i32.const 0 - local.get $3 - call $~lib/internal/memory/memset - local.get $1 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - i32.const 1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $1 - i32.const 8 - i32.add - i32.const 0 - i32.const 1 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_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 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $1 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 1 - i32.store offset=8 - local.get $0 - ) - (func $~lib/array/Array#fill (; 7 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $5 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) + (local $4 i64) + block $~lib/util/memory/memset|inlined.0 local.get $2 - local.get $4 - i32.add - local.tee $0 - i32.const 0 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.store8 local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $4 local.get $2 - local.get $4 - i32.lt_s - select - end - local.tee $0 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $3 - local.get $4 i32.add - local.tee $2 - i32.const 0 + i32.const 1 + i32.sub + local.get $1 + i32.store8 local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $3 - local.get $4 - local.get $3 - local.get $4 - i32.lt_s - select - end - local.tee $2 - i32.lt_s - if + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 local.get $0 - local.get $5 + i32.const 1 i32.add - i32.const 8 + local.get $1 + i32.store8 + local.get $0 + i32.const 2 i32.add local.get $1 - local.get $2 + i32.store8 local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 2 i32.sub - call $~lib/internal/memory/memset - end - ) - (func $std/array/isArraysEqual (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.tee $4 - local.get $1 - i32.load offset=4 - i32.ne - if - i32.const 0 - return - end - local.get $0 - local.get $1 - i32.eq - if - i32.const 1 - return - end - loop $repeat|0 + local.get $1 + i32.store8 + local.get $3 + i32.const 3 + i32.sub + local.get $1 + i32.store8 local.get $2 - local.get $4 - i32.lt_s - if - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.lt_u - if (result i32) - local.get $2 - local.get $3 - i32.add - i32.load8_u offset=8 - else - unreachable - end - i32.const 255 - i32.and - local.get $2 - local.get $1 - i32.load - local.tee $3 - i32.load - i32.lt_u - if (result i32) - local.get $2 - local.get $3 - i32.add - i32.load8_u offset=8 - else - unreachable - end - i32.const 255 - i32.and - i32.ne - if - i32.const 0 - return - else - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - unreachable - end - end - i32.const 1 - ) - (func $~lib/array/Array#fill|trampoline (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill - ) - (func $~lib/array/Array#fill (; 10 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $4 - local.get $0 - i32.load offset=4 - local.set $0 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 + i32.add + local.get $1 + i32.store8 local.get $0 local.get $2 i32.add - local.tee $2 - i32.const 0 + i32.const 4 + i32.sub + local.get $1 + i32.store8 local.get $2 - i32.const 0 - i32.gt_s - select - else + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 local.get $2 + i32.const 0 local.get $0 - local.get $2 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.sub + local.set $3 local.get $0 - i32.lt_s - select - end - local.set $2 - local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $0 - local.get $3 + local.get $2 i32.add local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store local.get $3 + i32.const -4 + i32.and + local.tee $2 local.get $0 - local.get $3 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 local.get $0 - i32.lt_s - select - end - local.set $0 - loop $repeat|0 + i32.const 4 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 12 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 8 + i32.sub + local.get $1 + i32.store local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 local.get $0 - i32.lt_s - if - local.get $2 - i32.const 2 - i32.shl - local.get $4 - i32.add - local.get $1 - i32.store offset=8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - end - end - ) - (func $std/array/isArraysEqual (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $2 - i32.eqz - if + i32.const 12 + i32.add + local.get $1 + i32.store local.get $0 - i32.load offset=4 - local.tee $2 + i32.const 16 + i32.add local.get $1 - i32.load offset=4 - i32.ne - if - i32.const 0 - return - end + i32.store local.get $0 + i32.const 20 + i32.add local.get $1 - i32.eq - if - i32.const 1 - return - end - end - loop $repeat|0 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 28 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 24 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 20 + i32.sub + local.get $1 + i32.store local.get $3 + i32.const 16 + i32.sub + local.get $1 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $3 + local.get $0 + i32.add + local.set $0 local.get $2 - i32.lt_s - if - local.get $3 - local.get $0 - i32.load - local.tee $4 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl + local.get $3 + i32.sub + local.set $2 + local.get $1 + i64.extend_i32_u + local.tee $4 + local.get $4 + i64.const 32 + i64.shl + i64.or + local.set $4 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + local.get $0 local.get $4 + i64.store + local.get $0 + i32.const 8 i32.add - i32.load offset=8 - else - unreachable - end - local.get $3 - local.get $1 - i32.load - local.tee $4 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl local.get $4 + i64.store + local.get $0 + i32.const 16 i32.add - i32.load offset=8 - else - unreachable - end - i32.ne - if - i32.const 0 - return - else - local.get $3 - i32.const 1 + local.get $4 + i64.store + local.get $0 + i32.const 24 i32.add - local.set $3 - br $repeat|0 + local.get $4 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 end - unreachable end end - i32.const 1 ) - (func $~lib/array/Array#fill|trampoline (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 8400 + i32.le_u + if + i32.const 0 + i32.const 80 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $1 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 80 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end local.get $2 - local.get $3 - call $~lib/array/Array#fill + local.get $1 + i32.store + local.get $0 ) - (func $~lib/internal/memory/memcpy (; 13 ;) (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 + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable end local.get $0 - i32.const 3 - i32.and - i32.eqz + call $~lib/util/runtime/allocate + local.tee $1 + i32.const 0 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 1073741808 + local.get $2 + i32.shr_u + i32.gt_u 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 + i32.const 0 + i32.const 24 + i32.const 12 + i32.const 57 + call $~lib/builtins/abort + unreachable end + local.get $1 local.get $2 - i32.const 32 - i32.ge_u + i32.shl + local.tee $2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + i32.eqz 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 + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register + local.set $0 end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.load + drop + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 local.get $2 + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) 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 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + i32.const 0 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array#fill (; 9 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $5 + local.get $0 + i32.load offset=12 + local.set $4 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.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $4 i32.add local.tee $0 - local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 + i32.const 0 local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $4 + local.get $2 + local.get $4 + i32.lt_s + select + end + local.tee $0 + local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $4 i32.add - local.tee $1 - i32.load8_u - i32.store8 + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $4 + local.get $3 + local.get $4 + i32.lt_s + select + end + local.tee $2 + i32.lt_s + if local.get $0 - i32.const 1 + local.get $5 i32.add - local.tee $0 local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 + local.get $2 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 + i32.sub + call $~lib/memory/memory.fill + end + ) + (func $~lib/memory/memory.copy (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 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 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 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 + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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 end + ) + (func $~lib/util/runtime/makeArray (; 11 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + i32.const 16 + call $~lib/util/runtime/allocate 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 + call $~lib/util/runtime/register + local.set $2 + local.get $0 + local.get $1 + i32.shl + local.tee $4 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.tee $1 + local.set $5 local.get $2 - i32.const 2 - i32.and + i32.load + drop + local.get $2 + local.get $5 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 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 + call $~lib/memory/memory.copy end local.get $2 - i32.const 1 - i32.and + ) + (func $~lib/array/Array#__get (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 + i32.const 0 + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u ) - (func $~lib/internal/memory/memmove (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/array/isArraysEqual (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 + i32.load offset=12 + local.tee $3 local.get $1 - i32.eq + i32.load offset=12 + i32.ne if + i32.const 0 return end - local.get $1 - local.get $2 - i32.add local.get $0 - i32.le_u - local.tee $3 - i32.eqz + local.get $1 + i32.eq if + i32.const 1 + return + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_s + if + local.get $0 + local.get $2 + call $~lib/array/Array#__get + local.get $1 + local.get $2 + call $~lib/array/Array#__get + i32.ne + if + i32.const 0 + return + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + unreachable + end + end + i32.const 1 + ) + (func $~lib/array/Array#fill (; 14 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $0 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) local.get $0 local.get $2 i32.add - local.get $1 - i32.le_u - local.set $3 + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $0 + local.get $2 + local.get $0 + i32.lt_s + select end + local.set $2 local.get $3 + i32.const 0 + i32.lt_s + if (result i32) + local.get $0 + local.get $3 + i32.add + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + else + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.lt_s + select + end + local.set $0 + loop $repeat|0 + local.get $2 + local.get $0 + i32.lt_s + if + local.get $2 + i32.const 2 + i32.shl + local.get $4 + i32.add + local.get $1 + i32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + ) + (func $~lib/array/Array#__get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $std/array/isArraysEqual (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $2 + i32.eqz if local.get $0 + i32.load offset=12 + local.tee $2 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 + i32.load offset=12 + i32.ne 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 + i32.const 0 + return end - else - local.get $1 - i32.const 7 - i32.and local.get $0 - i32.const 7 - i32.and + local.get $1 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 + i32.const 1 + return end - loop $continue|5 - local.get $2 + end + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + if + local.get $0 + local.get $3 + call $~lib/array/Array#__get + local.get $1 + local.get $3 + call $~lib/array/Array#__get + i32.ne if - local.get $2 + i32.const 0 + return + else + local.get $3 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 + local.set $3 + br $repeat|0 end + unreachable end end + i32.const 1 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/runtime/reallocate (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $1 + (local $4 i32) + (local $5 i32) local.get $0 - i32.load + i32.const 16 + i32.sub + local.tee $4 + i32.load offset=4 local.tee $2 - i32.gt_s + local.get $1 + i32.lt_u if + i32.const 1 + i32.const 32 local.get $1 - i32.const 1073741816 - i32.gt_s - if - i32.const 0 - i32.const 40 - i32.const 40 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $3 + local.set $5 i32.const 1 i32.const 32 local.get $2 - i32.const 7 + i32.const 15 i32.add i32.clz i32.sub i32.shl - i32.const 8 - i32.sub - i32.le_s + i32.const 0 + local.get $0 + i32.const 8400 + i32.gt_u + select + local.get $3 + i32.lt_u if - local.get $0 - local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe + local.get $5 + call $~lib/allocator/arena/__mem_allocate local.tee $3 - i32.const 8 + local.get $4 + i32.load + i32.store + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + i32.const 0 + i32.store offset=12 + local.get $3 + i32.const 16 i32.add + local.tee $5 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 - i32.const 0 - 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 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 + i32.add i32.const 0 - i32.lt_s + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + local.get $4 + i32.load + i32.const -1520547049 + i32.eq if - i32.const 0 - i32.const 40 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable + local.get $0 + i32.const 8400 + i32.le_u + if + i32.const 0 + i32.const 80 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end end + local.get $3 + local.set $4 + local.get $5 + local.set $0 + else local.get $0 + local.get $2 + i32.add + i32.const 0 local.get $1 - i32.store + local.get $2 + i32.sub + call $~lib/memory/memory.fill end end + local.get $4 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/ensureCapacity (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=4 - local.tee $2 - i32.const 1 - i32.add - local.set $4 - local.get $2 + local.get $1 local.get $0 - i32.load - local.tee $3 - i32.load + i32.load offset=8 i32.const 2 i32.shr_u - i32.ge_u + i32.gt_u if - local.get $2 - i32.const 268435454 - i32.ge_u + local.get $1 + i32.const 268435452 + i32.gt_u if i32.const 0 - i32.const 8 - i32.const 182 - i32.const 42 - call $~lib/env/abort + i32.const 280 + i32.const 14 + i32.const 64 + call $~lib/builtins/abort unreachable end local.get $0 - local.get $3 - local.get $4 + i32.load + local.tee $2 + local.get $1 i32.const 2 i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe local.tee $3 - i32.store + call $~lib/util/runtime/reallocate + local.set $1 + local.get $1 + local.get $2 + i32.ne + if + local.get $0 + i32.load + drop + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $3 + i32.store offset=8 end + ) + (func $~lib/array/Array#push (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 - local.get $4 - i32.store offset=4 + local.get $0 + i32.load offset=12 + local.tee $2 + i32.const 1 + i32.add + local.tee $3 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 local.get $2 i32.const 2 i32.shl - local.get $3 i32.add local.get $1 - i32.store offset=8 + i32.store + local.get $0 + local.get $3 + i32.store offset=12 ) - (func $~lib/array/Array#pop (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 280 + i32.const 311 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load + i32.load offset=4 local.get $1 i32.const 1 i32.sub @@ -2342,74 +1601,74 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $2 local.get $0 local.get $1 - i32.store offset=4 + i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#concat (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 - i32.load offset=4 - local.tee $2 + i32.load offset=12 + local.tee $3 local.get $1 - i32.load offset=4 + i32.load offset=12 i32.const 0 local.get $1 select local.tee $4 i32.add - call $~lib/array/Array#constructor - local.set $3 - local.get $2 - if - local.get $3 - i32.load - i32.const 8 - i32.add - local.get $0 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - call $~lib/internal/memory/memmove - end - local.get $4 + local.tee $2 + i32.const 268435452 + i32.gt_u if - local.get $3 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $1 - i32.load - i32.const 8 - i32.add - local.get $4 - i32.const 2 - i32.shl - call $~lib/internal/memory/memmove + i32.const 0 + i32.const 280 + i32.const 236 + i32.const 60 + call $~lib/builtins/abort + unreachable end + local.get $2 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $2 + i32.load offset=4 + local.tee $5 + local.get $0 + i32.load offset=4 local.get $3 + i32.const 2 + i32.shl + local.tee $0 + call $~lib/memory/memory.copy + local.get $0 + local.get $5 + i32.add + local.get $1 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $2 ) - (func $~lib/array/Array#copyWithin (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load + i32.load offset=4 local.set $5 local.get $3 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $3 local.get $4 @@ -2492,47 +1751,44 @@ local.get $4 i32.lt_s select - local.set $4 + local.set $3 + local.get $1 + local.get $2 + local.get $3 + i32.add + i32.lt_s + i32.const 0 local.get $2 local.get $1 i32.lt_s - local.tee $3 - if - local.get $1 - local.get $2 - local.get $4 - i32.add - i32.lt_s - local.set $3 - end - local.get $3 + select if - local.get $4 + local.get $3 i32.const 1 i32.sub - local.tee $3 + local.tee $4 local.get $2 i32.add local.set $2 local.get $1 - local.get $3 + local.get $4 i32.add local.set $1 loop $continue|0 - local.get $4 + local.get $3 if - local.get $5 local.get $1 i32.const 2 i32.shl - i32.add local.get $5 + i32.add local.get $2 i32.const 2 i32.shl + local.get $5 i32.add - i32.load offset=8 - i32.store offset=8 + i32.load + i32.store local.get $2 i32.const 1 i32.sub @@ -2541,239 +1797,164 @@ i32.const 1 i32.sub local.set $1 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $4 + local.set $3 br $continue|0 end end else - local.get $5 - i32.const 8 - i32.add - local.tee $3 local.get $1 i32.const 2 i32.shl + local.get $5 i32.add local.get $2 i32.const 2 i32.shl - local.get $3 + local.get $5 i32.add - local.get $4 + local.get $3 i32.const 2 i32.shl - call $~lib/internal/memory/memmove - end - local.get $0 - ) - (func $~lib/array/Array#copyWithin|trampoline (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 2 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $3 + call $~lib/memory/memory.copy end local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#copyWithin ) - (func $~lib/array/Array#unshift (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#unshift (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=4 - local.tee $3 + local.get $0 + i32.load offset=12 i32.const 1 i32.add - local.set $4 - local.get $3 - local.get $0 - i32.load local.tee $2 - i32.load - i32.const 2 - i32.shr_u - local.tee $5 - i32.ge_u - if - local.get $3 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 327 - i32.const 42 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - local.set $5 - local.get $0 - local.get $2 - i32.store - end - local.get $2 - i32.const 8 - i32.add + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 local.tee $3 i32.const 4 i32.add local.get $3 - local.get $5 + local.get $2 i32.const 1 i32.sub i32.const 2 i32.shl - call $~lib/internal/memory/memmove - local.get $2 + call $~lib/memory/memory.copy + local.get $3 local.get $1 - i32.store offset=8 + i32.store local.get $0 - local.get $4 - i32.store offset=4 + local.get $2 + i32.store offset=12 ) - (func $~lib/array/Array#shift (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 299 + i32.const 280 + i32.const 383 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load + i32.load offset=4 local.tee $2 - i32.load offset=8 + i32.load local.set $3 local.get $2 - i32.const 8 - i32.add - local.tee $4 + local.get $2 i32.const 4 i32.add - local.set $5 - local.get $4 - local.get $5 local.get $1 i32.const 1 i32.sub local.tee $1 i32.const 2 i32.shl - call $~lib/internal/memory/memmove + local.tee $4 + call $~lib/memory/memory.copy local.get $2 - local.get $1 - i32.const 2 - i32.shl + local.get $4 i32.add i32.const 0 - i32.store offset=8 + i32.store local.get $0 local.get $1 - i32.store offset=4 + i32.store offset=12 local.get $3 ) - (func $~lib/array/Array#reverse (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/array/Array#reverse (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - local.set $0 - loop $repeat|0 - local.get $1 + i32.load offset=12 + local.tee $2 + if local.get $0 - i32.lt_s - if - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.tee $2 - i32.load offset=8 - local.set $4 - local.get $2 - local.get $0 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.tee $2 - i32.load offset=8 - i32.store offset=8 - local.get $2 - local.get $4 - i32.store offset=8 + i32.load offset=4 + local.set $1 + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $0 + loop $continue|0 local.get $1 - i32.const 1 - i32.add - local.set $1 local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $repeat|0 + i32.lt_u + if + local.get $1 + i32.load + local.set $2 + local.get $1 + local.get $0 + i32.load + i32.store + local.get $0 + local.get $2 + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.set $0 + br $continue|0 + end end end ) - (func $~lib/array/Array#indexOf (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $3 - i32.eqz - local.tee $4 - i32.eqz - if + if (result i32) local.get $2 local.get $3 i32.ge_s - local.set $4 + else + i32.const 1 end - local.get $4 if i32.const -1 return @@ -2794,19 +1975,19 @@ local.set $2 end local.get $0 - i32.load + i32.load offset=4 local.set $0 loop $continue|0 local.get $2 local.get $3 i32.lt_s if - local.get $0 local.get $2 i32.const 2 i32.shl + local.get $0 i32.add - i32.load offset=8 + i32.load local.get $1 i32.eq if @@ -2822,17 +2003,22 @@ end i32.const -1 ) - (func $~lib/array/Array#splice (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 27 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + ) + (func $~lib/array/Array#splice (; 28 ;) (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.get $0 - i32.load - local.set $5 local.get $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $3 local.get $1 i32.const 0 @@ -2869,14 +2055,18 @@ i32.gt_s select local.tee $2 - call $~lib/array/Array#constructor + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray local.tee $4 - i32.load - i32.const 8 - i32.add - local.get $5 - i32.const 8 - i32.add + i32.load offset=4 + drop + local.get $4 + i32.load offset=4 + local.get $0 + i32.load offset=4 + local.tee $5 local.get $1 i32.const 2 i32.shl @@ -2885,7 +2075,7 @@ local.get $2 i32.const 2 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $1 local.get $2 i32.add @@ -2894,110 +2084,71 @@ i32.ne if local.get $6 - local.get $5 - i32.const 8 - i32.add local.get $1 i32.const 2 i32.shl + local.get $5 i32.add local.get $3 local.get $1 i32.sub i32.const 2 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end local.get $0 local.get $3 local.get $2 i32.sub - i32.store offset=4 + i32.store offset=12 local.get $4 ) - (func $~lib/array/Array#splice|trampoline (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#splice - ) - (func $~lib/array/Array#__set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (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.get $0 + i32.load offset=12 + local.set $3 + local.get $0 local.get $1 + i32.const 1 + i32.add + call $~lib/array/ensureCapacity local.get $0 - i32.load - local.tee $3 - i32.load + i32.load offset=4 + local.get $1 i32.const 2 - i32.shr_u - i32.ge_u + i32.shl + i32.add + local.get $2 + i32.store + local.get $1 + local.get $3 + i32.ge_s if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - 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 + i32.store offset=12 end - local.get $3 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.store offset=8 ) - (func $start:std/array~anonymous|0 (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $~lib/array/Array#findIndex (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 loop $repeat|0 block $break|0 local.get $2 local.get $3 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $3 local.get $4 @@ -3008,12 +2159,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load + i32.load offset=4 local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3033,17 +2184,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3051,7 +2202,7 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3059,24 +2210,24 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 loop $repeat|0 block $break|0 local.get $2 local.get $3 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $3 local.get $4 @@ -3087,12 +2238,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load + i32.load offset=4 local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3112,12 +2263,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3125,12 +2276,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3138,24 +2289,24 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 40 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 loop $repeat|0 block $break|0 local.get $2 local.get $3 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $3 local.get $4 @@ -3166,12 +2317,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load + i32.load offset=4 local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3191,12 +2342,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3204,12 +2355,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 46 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3217,25 +2368,25 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 46 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 49 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) block $break|0 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 loop $repeat|0 local.get $2 local.get $3 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 local.get $3 local.get $4 @@ -3246,12 +2397,12 @@ i32.const 3 global.set $~lib/argc local.get $0 - i32.load + i32.load offset=4 local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3266,7 +2417,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3275,7 +2426,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -3284,7 +2435,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.eqz @@ -3373,36 +2524,40 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 559 + i32.const 160 + i32.const 561 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end ) - (func $start:std/array~anonymous|21 (; 51 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start:std/array~anonymous|21 (; 53 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 f32.convert_i32_s ) - (func $~lib/array/Array#map (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#map (; 54 ;) (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.load offset=4 + i32.load offset=12 local.tee $3 - call $~lib/array/Array#constructor + i32.const 2 + i32.const 22 + i32.const 0 + call $~lib/util/runtime/makeArray local.tee $4 - i32.load + i32.load offset=4 local.set $5 loop $repeat|0 local.get $1 local.get $3 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 local.get $3 local.get $2 @@ -3410,24 +2565,25 @@ select i32.lt_s if - i32.const 3 - global.set $~lib/argc local.get $1 i32.const 2 i32.shl local.tee $2 - local.get $5 - i32.add local.get $0 + i32.load offset=4 + i32.add i32.load + local.set $6 + i32.const 3 + global.set $~lib/argc local.get $2 + local.get $5 i32.add - i32.load offset=8 + local.get $6 local.get $1 local.get $0 - i32.const 22 - call_indirect (type $FUNCSIG$fiii) - f32.store offset=8 + call $start:std/array~anonymous|21 + f32.store local.get $1 i32.const 1 i32.add @@ -3435,9 +2591,32 @@ br $repeat|0 end end - local.get $4 + local.get $4 + ) + (func $~lib/array/Array#__get (; 55 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load ) - (func $start:std/array~anonymous|22 (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3447,22 +2626,26 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#map (; 57 ;) (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.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $4 - call $~lib/array/Array#constructor - i32.load + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + i32.load offset=4 local.set $5 loop $repeat|0 local.get $2 local.get $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $3 local.get $4 local.get $3 @@ -3470,24 +2653,26 @@ select i32.lt_s if - i32.const 3 - global.set $~lib/argc local.get $2 i32.const 2 i32.shl local.tee $3 - local.get $5 - i32.add local.get $0 + i32.load offset=4 + i32.add i32.load + local.set $6 + i32.const 3 + global.set $~lib/argc local.get $3 + local.get $5 i32.add - i32.load offset=8 + local.get $6 local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - i32.store offset=8 + i32.store local.get $2 i32.const 1 i32.add @@ -3496,14 +2681,14 @@ end end ) - (func $start:std/array~anonymous|23 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3513,28 +2698,31 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 61 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) i32.const 0 - call $~lib/array/Array#constructor + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 loop $repeat|0 block $break|0 local.get $2 local.get $5 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $3 local.get $5 local.get $3 @@ -3543,12 +2731,12 @@ i32.ge_s br_if $break|0 local.get $0 - i32.load + i32.load offset=4 local.get $2 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.set $3 i32.const 3 global.set $~lib/argc @@ -3571,7 +2759,7 @@ end local.get $4 ) - (func $start:std/array~anonymous|26 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -3583,7 +2771,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -3592,7 +2780,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -3604,24 +2792,24 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 66 ;) (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 $0 - i32.load offset=4 + i32.load offset=12 local.set $4 loop $repeat|0 block $break|0 local.get $3 local.get $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -3633,12 +2821,12 @@ global.set $~lib/argc local.get $2 local.get $0 - i32.load + i32.load offset=4 local.get $3 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $3 local.get $0 local.get $1 @@ -3653,29 +2841,23 @@ end local.get $2 ) - (func $start:std/array~anonymous|31 (; 64 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - i32.eqz - if - local.get $1 - i32.const 2 - i32.gt_s - local.set $0 - end + (func $start:std/array~anonymous|31 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + i32.const 1 + local.get $1 + i32.const 2 + i32.gt_s local.get $0 + select ) - (func $start:std/array~anonymous|32 (; 65 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $0 - i32.eqz - if - local.get $1 - i32.const 100 - i32.gt_s - local.set $0 - end + (func $start:std/array~anonymous|32 (; 68 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + i32.const 1 + local.get $1 + i32.const 100 + i32.gt_s local.get $0 + select ) - (func $start:std/array~anonymous|33 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 69 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -3683,7 +2865,7 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -3691,10 +2873,10 @@ local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $3 @@ -3708,12 +2890,12 @@ global.set $~lib/argc local.get $2 local.get $0 - i32.load + i32.load offset=4 local.get $3 i32.const 2 i32.shl i32.add - i32.load offset=8 + i32.load local.get $3 local.get $0 local.get $1 @@ -3728,7 +2910,7 @@ end local.get $2 ) - (func $~lib/math/splitMix32 (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -3760,16 +2942,16 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 70 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 73 ;) (type $FUNCSIG$vj) (param $0 i64) (local $1 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2896 - i32.const 978 + i32.const 3000 + i32.const 1021 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -3825,41 +3007,41 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/internal/sort/insertionSort (; 71 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 74 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) (local $6 f32) (local $7 i32) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $6 i32.const 2 global.set $~lib/argc @@ -3870,11 +3052,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -3883,12 +3065,12 @@ local.get $0 i32.add local.get $6 - f32.store offset=8 + f32.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 2 @@ -3896,16 +3078,18 @@ local.get $0 i32.add local.get $5 - f32.store offset=8 - local.get $4 + f32.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 72 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) @@ -3920,11 +3104,11 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $7 i32.const 0 local.get $3 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub @@ -3973,14 +3157,14 @@ i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $5 local.get $4 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $6 i32.const 2 global.set $~lib/argc @@ -4014,14 +3198,14 @@ local.get $0 i32.add local.get $5 - f32.store offset=8 + f32.store local.get $3 i32.const 2 i32.shl local.get $0 i32.add local.get $6 - f32.store offset=8 + f32.store end local.get $4 i32.const 1 @@ -4040,7 +3224,7 @@ i32.ge_s if local.get $0 - f32.load offset=8 + f32.load local.set $5 local.get $0 local.get $4 @@ -4049,11 +3233,11 @@ local.get $0 i32.add local.tee $1 - f32.load offset=8 - f32.store offset=8 + f32.load + f32.store local.get $1 local.get $5 - f32.store offset=8 + f32.store i32.const 1 local.set $1 loop $continue|3 @@ -4090,14 +3274,14 @@ i32.gt_s if local.get $0 - f32.load offset=8 + f32.load local.set $5 local.get $1 i32.const 2 i32.shl local.get $0 i32.add - f32.load offset=8 + f32.load local.set $6 i32.const 2 global.set $~lib/argc @@ -4131,10 +3315,10 @@ local.get $0 i32.add local.get $5 - f32.store offset=8 + f32.store local.get $0 local.get $6 - f32.store offset=8 + f32.store end local.get $1 i32.const 1 @@ -4151,20 +3335,17 @@ end end local.get $0 - i32.const 4 - i32.add - local.tee $1 - f32.load offset=8 + f32.load offset=4 local.set $5 - local.get $1 local.get $0 - f32.load offset=8 - f32.store offset=8 + local.get $0 + f32.load + f32.store offset=4 local.get $0 local.get $5 - f32.store offset=8 + f32.store ) - (func $~lib/array/Array#sort (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f32) (local $4 f32) @@ -4172,14 +3353,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -4187,19 +3368,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $0 local.get $2 i32.const 2 i32.eq if local.get $0 - i32.const 4 - i32.add - f32.load offset=8 + f32.load offset=4 local.set $3 local.get $0 - f32.load offset=8 + f32.load local.set $4 i32.const 2 global.set $~lib/argc @@ -4211,13 +3390,11 @@ i32.lt_s if local.get $0 - i32.const 4 - i32.add local.get $4 - f32.store offset=8 + f32.store offset=4 local.get $0 local.get $3 - f32.store offset=8 + f32.store end return end @@ -4228,15 +3405,15 @@ local.get $0 local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else local.get $0 local.get $2 local.get $1 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 74 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 77 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -4265,166 +3442,102 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $std/array/isArraysEqual (; 78 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 i32) + (local $3 f32) + (local $4 i32) local.get $0 - i32.load offset=4 - local.tee $5 - i32.const 3244 - i32.load + i32.load offset=12 + local.tee $4 + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 return end local.get $0 - i32.const 3240 + local.get $1 i32.eq if i32.const 1 return end loop $repeat|0 - local.get $1 - local.get $5 + local.get $2 + local.get $4 i32.lt_s if - local.get $1 - local.tee $2 local.get $0 - i32.load + local.get $2 + call $~lib/array/Array#__get local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - f32.load offset=8 - else - unreachable - end - local.tee $4 - local.get $4 + local.get $3 f32.ne local.get $1 - i32.const 3240 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - f32.load offset=8 - else - unreachable - end - local.tee $4 - local.get $4 + local.get $2 + call $~lib/array/Array#__get + local.tee $3 + local.get $3 f32.ne i32.ne if - local.get $1 - local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - f32.load offset=8 - else - unreachable - end + local.get $2 + call $~lib/array/Array#__get local.get $1 - i32.const 3240 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - f32.load offset=8 - else - unreachable - end + local.get $2 + call $~lib/array/Array#__get f32.ne if i32.const 0 return end end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $repeat|0 end end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) (local $6 f64) (local $7 i32) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $6 i32.const 2 global.set $~lib/argc @@ -4435,11 +3548,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -4448,12 +3561,12 @@ local.get $0 i32.add local.get $6 - f64.store offset=8 + f64.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 3 @@ -4461,16 +3574,18 @@ local.get $0 i32.add local.get $5 - f64.store offset=8 - local.get $4 + f64.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) @@ -4485,11 +3600,11 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $7 i32.const 0 local.get $3 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub @@ -4538,14 +3653,14 @@ i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $5 local.get $4 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $6 i32.const 2 global.set $~lib/argc @@ -4579,14 +3694,14 @@ local.get $0 i32.add local.get $5 - f64.store offset=8 + f64.store local.get $3 i32.const 3 i32.shl local.get $0 i32.add local.get $6 - f64.store offset=8 + f64.store end local.get $4 i32.const 1 @@ -4605,7 +3720,7 @@ i32.ge_s if local.get $0 - f64.load offset=8 + f64.load local.set $5 local.get $0 local.get $4 @@ -4614,11 +3729,11 @@ local.get $0 i32.add local.tee $1 - f64.load offset=8 - f64.store offset=8 + f64.load + f64.store local.get $1 local.get $5 - f64.store offset=8 + f64.store i32.const 1 local.set $1 loop $continue|3 @@ -4655,14 +3770,14 @@ i32.gt_s if local.get $0 - f64.load offset=8 + f64.load local.set $5 local.get $1 i32.const 3 i32.shl local.get $0 i32.add - f64.load offset=8 + f64.load local.set $6 i32.const 2 global.set $~lib/argc @@ -4696,10 +3811,10 @@ local.get $0 i32.add local.get $5 - f64.store offset=8 + f64.store local.get $0 local.get $6 - f64.store offset=8 + f64.store end local.get $1 i32.const 1 @@ -4716,20 +3831,17 @@ end end local.get $0 - i32.const 8 - i32.add - local.tee $1 f64.load offset=8 local.set $5 - local.get $1 local.get $0 - f64.load offset=8 + local.get $0 + f64.load f64.store offset=8 local.get $0 local.get $5 - f64.store offset=8 + f64.store ) - (func $~lib/array/Array#sort (; 78 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#sort (; 81 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) @@ -4737,14 +3849,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -4752,19 +3864,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $0 local.get $2 i32.const 2 i32.eq if local.get $0 - i32.const 8 - i32.add f64.load offset=8 local.set $3 local.get $0 - f64.load offset=8 + f64.load local.set $4 i32.const 2 global.set $~lib/argc @@ -4776,13 +3886,11 @@ i32.lt_s if local.get $0 - i32.const 8 - i32.add local.get $4 f64.store offset=8 local.get $0 local.get $3 - f64.store offset=8 + f64.store end return end @@ -4793,15 +3901,15 @@ local.get $0 local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else local.get $0 local.get $2 local.get $1 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 79 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 82 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -4830,166 +3938,125 @@ i64.lt_s i32.sub ) - (func $std/array/isArraysEqual (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f64) - (local $5 i32) + (func $~lib/array/Array#__get (; 83 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - local.tee $5 - i32.const 3516 - i32.load + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $std/array/isArraysEqual (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 f64) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.tee $4 + local.get $1 + i32.load offset=12 i32.ne if i32.const 0 return end local.get $0 - i32.const 3512 + local.get $1 i32.eq if i32.const 1 return end loop $repeat|0 - local.get $1 - local.get $5 + local.get $2 + local.get $4 i32.lt_s if - local.get $1 - local.tee $2 local.get $0 - i32.load + local.get $2 + call $~lib/array/Array#__get local.tee $3 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - f64.load offset=8 - else - unreachable - end - local.tee $4 - local.get $4 + local.get $3 f64.ne local.get $1 - i32.const 3512 - i32.load - local.tee $2 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $1 - i32.const 3 - i32.shl - local.get $2 - i32.add - f64.load offset=8 - else - unreachable - end - local.tee $4 - local.get $4 + local.get $2 + call $~lib/array/Array#__get + local.tee $3 + local.get $3 f64.ne i32.ne if - local.get $1 - local.tee $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - f64.load offset=8 - else - unreachable - end + local.get $2 + call $~lib/array/Array#__get local.get $1 - i32.const 3512 - i32.load - local.tee $2 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $1 - i32.const 3 - i32.shl - local.get $2 - i32.add - f64.load offset=8 - else - unreachable - end + local.get $2 + call $~lib/array/Array#__get f64.ne if i32.const 0 return end end - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $repeat|0 end end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/insertionSort (; 85 ;) (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) - loop $repeat|0 - local.get $4 - local.get $1 - i32.ge_s - i32.eqz - if - local.get $4 + block $break|0 + loop $repeat|0 + local.get $3 + local.get $1 + i32.ge_s + br_if $break|0 + local.get $3 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $5 - local.get $4 + local.get $3 i32.const 1 i32.sub - local.set $3 + local.set $4 loop $continue|1 - local.get $3 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $3 + local.get $4 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $6 i32.const 2 global.set $~lib/argc @@ -5000,11 +4067,11 @@ i32.const 0 i32.ge_s br_if $break|1 - local.get $3 + local.get $4 local.tee $7 i32.const 1 i32.sub - local.set $3 + local.set $4 local.get $7 i32.const 1 i32.add @@ -5013,12 +4080,12 @@ local.get $0 i32.add local.get $6 - i32.store offset=8 + i32.store br $continue|1 end end end - local.get $3 + local.get $4 i32.const 1 i32.add i32.const 2 @@ -5026,16 +4093,18 @@ local.get $0 i32.add local.get $5 - i32.store offset=8 - local.get $4 + i32.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 + unreachable end + unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 82 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/weakHeapSort (; 86 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5050,11 +4119,11 @@ i32.const 2 i32.shl local.tee $3 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $6 i32.const 0 local.get $3 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill local.get $1 i32.const 1 i32.sub @@ -5103,14 +4172,14 @@ i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $3 local.get $4 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $5 i32.const 2 global.set $~lib/argc @@ -5144,14 +4213,14 @@ local.get $0 i32.add local.get $3 - i32.store offset=8 + i32.store local.get $7 i32.const 2 i32.shl local.get $0 i32.add local.get $5 - i32.store offset=8 + i32.store end local.get $4 i32.const 1 @@ -5170,7 +4239,7 @@ i32.ge_s if local.get $0 - i32.load offset=8 + i32.load local.set $1 local.get $0 local.get $4 @@ -5179,15 +4248,15 @@ local.get $0 i32.add local.tee $3 - i32.load offset=8 - i32.store offset=8 + i32.load + i32.store local.get $3 local.get $1 - i32.store offset=8 + i32.store i32.const 1 - local.set $3 + local.set $1 loop $continue|3 - local.get $3 + local.get $1 i32.const 5 i32.shr_s i32.const 2 @@ -5195,50 +4264,50 @@ local.get $6 i32.add i32.load - local.get $3 + local.get $1 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $3 + local.get $1 i32.const 1 i32.shl i32.add - local.tee $1 + local.tee $3 local.get $4 i32.lt_s if - local.get $1 - local.set $3 + local.get $3 + local.set $1 br $continue|3 end end loop $continue|4 - local.get $3 + local.get $1 i32.const 0 i32.gt_s if local.get $0 - i32.load offset=8 - local.set $1 - local.get $3 + i32.load + local.set $3 + local.get $1 i32.const 2 i32.shl local.get $0 i32.add - i32.load offset=8 + i32.load local.set $5 i32.const 2 global.set $~lib/argc - local.get $1 + local.get $3 local.get $5 local.get $2 call_indirect (type $FUNCSIG$iii) i32.const 0 i32.lt_s if - local.get $3 + local.get $1 i32.const 5 i32.shr_s i32.const 2 @@ -5249,27 +4318,27 @@ local.get $7 i32.load i32.const 1 - local.get $3 + local.get $1 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $3 + local.get $1 i32.const 2 i32.shl local.get $0 i32.add - local.get $1 - i32.store offset=8 + local.get $3 + i32.store local.get $0 local.get $5 - i32.store offset=8 + i32.store end - local.get $3 + local.get $1 i32.const 1 i32.shr_s - local.set $3 + local.set $1 br $continue|4 end end @@ -5281,20 +4350,17 @@ end end local.get $0 - i32.const 4 - i32.add - local.tee $1 - i32.load offset=8 - local.set $2 - local.get $1 + i32.load offset=4 + local.set $1 local.get $0 - i32.load offset=8 - i32.store offset=8 local.get $0 - local.get $2 - i32.store offset=8 + i32.load + i32.store offset=4 + local.get $0 + local.get $1 + i32.store ) - (func $~lib/array/Array#sort (; 83 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 87 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5302,14 +4368,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -5318,19 +4384,17 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if local.get $3 - i32.const 4 - i32.add - i32.load offset=8 + i32.load offset=4 local.set $2 local.get $3 - i32.load offset=8 + i32.load local.set $4 i32.const 2 global.set $~lib/argc @@ -5342,13 +4406,11 @@ i32.lt_s if local.get $3 - i32.const 4 - i32.add local.get $4 - i32.store offset=8 + i32.store offset=4 local.get $3 local.get $2 - i32.store offset=8 + i32.store end local.get $0 return @@ -5360,72 +4422,97 @@ local.get $3 local.get $2 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else local.get $3 local.get $2 local.get $1 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 84 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.sub + ) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + i32.gt_u + local.get $0 + local.get $1 + i32.lt_u + i32.sub + ) + (func $~lib/array/Array.create (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 268435452 + i32.gt_u + if + i32.const 0 + i32.const 280 + i32.const 44 + i32.const 62 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $0 + i32.const 0 + i32.store offset=12 local.get $0 - local.get $1 - i32.sub - ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 85 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + i32.load offset=4 + i32.const 0 local.get $0 - local.get $1 - i32.gt_u + i32.load offset=8 + call $~lib/memory/memory.fill local.get $0 - local.get $1 - i32.lt_u - i32.sub ) - (func $std/array/createReverseOrderedArray (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 91 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - call $~lib/array/Array#constructor - local.set $1 - i32.const 0 - local.set $0 + call $~lib/array/Array.create + local.set $2 loop $repeat|0 block $break|0 - local.get $0 local.get $1 - i32.load offset=4 + local.get $0 i32.ge_s br_if $break|0 + local.get $2 local.get $1 local.get $0 - local.get $1 - i32.load offset=4 i32.const 1 i32.sub - local.get $0 + local.get $1 i32.sub call $~lib/array/Array#__set - local.get $0 + local.get $1 i32.const 1 i32.add - local.set $0 + local.set $1 br $repeat|0 end end - local.get $1 + local.get $2 ) - (func $~lib/math/NativeMath.random (; 87 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 92 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) global.get $~lib/math/random_seeded i32.eqz if i32.const 0 - i32.const 2896 - i32.const 987 + i32.const 3000 + i32.const 1030 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_64 @@ -5462,23 +4549,22 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 i32) local.get $0 - call $~lib/array/Array#constructor - local.set $0 + call $~lib/array/Array.create + local.set $2 loop $repeat|0 block $break|0 local.get $1 local.get $0 - i32.load offset=4 i32.ge_s br_if $break|0 - local.get $0 + local.get $2 local.get $1 call $~lib/math/NativeMath.random local.get $0 - i32.load offset=4 f64.convert_i32_s f64.mul i32.trunc_f64_s @@ -5490,64 +4576,31 @@ br $repeat|0 end end - local.get $0 + local.get $2 ) - (func $std/array/isSorted (; 89 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 94 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) i32.const 1 local.set $2 local.get $0 - i32.load offset=4 - local.set $4 + i32.load offset=12 + local.set $3 loop $repeat|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if i32.const 2 global.set $~lib/argc + local.get $0 local.get $2 i32.const 1 i32.sub - local.tee $3 + call $~lib/array/Array#__get local.get $0 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $3 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get local.get $1 call_indirect (type $FUNCSIG$iii) i32.const 0 @@ -5567,7 +4620,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 95 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -5576,67 +4629,111 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 160 + i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/array/assertSortedDefault (; 91 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 48 call $std/array/assertSorted ) - (func $start:std/array~anonymous|44 (; 92 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $std/array/createReverseOrderedNestedArray (; 93 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 98 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 512 + i32.const 2 + i32.const 24 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.load offset=4 + i32.const 0 + local.get $0 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $0 + ) + (func $~lib/array/Array<~lib/array/Array>#__set (; 99 ;) (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 offset=12 + local.tee $3 + i32.gt_u + if + i32.const 0 + i32.const 280 + i32.const 111 + i32.const 38 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.tee $4 + i32.load + local.get $2 + i32.ne + if + local.get $4 + local.get $2 + i32.store + end + local.get $1 + local.get $3 + i32.ge_s + if + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $std/array/createReverseOrderedNestedArray (; 100 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) - i32.const 512 - call $~lib/array/Array#constructor + call $~lib/array/Array.create<~lib/array/Array> local.set $1 loop $repeat|0 local.get $0 - local.get $1 - i32.load offset=4 + i32.const 512 i32.lt_s if - local.get $1 - local.get $0 i32.const 1 - call $~lib/array/Array#constructor - call $~lib/array/Array#__set - local.get $0 - local.get $1 - i32.load + call $~lib/array/Array.create local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end i32.const 0 - local.get $1 - i32.load offset=4 - i32.const 1 - i32.sub + i32.const 511 local.get $0 i32.sub call $~lib/array/Array#__set + local.get $1 + local.get $0 + local.get $2 + call $~lib/array/Array<~lib/array/Array>#__set local.get $0 i32.const 1 i32.add @@ -5646,38 +4743,16 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 94 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - i32.const 0 + (func $start:std/array~anonymous|47 (; 101 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end i32.const 0 + call $~lib/array/Array#__get local.get $1 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5685,14 +4760,14 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $2 i32.const 1 i32.le_s @@ -5701,123 +4776,208 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if local.get $3 - i32.const 4 - i32.add - i32.load offset=8 + i32.load offset=4 local.set $2 local.get $3 - i32.load offset=8 + i32.load local.set $4 i32.const 2 global.set $~lib/argc local.get $2 - local.get $4 - local.get $1 - call_indirect (type $FUNCSIG$iii) - i32.const 0 + local.get $4 + local.get $1 + call_indirect (type $FUNCSIG$iii) + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $2 + i32.store + end + local.get $0 + return + end + local.get $3 + local.get $2 + local.get $1 + call $~lib/util/sort/insertionSort + local.get $0 + ) + (func $~lib/array/Array<~lib/array/Array>#__get (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $std/array/isSorted<~lib/array/Array> (; 104 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 1 + local.set $2 + local.get $0 + i32.load offset=12 + local.set $3 + loop $repeat|0 + local.get $2 + local.get $3 i32.lt_s if - local.get $3 - i32.const 4 - i32.add - local.get $4 - i32.store offset=8 - local.get $3 + i32.const 2 + global.set $~lib/argc + local.get $0 local.get $2 - i32.store offset=8 + i32.const 1 + i32.sub + call $~lib/array/Array<~lib/array/Array>#__get + local.get $0 + local.get $2 + call $~lib/array/Array<~lib/array/Array>#__get + local.get $1 + call_indirect (type $FUNCSIG$iii) + i32.const 0 + i32.gt_s + if + i32.const 0 + return + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + unreachable end - local.get $0 - return end - local.get $3 - local.get $2 - local.get $1 - call $~lib/internal/sort/insertionSort - local.get $0 + i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 105 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort local.get $1 - call $std/array/isSorted + call $std/array/isSorted<~lib/array/Array> i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 160 + i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/array/createReverseOrderedElementsArray (; 97 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/array/Array.create> (; 106 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 512 + i32.const 2 + i32.const 26 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.load offset=4 + i32.const 0 + local.get $0 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $0 + ) + (func $std/array/createReverseOrderedElementsArray (; 107 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - i32.const 512 - call $~lib/array/Array#constructor - local.set $0 + call $~lib/array/Array.create> + local.set $1 loop $repeat|0 - local.get $1 local.get $0 - i32.load offset=4 + i32.const 512 i32.lt_s if + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register + local.tee $2 + i32.const 511 local.get $0 - i32.load offset=4 - i32.const 1 i32.sub + i32.store local.get $1 - i32.sub - local.set $2 - i32.const 4 - call $~lib/allocator/arena/__memory_allocate - local.tee $3 + local.get $0 local.get $2 - i32.store + call $~lib/array/Array<~lib/array/Array>#__set local.get $0 - local.get $1 - local.get $3 - call $~lib/array/Array#__set - local.get $1 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - local.get $0 + local.get $1 ) - (func $start:std/array~anonymous|48 (; 98 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/internal/string/compareUnsafe (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 109 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 if (result i32) local.get $0 - i32.load16_u offset=4 + i32.load16_u local.get $1 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 @@ -5837,57 +4997,52 @@ end local.get $3 ) - (func $~lib/internal/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 110 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 + i32.const 1 local.get $1 - i32.eq - local.tee $2 i32.eqz - if - local.get $0 - i32.eqz - local.set $2 - end - local.get $2 + i32.const 1 + local.get $0 i32.eqz - if - local.get $1 - i32.eqz - local.set $2 - end - local.get $2 + local.get $0 + local.get $1 + i32.eq + select + select if i32.const 0 return end + i32.const 0 local.get $1 - i32.load - local.set $3 - local.get $0 - i32.load - local.tee $4 - i32.eqz + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 - if - local.get $3 - i32.eqz - local.set $2 - end - local.get $2 + i32.eqz + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $3 + select if i32.const 0 return end - local.get $4 + local.get $3 i32.eqz if i32.const -1 return end - local.get $3 + local.get $2 i32.eqz if i32.const 1 @@ -5895,15 +5050,15 @@ end local.get $0 local.get $1 - local.get $4 local.get $3 - local.get $4 + local.get $2 local.get $3 + local.get $2 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl ) - (func $std/array/assertSorted<~lib/string/String>|trampoline (; 101 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 111 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) block $1of1 block $0of1 @@ -5920,9 +5075,20 @@ end local.get $0 local.get $1 - call $std/array/assertSorted<~lib/array/Array> + call $~lib/array/Array<~lib/array/Array>#sort + local.get $1 + call $std/array/isSorted + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 813 + i32.const 2 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/string/String.__eq (; 102 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -5931,25 +5097,28 @@ i32.const 1 return end - local.get $0 - i32.eqz - local.tee $2 + local.get $1 i32.eqz - if - local.get $1 - i32.eqz - local.set $2 - end - local.get $2 + i32.const 1 + local.get $0 + select if i32.const 0 return end local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -5958,18 +5127,17 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $std/array/isArraysEqual<~lib/string/String> (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 - i32.load offset=4 - local.tee $4 + i32.load offset=12 + local.tee $3 local.get $1 - i32.load offset=4 + i32.load offset=12 i32.ne if i32.const 0 @@ -5984,45 +5152,15 @@ end loop $repeat|0 local.get $2 - local.get $4 + local.get $3 i32.lt_s if - local.get $2 local.get $0 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end local.get $2 + call $~lib/array/Array#__get local.get $1 - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $2 + call $~lib/array/Array#__get call $~lib/string/String.__eq if local.get $2 @@ -6039,151 +5177,123 @@ end i32.const 1 ) - (func $~lib/internal/string/allocateUnsafe (; 104 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/array/Array.create<~lib/string/String> (; 114 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 400 + i32.const 2 + i32.const 28 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $0 + i32.const 0 + i32.store offset=12 local.get $0 + i32.load offset=4 i32.const 0 - i32.gt_s - local.tee $1 - if - local.get $0 - i32.const 536870910 - i32.le_s - local.set $1 - end - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end local.get $0 - i32.const 1 - i32.shl - i32.const 4 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $1 + i32.load offset=8 + call $~lib/memory/memory.fill local.get $0 - i32.store - local.get $1 ) - (func $~lib/string/String#charAt (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#charAt (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 - i32.const 2928 + i32.const 3028 i32.load + i32.const 1 + i32.shr_u i32.ge_u if - i32.const 3904 + i32.const 4208 return end - i32.const 1 - call $~lib/internal/string/allocateUnsafe + i32.const 2 + call $~lib/util/runtime/allocate local.tee $1 local.get $0 i32.const 1 i32.shl - i32.const 2928 + i32.const 3040 i32.add - i32.load16_u offset=4 - i32.store16 offset=4 + i32.load16_u + i32.store16 local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/string/copyUnsafe (; 106 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) + (func $~lib/string/String#concat (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $1 + i32.const 4432 + local.get $1 + select + local.tee $3 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.const 1 i32.shl + local.tee $4 local.get $0 - i32.add - i32.const 4 - i32.add - local.get $3 + i32.const 16 + i32.sub + i32.load offset=4 i32.const 1 - i32.shl - local.get $2 - i32.add - i32.const 4 - i32.add - local.get $4 + i32.shr_u i32.const 1 i32.shl - call $~lib/internal/memory/memmove - ) - (func $~lib/string/String#concat (; 107 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 4056 - i32.const 110 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load - local.tee $3 - local.get $1 - i32.const 4144 - local.get $1 - select local.tee $1 - i32.load - local.tee $4 i32.add local.tee $2 i32.eqz if - i32.const 3904 + i32.const 4208 return end local.get $2 - call $~lib/internal/string/allocateUnsafe + call $~lib/util/runtime/allocate local.tee $2 - i32.const 0 local.get $0 - i32.const 0 - local.get $3 - call $~lib/internal/string/copyUnsafe + local.get $1 + call $~lib/memory/memory.copy + local.get $1 local.get $2 + i32.add local.get $3 - local.get $1 - i32.const 0 local.get $4 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/string/String.__concat (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 4144 + i32.const 4432 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $std/array/createRandomString (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 3904 + i32.const 4208 local.set $1 loop $repeat|0 - block $break|0 - local.get $2 - local.get $0 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $0 + i32.lt_s + if local.get $1 call $~lib/math/NativeMath.random - i32.const 2928 + i32.const 3028 i32.load + i32.const 1 + i32.shr_u f64.convert_i32_s f64.mul f64.floor @@ -6200,16 +5310,14 @@ end local.get $1 ) - (func $std/array/createRandomStringArray (; 110 ;) (type $FUNCSIG$i) (result i32) + (func $std/array/createRandomStringArray (; 119 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) - i32.const 400 - call $~lib/array/Array#constructor + call $~lib/array/Array.create<~lib/string/String> local.set $1 loop $repeat|0 local.get $0 - local.get $1 - i32.load offset=4 + i32.const 400 i32.lt_s if local.get $1 @@ -6219,7 +5327,7 @@ f64.mul i32.trunc_f64_s call $std/array/createRandomString - call $~lib/array/Array#__set + call $~lib/array/Array<~lib/array/Array>#__set local.get $0 i32.const 1 i32.add @@ -6229,29 +5337,32 @@ end local.get $1 ) - (func $~lib/string/String#substring (; 111 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.eqz if i32.const 0 - i32.const 4056 - i32.const 254 + i32.const 4384 + i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 - i32.load - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $2 i32.const 0 - local.get $3 + local.get $2 i32.lt_s select - local.tee $2 + local.tee $3 local.get $1 i32.const 0 local.get $1 @@ -6259,58 +5370,94 @@ i32.gt_s select local.tee $1 - local.get $3 + local.get $2 local.get $1 - local.get $3 + local.get $2 i32.lt_s select - local.tee $1 + local.tee $2 + local.get $3 local.get $2 - local.get $1 i32.gt_s select - local.tee $4 + i32.const 1 + i32.shl + local.tee $1 + local.get $3 local.get $2 - local.get $1 + local.get $3 local.get $2 - local.get $1 i32.lt_s select - local.tee $1 - i32.sub + i32.const 1 + i32.shl local.tee $3 + i32.sub + local.tee $2 i32.eqz if - i32.const 3904 + i32.const 4208 return end - local.get $1 - i32.eqz - local.tee $2 + local.get $3 if (result i32) + i32.const 0 + else local.get $0 - i32.load - local.get $4 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.get $1 i32.eq - else - local.get $2 end if local.get $0 return end - local.get $3 - call $~lib/internal/string/allocateUnsafe - local.tee $2 - i32.const 0 + local.get $2 + call $~lib/util/runtime/allocate + local.tee $1 local.get $0 - local.get $1 local.get $3 - call $~lib/internal/string/copyUnsafe + i32.add local.get $2 + call $~lib/memory/memory.copy + local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/array/Array#join (; 112 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/util/runtime/discard (; 121 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 8400 + i32.le_u + if + i32.const 0 + i32.const 80 + i32.const 115 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 80 + i32.const 117 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/array/Array#join_bool (; 122 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6319,84 +5466,91 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - i32.const 4244 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub local.tee $1 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 4240 - i32.load - local.set $2 - i32.const 4216 - i32.load - local.tee $4 - i32.const 0 - i32.ne - local.set $7 + local.get $0 + i32.load offset=4 + local.set $3 local.get $1 i32.eqz if - i32.const 4184 - i32.const 4200 - local.get $2 - i32.load8_u offset=8 + i32.const 4480 + i32.const 4504 + local.get $3 + i32.load8_u select return end - local.get $4 + i32.const 4524 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 5 i32.add local.get $1 i32.mul i32.const 5 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe - local.set $3 + local.tee $7 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $2 + i32.const 0 + local.set $0 loop $repeat|0 local.get $5 local.get $1 i32.lt_s if - local.get $2 + local.get $3 local.get $5 i32.add - i32.load8_u offset=8 - i32.const 0 - i32.ne - local.tee $9 + i32.load8_u + local.tee $8 i32.eqz i32.const 4 i32.add local.set $6 - local.get $3 local.get $0 - i32.const 4184 - i32.const 4200 - local.get $9 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 4480 + i32.const 4504 + local.get $8 select - i32.const 0 local.get $6 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $6 i32.add local.set $0 - local.get $7 + local.get $4 if - local.get $3 local.get $0 - i32.const 4216 - i32.const 0 + i32.const 1 + i32.shl + local.get $2 + i32.add + i32.const 4536 local.get $4 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $4 i32.add @@ -6410,52 +5564,48 @@ end end local.get $1 - local.get $2 + local.get $3 i32.add - i32.load8_u offset=8 - i32.const 0 - i32.ne - local.tee $1 + i32.load8_u + local.tee $3 i32.eqz i32.const 4 i32.add - local.set $2 - local.get $3 + local.set $1 local.get $0 - i32.const 4184 - i32.const 4200 - local.get $1 - select - i32.const 0 + i32.const 1 + i32.shl local.get $2 - call $~lib/internal/string/copyUnsafe + i32.add + i32.const 4480 + i32.const 4504 local.get $3 - local.set $1 - local.get $8 + select + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 local.get $0 - local.get $2 + local.get $1 i32.add local.tee $0 i32.gt_s if - local.get $3 + local.get $2 local.get $0 call $~lib/string/String#substring - local.set $1 - local.get $3 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + local.set $0 + local.get $2 + call $~lib/util/runtime/discard + local.get $0 + return end - local.get $1 + local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/decimalCount32 (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -6509,10 +5659,10 @@ end end ) - (func $~lib/internal/number/utoa32_lut (; 114 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 124 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 4832 + i32.const 5100 i32.load local.set $3 loop $continue|0 @@ -6536,26 +5686,26 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 100 i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -6579,13 +5729,13 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 - i32.store offset=4 + i32.load + i32.store end local.get $1 i32.const 10 @@ -6598,13 +5748,13 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $1 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 - i32.store offset=4 + i32.load + i32.store else local.get $2 i32.const 1 @@ -6616,17 +5766,17 @@ local.get $1 i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 115 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 125 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if - i32.const 4312 + i32.const 4656 return end local.get $0 @@ -6640,24 +5790,28 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa_stream (; 116 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6669,7 +5823,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -6688,94 +5842,101 @@ local.get $2 end local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 ) - (func $~lib/array/Array#join (; 117 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 127 ;) (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 $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end local.get $0 - i32.load + i32.load offset=4 local.set $4 - local.get $1 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $7 local.get $3 i32.eqz if local.get $4 - i32.load offset=8 - call $~lib/internal/number/itoa32 + i32.load + call $~lib/util/number/itoa32 return end - local.get $5 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $5 i32.const 11 i32.add local.get $3 i32.mul i32.const 11 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe + local.tee $7 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $2 + i32.const 0 local.set $0 loop $repeat|0 local.get $6 local.get $3 i32.lt_s if - local.get $0 local.get $2 + local.get $0 local.get $6 i32.const 2 i32.shl local.get $4 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $2 + i32.load + call $~lib/util/number/itoa_stream + local.get $0 i32.add - local.set $2 - local.get $7 + local.set $0 + local.get $5 if local.get $0 + i32.const 1 + i32.shl local.get $2 + i32.add local.get $1 - i32.const 0 local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $2 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 local.get $5 i32.add - local.set $2 + local.set $0 end local.get $6 i32.const 1 @@ -6784,60 +5945,63 @@ br $repeat|0 end end - local.get $0 - local.set $1 - local.get $8 - local.get $0 + local.get $7 local.get $2 + local.get $0 local.get $3 i32.const 2 i32.shl local.get $4 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $2 + i32.load + call $~lib/util/number/itoa_stream + local.get $0 i32.add - local.tee $2 + local.tee $0 i32.gt_s if - local.get $0 local.get $2 + local.get $0 call $~lib/string/String#substring - local.set $1 + local.set $0 + local.get $2 + call $~lib/util/runtime/discard local.get $0 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + return end + local.get $2 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 local.get $1 + call $~lib/array/Array#join_int ) - (func $~lib/internal/number/utoa32 (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 i32.eqz if - i32.const 4312 + i32.const 4656 return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa_stream (; 119 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 130 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -6849,93 +6013,100 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $0 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $0 ) - (func $~lib/array/Array#join (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 131 ;) (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 $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $3 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end local.get $0 - i32.load + i32.load offset=4 local.set $4 - local.get $1 - i32.load - local.tee $5 - i32.const 0 - i32.ne - local.set $7 local.get $3 i32.eqz if local.get $4 - i32.load offset=8 - call $~lib/internal/number/utoa32 + i32.load + call $~lib/util/number/utoa32 return end - local.get $5 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $5 i32.const 10 i32.add local.get $3 i32.mul i32.const 10 i32.add - local.tee $8 - call $~lib/internal/string/allocateUnsafe + local.tee $7 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $2 + i32.const 0 local.set $0 loop $repeat|0 local.get $6 local.get $3 i32.lt_s if - local.get $0 local.get $2 + local.get $0 local.get $6 i32.const 2 i32.shl local.get $4 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $2 + i32.load + call $~lib/util/number/itoa_stream + local.get $0 i32.add - local.set $2 - local.get $7 + local.set $0 + local.get $5 if local.get $0 + i32.const 1 + i32.shl local.get $2 + i32.add local.get $1 - i32.const 0 local.get $5 - call $~lib/internal/string/copyUnsafe - local.get $2 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 local.get $5 i32.add - local.set $2 + local.set $0 end local.get $6 i32.const 1 @@ -6944,41 +6115,40 @@ br $repeat|0 end end - local.get $0 - local.set $1 - local.get $8 - local.get $0 + local.get $7 local.get $2 + local.get $0 local.get $3 i32.const 2 i32.shl local.get $4 i32.add - i32.load offset=8 - call $~lib/internal/number/itoa_stream - local.get $2 + i32.load + call $~lib/util/number/itoa_stream + local.get $0 i32.add - local.tee $2 + local.tee $0 i32.gt_s if - local.get $0 local.get $2 + local.get $0 call $~lib/string/String#substring - local.set $1 + local.set $0 + local.get $2 + call $~lib/util/runtime/discard local.get $0 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + return end + local.get $2 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 local.get $1 + call $~lib/array/Array#join_int ) - (func $~lib/internal/number/genDigits (; 121 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 133 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -6990,7 +6160,7 @@ local.get $3 local.get $1 i64.sub - local.set $10 + local.set $9 i64.const 1 i32.const 0 local.get $4 @@ -6999,21 +6169,21 @@ i64.extend_i32_s local.tee $1 i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub local.tee $14 local.get $3 i64.and - local.set $9 + local.set $11 local.get $3 local.get $1 i64.shr_u i32.wrap_i64 local.tee $7 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $4 - i32.const 6616 + i32.const 6652 i32.load local.set $13 loop $continue|0 @@ -7166,7 +6336,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $4 i32.const 1 @@ -7177,22 +6347,22 @@ local.get $12 i64.extend_i32_s i64.shl - local.get $9 + local.get $11 i64.add local.tee $1 local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $4 i32.add - global.set $~lib/internal/number/_K - local.get $13 + global.set $~lib/util/number/_K local.get $4 i32.const 2 i32.shl + local.get $13 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $12 i64.extend_i32_s i64.shl @@ -7205,44 +6375,39 @@ local.get $0 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $4 loop $continue|2 + local.get $5 + local.get $1 + i64.sub + local.get $3 + i64.ge_u + i32.const 0 local.get $1 - local.get $10 + local.get $9 i64.lt_u - local.tee $0 - if - local.get $5 + select + if (result i32) + i32.const 1 + local.get $9 local.get $1 i64.sub + local.get $1 local.get $3 - i64.ge_u - local.set $0 - end - local.get $0 - if + i64.add + local.get $9 + i64.sub + i64.gt_u local.get $1 local.get $3 i64.add - local.get $10 + local.get $9 i64.lt_u - local.tee $0 - i32.eqz - if - local.get $10 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $10 - i64.sub - i64.gt_u - local.set $0 - end + select + else + i32.const 0 end - local.get $0 if local.get $4 i32.const 1 @@ -7257,7 +6422,7 @@ end local.get $2 local.get $4 - i32.store16 offset=4 + i32.store16 local.get $6 return end @@ -7269,7 +6434,7 @@ i64.const 10 i64.mul local.set $5 - local.get $9 + local.get $11 i64.const 10 i64.mul local.tee $3 @@ -7299,7 +6464,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $4 i32.const 1 @@ -7308,25 +6473,27 @@ local.get $3 local.get $14 i64.and - local.tee $9 + local.tee $11 local.get $5 i64.ge_u br_if $continue|3 - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $4 i32.add - global.set $~lib/internal/number/_K - local.get $13 + global.set $~lib/util/number/_K + local.get $11 + local.set $1 i32.const 0 local.get $4 i32.sub i32.const 2 i32.shl + local.get $13 i32.add - i64.load32_u offset=8 - local.get $10 + i64.load32_u + local.get $9 i64.mul - local.set $1 + local.set $3 local.get $6 i32.const 1 i32.sub @@ -7335,65 +6502,59 @@ local.get $0 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $4 loop $continue|4 - local.get $9 + local.get $5 + local.get $1 + i64.sub + local.get $10 + i64.ge_u + i32.const 0 local.get $1 + local.get $3 i64.lt_u - local.tee $0 - if - local.get $5 - local.get $9 + select + if (result i32) + i32.const 1 + local.get $3 + local.get $1 i64.sub - local.get $11 - i64.ge_u - local.set $0 - end - local.get $0 - if - local.get $9 - local.get $11 + local.get $1 + local.get $10 i64.add + local.get $3 + i64.sub + i64.gt_u local.get $1 + local.get $10 + i64.add + local.get $3 i64.lt_u - local.tee $0 - i32.eqz - if - local.get $1 - local.get $9 - i64.sub - local.get $9 - local.get $11 - i64.add - local.get $1 - i64.sub - i64.gt_u - local.set $0 - end + select + else + i32.const 0 end - local.get $0 if local.get $4 i32.const 1 i32.sub local.set $4 - local.get $9 - local.get $11 + local.get $1 + local.get $10 i64.add - local.set $9 + local.set $1 br $continue|4 end end local.get $2 local.get $4 - i32.store16 offset=4 + i32.store16 local.get $6 end ) - (func $~lib/internal/number/prettify (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $2 i32.eqz if @@ -7403,7 +6564,7 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -7415,14 +6576,13 @@ i32.add local.tee $3 i32.le_s - local.tee $4 - if + if (result i32) local.get $3 i32.const 21 i32.le_s - local.set $4 + else + i32.const 0 end - local.get $4 if (result i32) loop $repeat|0 block $break|0 @@ -7436,7 +6596,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -7450,88 +6610,73 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 local.get $3 i32.const 0 i32.gt_s - local.tee $4 - if - local.get $3 - i32.const 21 - i32.le_s - local.set $4 - end - local.get $4 + select if (result i32) local.get $3 i32.const 1 i32.shl local.get $0 i32.add - i32.const 4 - i32.add - local.tee $4 + local.tee $0 i32.const 2 i32.add - local.get $4 + local.get $0 i32.const 0 local.get $2 i32.sub i32.const 1 i32.shl - call $~lib/internal/memory/memmove - local.get $3 - i32.const 1 - i32.shl + call $~lib/memory/memory.copy local.get $0 - i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 i32.const -6 local.get $3 i32.lt_s - local.tee $2 - if - local.get $3 - i32.const 0 - i32.le_s - local.set $2 - end - local.get $2 + select if (result i32) - local.get $0 - i32.const 4 - i32.add - local.tee $2 i32.const 2 local.get $3 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl + local.get $0 i32.add - local.get $2 + local.get $0 local.get $1 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 3014704 - i32.store offset=4 + i32.store i32.const 2 local.set $2 loop $repeat|1 block $break|1 local.get $2 - local.get $4 + local.get $3 i32.ge_s br_if $break|1 local.get $2 @@ -7540,7 +6685,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $2 i32.const 1 i32.add @@ -7549,7 +6694,7 @@ end end local.get $1 - local.get $4 + local.get $3 i32.add else local.get $1 @@ -7558,7 +6703,7 @@ if (result i32) local.get $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add @@ -7567,41 +6712,38 @@ local.get $3 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 0 i32.lt_s - local.tee $1 + local.tee $2 if i32.const 0 - local.get $2 + local.get $1 i32.sub - local.set $2 + local.set $1 end - local.get $2 + local.get $1 end - local.get $2 - call $~lib/internal/number/decimalCount32 + local.get $1 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.tee $2 - call $~lib/internal/number/utoa32_lut + local.tee $1 + call $~lib/util/number/utoa32_lut local.get $0 i32.const 45 i32.const 43 - local.get $1 - select - i32.store16 offset=4 local.get $2 + select + i32.store16 + local.get $1 i32.const 2 i32.add else local.get $0 i32.const 4 i32.add - local.tee $2 - i32.const 4 - i32.add - local.get $2 + local.get $0 i32.const 2 i32.add local.get $1 @@ -7610,50 +6752,50 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $2 i32.add local.tee $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add - local.tee $0 + local.tee $2 block (result i32) local.get $3 i32.const 1 i32.sub - local.tee $2 + local.tee $0 i32.const 0 i32.lt_s - local.tee $4 + local.tee $3 if i32.const 0 - local.get $2 + local.get $0 i32.sub - local.set $2 + local.set $0 end - local.get $2 + local.get $0 end - local.get $2 - call $~lib/internal/number/decimalCount32 + local.get $0 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.tee $2 - call $~lib/internal/number/utoa32_lut - local.get $0 + local.tee $0 + call $~lib/util/number/utoa32_lut + local.get $2 i32.const 45 i32.const 43 - local.get $4 + local.get $3 select - i32.store16 offset=4 + i32.store16 + local.get $0 local.get $1 - local.get $2 i32.add i32.const 2 i32.add @@ -7662,38 +6804,30 @@ end end ) - (func $~lib/internal/number/dtoa_core (; 123 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 135 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) (local $8 i64) (local $9 i64) (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) - (local $19 i64) + (local $11 i32) local.get $1 f64.const 0 f64.lt local.tee $10 - if (result f64) + if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 local.get $1 f64.neg - else - local.get $1 + local.set $1 end + local.get $1 i64.reinterpret_f64 local.tee $2 i64.const 9218868437227405312 @@ -7701,68 +6835,68 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.set $5 + local.tee $11 + i32.const 0 + i32.ne + local.set $7 local.get $2 i64.const 4503599627370495 i64.and - local.get $5 - i32.const 0 - i32.ne - local.tee $6 + local.get $7 i64.extend_i32_u i64.const 52 i64.shl i64.add - local.tee $2 + local.tee $5 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $7 + local.tee $2 i64.clz i32.wrap_i64 local.set $3 - local.get $7 + local.get $2 local.get $3 i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_plus - local.get $5 + global.set $~lib/util/number/_frc_plus + local.get $11 i32.const 1 - local.get $6 + local.get $7 select i32.const 1075 i32.sub - local.tee $5 + local.tee $7 i32.const 1 i32.sub local.get $3 i32.sub local.set $3 - local.get $2 - local.get $2 + local.get $5 + local.get $5 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $6 + local.tee $11 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $6 + local.get $7 + local.get $11 i32.sub local.get $3 i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $3 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp i32.const 348 i32.const -61 - global.get $~lib/internal/number/_exp + global.get $~lib/util/number/_exp i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -7784,82 +6918,52 @@ local.tee $3 i32.const 3 i32.shl - local.tee $6 i32.sub - global.set $~lib/internal/number/_K - i32.const 6544 - i32.load - local.set $13 - i32.const 6280 + global.set $~lib/util/number/_K + i32.const 6340 i32.load - local.get $6 + local.get $3 + i32.const 3 + i32.shl i32.add - i64.load offset=8 - global.set $~lib/internal/number/_frc_pow - local.get $13 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 6564 + i32.load local.get $3 i32.const 1 i32.shl i32.add - i32.load16_s offset=8 - global.set $~lib/internal/number/_exp_pow - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $3 - i64.extend_i32_s - i64.shl - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/internal/number/_frc_pow - local.tee $2 + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $6 i64.const 4294967295 i64.and - local.tee $14 - i64.mul - local.set $15 - global.get $~lib/internal/number/_frc_plus + local.set $2 + global.get $~lib/util/number/_frc_plus local.tee $8 i64.const 4294967295 i64.and local.tee $4 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $9 - i64.mul - local.set $12 - global.get $~lib/internal/number/_frc_minus - local.tee $16 - i64.const 4294967295 - i64.and - local.tee $17 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $18 - i64.mul - local.set $19 - local.get $4 - local.get $2 + local.get $6 i64.const 32 i64.shr_u - local.tee $4 + local.tee $6 i64.mul local.get $8 i64.const 32 i64.shr_u local.tee $8 - local.get $9 + local.get $2 + i64.mul + local.get $2 + local.get $4 i64.mul - local.get $12 i64.const 32 i64.shr_u i64.add - local.tee $9 + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -7867,10 +6971,10 @@ i64.add i64.const 32 i64.shr_u - local.get $4 + local.get $6 local.get $8 i64.mul - local.get $9 + local.get $4 i64.const 32 i64.shr_u i64.add @@ -7878,23 +6982,26 @@ i64.const 1 i64.sub local.tee $8 - local.get $2 - i64.const 32 - i64.shr_u + local.get $6 + global.get $~lib/util/number/_frc_minus local.tee $4 - local.get $17 + i64.const 4294967295 + i64.and + local.tee $9 i64.mul - local.get $16 + local.get $4 i64.const 32 i64.shr_u - local.tee $9 - local.get $18 + local.tee $4 + local.get $2 + i64.mul + local.get $2 + local.get $9 i64.mul - local.get $19 i64.const 32 i64.shr_u i64.add - local.tee $12 + local.tee $9 i64.const 4294967295 i64.and i64.add @@ -7903,9 +7010,9 @@ i64.const 32 i64.shr_u local.get $4 - local.get $9 + local.get $6 i64.mul - local.get $12 + local.get $9 i64.const 32 i64.shr_u i64.add @@ -7920,23 +7027,32 @@ local.get $0 i32.add local.get $0 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $2 - local.get $11 + local.get $6 + local.get $5 + local.get $5 + i64.clz + i32.wrap_i64 + local.tee $0 + i64.extend_i32_s + i64.shl + local.tee $5 + i64.const 4294967295 + i64.and + local.tee $9 i64.mul - local.get $7 + local.get $5 i64.const 32 i64.shr_u - local.tee $7 - local.get $14 + local.tee $5 + local.get $2 + i64.mul + local.get $2 + local.get $9 i64.mul - local.get $15 i64.const 32 i64.shr_u i64.add - local.tee $11 + local.tee $2 i64.const 4294967295 i64.and i64.add @@ -7944,46 +7060,46 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $7 + local.get $5 + local.get $6 i64.mul - local.get $11 + local.get $2 i64.const 32 i64.shr_u i64.add i64.add - global.get $~lib/internal/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 + global.get $~lib/util/number/_exp_pow + local.tee $3 + local.get $7 + local.get $0 i32.sub i32.add i32.const -64 i32.sub local.get $8 - global.get $~lib/internal/number/_exp - local.get $0 + global.get $~lib/util/number/_exp + local.get $3 i32.add i32.const -64 i32.sub local.get $4 local.get $10 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits local.get $10 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify + global.get $~lib/util/number/_K + call $~lib/util/number/prettify local.get $10 i32.add ) - (func $~lib/internal/number/dtoa (; 124 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 136 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 5176 + i32.const 5504 return end local.get $0 @@ -7996,40 +7112,32 @@ local.get $0 f64.ne if - i32.const 5192 + i32.const 5528 return end - i32.const 5208 - i32.const 5232 + i32.const 5552 + i32.const 5592 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 56 + call $~lib/util/runtime/allocate local.tee $2 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $1 local.get $2 local.get $1 call $~lib/string/String#substring local.set $1 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/util/runtime/discard local.get $1 ) - (func $~lib/internal/number/dtoa_stream (; 125 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 137 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8043,13 +7151,13 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 48 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return end @@ -8065,13 +7173,13 @@ if local.get $0 i32.const 78 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 97 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 78 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return else @@ -8083,18 +7191,14 @@ i32.add local.set $1 local.get $0 - i32.const 4 - i32.add - i32.const 5208 - i32.const 5232 + i32.const 5552 + i32.const 5592 local.get $3 select - i32.const 4 - i32.add local.get $1 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $1 return end @@ -8102,82 +7206,86 @@ end local.get $0 local.get $2 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join (; 126 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_flt (; 138 ;) (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 $7 i32) - i32.const 6692 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 6688 - i32.load - local.set $4 - i32.const 5168 - i32.load - local.tee $1 - i32.const 0 - i32.ne - local.set $6 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - f64.load offset=8 - call $~lib/internal/number/dtoa + local.get $3 + f64.load + call $~lib/util/number/dtoa return end - local.get $1 + i32.const 5468 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 28 i32.add - local.get $3 + local.get $2 i32.mul i32.const 28 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe - local.set $2 + local.tee $6 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $1 + i32.const 0 + local.set $0 loop $repeat|0 local.get $5 - local.get $3 + local.get $2 i32.lt_s if - local.get $2 + local.get $1 local.get $0 local.get $5 i32.const 3 i32.shl - local.get $4 + local.get $3 i32.add - f64.load offset=8 - call $~lib/internal/number/dtoa_stream + f64.load + call $~lib/util/number/dtoa_stream local.get $0 i32.add local.set $0 - local.get $6 + local.get $4 if - local.get $2 local.get $0 - i32.const 5168 - i32.const 0 + i32.const 1 + i32.shl local.get $1 - call $~lib/internal/string/copyUnsafe + i32.add + i32.const 5480 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 - local.get $1 + local.get $4 i32.add local.set $0 end @@ -8188,97 +7296,98 @@ br $repeat|0 end end - local.get $2 - local.set $1 - local.get $7 - local.get $2 + local.get $6 + local.get $1 local.get $0 - local.get $3 + local.get $2 i32.const 3 i32.shl - local.get $4 + local.get $3 i32.add - f64.load offset=8 - call $~lib/internal/number/dtoa_stream + f64.load + call $~lib/util/number/dtoa_stream local.get $0 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.set $1 - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + local.set $0 + local.get $1 + call $~lib/util/runtime/discard + local.get $0 + return end local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/array/Array<~lib/string/String>#join (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 139 ;) (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 $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $4 + local.tee $5 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.tee $7 - i32.const 0 - i32.ne - local.set $8 - local.get $4 + i32.load offset=4 + local.set $6 + local.get $5 i32.eqz if - local.get $5 - i32.load offset=8 + local.get $6 + i32.load return end + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $7 i32.const 0 local.set $0 - local.get $4 + local.get $5 i32.const 1 i32.add local.set $3 loop $repeat|0 - block $break|0 - local.get $0 - local.get $3 - i32.ge_s - br_if $break|0 - local.get $5 + local.get $0 + local.get $3 + i32.lt_s + if local.get $0 i32.const 2 i32.shl + local.get $6 i32.add - i32.load offset=8 i32.load - local.get $2 - i32.add - local.set $2 + local.tee $4 + if + local.get $4 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.get $2 + i32.add + local.set $2 + end local.get $0 i32.const 1 i32.add @@ -8288,50 +7397,63 @@ end i32.const 0 local.set $0 - local.get $4 + local.get $5 local.get $7 i32.mul local.get $2 i32.add - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $2 i32.const 0 local.set $3 loop $repeat|1 - block $break|1 - local.get $3 - local.get $4 - i32.ge_s - br_if $break|1 - local.get $5 + local.get $3 + local.get $5 + i32.lt_s + if local.get $3 i32.const 2 i32.shl + local.get $6 i32.add - i32.load offset=8 - local.tee $6 + i32.load + local.tee $4 if - local.get $2 local.get $0 - local.get $6 - i32.const 0 - local.get $6 - i32.load - local.tee $6 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + local.get $2 + i32.add + local.get $4 + local.get $4 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 - local.get $6 + local.get $4 i32.add local.set $0 end - local.get $8 + local.get $7 if - local.get $2 local.get $0 + i32.const 1 + i32.shl + local.get $2 + i32.add local.get $1 - i32.const 0 local.get $7 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $7 i32.add @@ -8345,154 +7467,183 @@ end end local.get $5 - local.get $4 i32.const 2 i32.shl + local.get $6 i32.add - i32.load offset=8 + i32.load local.tee $1 if - local.get $2 local.get $0 + i32.const 1 + i32.shl + local.get $2 + i32.add local.get $1 - i32.const 0 local.get $1 - i32.load - call $~lib/internal/string/copyUnsafe + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + call $~lib/memory/memory.copy end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/array/Array#join (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#join_str + ) + (func $std/array/Ref#constructor (; 141 ;) (type $FUNCSIG$i) (result i32) + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 32 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join_ref (; 142 ;) (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 $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end local.get $0 - i32.load + i32.load offset=4 local.set $5 - i32.const 4216 - i32.load - local.tee $4 - i32.const 0 - i32.ne - local.set $6 - local.get $3 + local.get $2 i32.eqz if - i32.const 6872 + i32.const 6928 return end - local.get $4 + i32.const 4524 + i32.load + i32.const 1 + i32.shr_u + local.tee $3 i32.const 15 i32.add - local.get $3 + local.get $2 i32.mul i32.const 15 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $1 + i32.const 0 local.set $0 loop $repeat|0 + local.get $4 local.get $2 - local.get $3 i32.lt_s if - local.get $2 + local.get $4 i32.const 2 i32.shl local.get $5 i32.add - i32.load offset=8 + i32.load if local.get $0 + i32.const 1 + i32.shl local.get $1 - i32.const 6872 - i32.const 0 - i32.const 15 - call $~lib/internal/string/copyUnsafe - local.get $1 + i32.add + i32.const 6928 + i32.const 30 + call $~lib/memory/memory.copy + local.get $0 i32.const 15 i32.add - local.set $1 + local.set $0 end - local.get $6 + local.get $3 if local.get $0 + i32.const 1 + i32.shl local.get $1 - i32.const 4216 - i32.const 0 - local.get $4 - call $~lib/internal/string/copyUnsafe - local.get $1 - local.get $4 i32.add - local.set $1 + i32.const 4536 + local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + local.get $3 + i32.add + local.set $0 end - local.get $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $repeat|0 end end - local.get $0 - local.set $2 block (result i32) - local.get $3 + local.get $2 i32.const 2 i32.shl local.get $5 i32.add - i32.load offset=8 + i32.load if local.get $0 + i32.const 1 + i32.shl local.get $1 - i32.const 6872 - i32.const 0 - i32.const 15 - call $~lib/internal/string/copyUnsafe - local.get $1 + i32.add + i32.const 6928 + i32.const 30 + call $~lib/memory/memory.copy + local.get $0 i32.const 15 i32.add - local.set $1 + local.set $0 end - local.get $7 - local.get $1 + local.get $6 + local.get $0 i32.gt_s end if - local.get $0 local.get $1 + local.get $0 call $~lib/string/String#substring - local.set $2 + local.set $0 + local.get $1 + call $~lib/util/runtime/discard local.get $0 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + return end - local.get $2 + local.get $1 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#toString (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array#join ) - (func $~lib/internal/number/itoa_stream (; 129 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 144 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -8507,7 +7658,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -8531,94 +7682,98 @@ i32.const 24 i32.shr_s local.tee $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 local.get $0 local.get $3 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 ) - (func $~lib/array/Array#join (; 130 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 145 ;) (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 $7 i32) - i32.const 7068 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 7064 - i32.load - local.set $4 - i32.const 4216 - i32.load - local.tee $1 - i32.const 0 - i32.ne - local.set $6 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load8_s offset=8 - call $~lib/internal/number/itoa32 + local.get $3 + i32.load8_s + call $~lib/util/number/itoa32 return end - local.get $1 + i32.const 4524 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 11 i32.add - local.get $3 + local.get $2 i32.mul i32.const 11 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe - local.set $2 + local.tee $6 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $1 + i32.const 0 + local.set $0 loop $repeat|0 local.get $5 - local.get $3 + local.get $2 i32.lt_s if - local.get $2 + local.get $1 local.get $0 - local.get $4 + local.get $3 local.get $5 i32.add - i32.load8_s offset=8 - call $~lib/internal/number/itoa_stream + i32.load8_s + call $~lib/util/number/itoa_stream local.get $0 i32.add local.set $0 - local.get $6 + local.get $4 if - local.get $2 local.get $0 - i32.const 4216 - i32.const 0 + i32.const 1 + i32.shl local.get $1 - call $~lib/internal/string/copyUnsafe + i32.add + i32.const 4536 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 - local.get $1 + local.get $4 i32.add local.set $0 end @@ -8629,39 +7784,33 @@ br $repeat|0 end end - local.get $2 - local.set $1 - local.get $7 - local.get $2 + local.get $6 + local.get $1 local.get $0 + local.get $2 local.get $3 - local.get $4 i32.add - i32.load8_s offset=8 - call $~lib/internal/number/itoa_stream + i32.load8_s + call $~lib/util/number/itoa_stream local.get $0 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.set $1 - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + local.set $0 + local.get $1 + call $~lib/util/runtime/discard + local.get $0 + return end local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa_stream (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -8675,7 +7824,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -8683,88 +7832,92 @@ i32.const 65535 i32.and local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $0 local.get $2 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join (; 132 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 147 ;) (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 $7 i32) - i32.const 7132 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 7128 - i32.load - local.set $4 - i32.const 4216 - i32.load - local.tee $1 - i32.const 0 - i32.ne - local.set $6 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load16_u offset=8 - call $~lib/internal/number/utoa32 + local.get $3 + i32.load16_u + call $~lib/util/number/utoa32 return end - local.get $1 + i32.const 4524 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 10 i32.add - local.get $3 + local.get $2 i32.mul i32.const 10 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe - local.set $2 + local.tee $6 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $1 + i32.const 0 + local.set $0 loop $repeat|0 local.get $5 - local.get $3 + local.get $2 i32.lt_s if - local.get $2 + local.get $1 local.get $0 local.get $5 i32.const 1 i32.shl - local.get $4 + local.get $3 i32.add - i32.load16_u offset=8 - call $~lib/internal/number/itoa_stream + i32.load16_u + call $~lib/util/number/itoa_stream local.get $0 i32.add local.set $0 - local.get $6 + local.get $4 if - local.get $2 local.get $0 - i32.const 4216 - i32.const 0 + i32.const 1 + i32.shl local.get $1 - call $~lib/internal/string/copyUnsafe + i32.add + i32.const 4536 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 - local.get $1 + local.get $4 i32.add local.set $0 end @@ -8775,41 +7928,35 @@ br $repeat|0 end end - local.get $2 - local.set $1 - local.get $7 - local.get $2 + local.get $6 + local.get $1 local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.shl - local.get $4 + local.get $3 i32.add - i32.load16_u offset=8 - call $~lib/internal/number/itoa_stream + i32.load16_u + call $~lib/util/number/itoa_stream local.get $0 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.set $1 - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + local.set $0 + local.get $1 + call $~lib/util/runtime/discard + local.get $0 + return end local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/decimalCount64 (; 133 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 148 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -8863,12 +8010,12 @@ end end ) - (func $~lib/internal/number/utoa64_lut (; 134 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 149 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 4832 + i32.const 5100 i32.load local.set $3 loop $continue|0 @@ -8904,7 +8051,6 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 10000 i32.rem_u @@ -8913,20 +8059,21 @@ i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store local.get $2 i32.const 4 i32.sub @@ -8935,22 +8082,22 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $6 i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $5 i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -8958,16 +8105,16 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 135 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 150 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i64.eqz if - i32.const 4312 + i32.const 4656 return end local.get $0 @@ -8977,26 +8124,32 @@ local.get $0 i32.wrap_i64 local.tee $1 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $2 local.get $1 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa_stream (; 136 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 151 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) local.get $1 i32.const 1 @@ -9009,7 +8162,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9020,96 +8173,100 @@ local.get $2 i32.wrap_i64 local.tee $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $0 local.get $3 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $1 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $1 ) - (func $~lib/array/Array#join (; 137 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 152 ;) (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 $7 i32) - i32.const 7236 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 7232 - i32.load - local.set $4 - i32.const 4216 - i32.load - local.tee $1 - i32.const 0 - i32.ne - local.set $6 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i64.load offset=8 - call $~lib/internal/number/utoa64 + local.get $3 + i64.load + call $~lib/util/number/utoa64 return end - local.get $1 + i32.const 4524 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 20 i32.add - local.get $3 + local.get $2 i32.mul i32.const 20 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe - local.set $2 + local.tee $6 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $1 + i32.const 0 + local.set $0 loop $repeat|0 local.get $5 - local.get $3 + local.get $2 i32.lt_s if - local.get $2 + local.get $1 local.get $0 local.get $5 i32.const 3 i32.shl - local.get $4 + local.get $3 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $0 i32.add local.set $0 - local.get $6 + local.get $4 if - local.get $2 local.get $0 - i32.const 4216 - i32.const 0 + i32.const 1 + i32.shl local.get $1 - call $~lib/internal/string/copyUnsafe + i32.add + i32.const 4536 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 - local.get $1 + local.get $4 i32.add local.set $0 end @@ -9120,41 +8277,35 @@ br $repeat|0 end end - local.get $2 - local.set $1 - local.get $7 - local.get $2 + local.get $6 + local.get $1 local.get $0 - local.get $3 + local.get $2 i32.const 3 i32.shl - local.get $4 + local.get $3 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $0 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.set $1 - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + local.set $0 + local.get $1 + call $~lib/util/runtime/discard + local.get $0 + return end local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa64 (; 138 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 153 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -9162,7 +8313,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 4656 return end block (result i32) @@ -9184,36 +8335,42 @@ local.get $0 i32.wrap_i64 local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $4 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $3 local.get $2 local.get $4 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.tee $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $3 local.get $0 local.get $2 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $1 if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa_stream (; 139 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 154 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) local.get $1 @@ -9227,7 +8384,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9250,106 +8407,110 @@ local.get $2 i32.wrap_i64 local.tee $4 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $3 local.get $0 local.get $4 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 local.get $2 local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.tee $3 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $1 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 140 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/array/Array#join_int (; 155 ;) (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 $7 i32) - i32.const 7436 - i32.load + local.get $0 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 7432 - i32.load - local.set $4 - i32.const 4216 - i32.load - local.tee $1 - i32.const 0 - i32.ne - local.set $6 - local.get $3 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i64.load offset=8 - call $~lib/internal/number/itoa64 + local.get $3 + i64.load + call $~lib/util/number/itoa64 return end - local.get $1 + i32.const 4524 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 21 i32.add - local.get $3 + local.get $2 i32.mul i32.const 21 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe - local.set $2 + local.tee $6 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $1 + i32.const 0 + local.set $0 loop $repeat|0 local.get $5 - local.get $3 + local.get $2 i32.lt_s if - local.get $2 + local.get $1 local.get $0 local.get $5 i32.const 3 i32.shl - local.get $4 + local.get $3 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $0 i32.add local.set $0 - local.get $6 + local.get $4 if - local.get $2 local.get $0 - i32.const 4216 - i32.const 0 + i32.const 1 + i32.shl local.get $1 - call $~lib/internal/string/copyUnsafe + i32.add + i32.const 4536 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 - local.get $1 + local.get $4 i32.add local.set $0 end @@ -9360,79 +8521,78 @@ br $repeat|0 end end - local.get $2 - local.set $1 - local.get $7 - local.get $2 + local.get $6 + local.get $1 local.get $0 - local.get $3 + local.get $2 i32.const 3 i32.shl - local.get $4 + local.get $3 i32.add - i64.load offset=8 - call $~lib/internal/number/itoa_stream + i64.load + call $~lib/util/number/itoa_stream local.get $0 i32.add local.tee $0 i32.gt_s if - local.get $2 + local.get $1 local.get $0 call $~lib/string/String#substring - local.set $1 - local.get $2 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + local.set $0 + local.get $1 + call $~lib/util/runtime/discard + local.get $0 + return end local.get $1 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 156 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array<~lib/string/String>#join ) - (func $~lib/array/Array<~lib/array/Array>#join (; 141 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 157 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 + i32.const 4208 local.set $1 - local.get $0 + i32.const 4524 i32.load - local.set $3 - i32.const 4216 - i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if local.get $3 - i32.load offset=8 + i32.load local.tee $0 if (result i32) local.get $0 - i32.const 4216 + i32.const 4536 call $~lib/array/Array#join else - i32.const 3904 + i32.const 4208 end return end @@ -9448,12 +8608,12 @@ i32.shl local.get $3 i32.add - i32.load offset=8 + i32.load local.tee $5 if local.get $1 local.get $5 - i32.const 4216 + i32.const 4536 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $1 @@ -9461,7 +8621,7 @@ local.get $4 if local.get $1 - i32.const 4216 + i32.const 4536 call $~lib/string/String.__concat local.set $1 end @@ -9477,19 +8637,19 @@ i32.shl local.get $3 i32.add - i32.load offset=8 + i32.load local.tee $0 - if + if (result i32) local.get $1 local.get $0 - i32.const 4216 + i32.const 4536 call $~lib/array/Array#join call $~lib/string/String.__concat - local.set $1 + else + local.get $1 end - local.get $1 ) - (func $~lib/internal/number/itoa_stream (; 142 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 i32.const 1 i32.shl @@ -9503,7 +8663,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -9511,87 +8671,92 @@ i32.const 255 i32.and local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $0 local.get $2 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 ) - (func $~lib/array/Array#join (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#join_int (; 159 ;) (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 $7 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub - local.tee $3 + local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end local.get $0 - i32.load - local.set $4 - i32.const 4216 - i32.load - local.tee $2 - i32.const 0 - i32.ne - local.set $6 - local.get $3 + i32.load offset=4 + local.set $3 + local.get $2 i32.eqz if - local.get $4 - i32.load8_u offset=8 - call $~lib/internal/number/utoa32 + local.get $3 + i32.load8_u + call $~lib/util/number/utoa32 return end - local.get $2 + i32.const 4524 + i32.load + i32.const 1 + i32.shr_u + local.tee $4 i32.const 10 i32.add - local.get $3 + local.get $2 i32.mul i32.const 10 i32.add - local.tee $7 - call $~lib/internal/string/allocateUnsafe + local.tee $6 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $1 + i32.const 0 local.set $0 loop $repeat|0 local.get $5 - local.get $3 + local.get $2 i32.lt_s if - local.get $0 local.get $1 - local.get $4 + local.get $0 + local.get $3 local.get $5 i32.add - i32.load8_u offset=8 - call $~lib/internal/number/itoa_stream - local.get $1 + i32.load8_u + call $~lib/util/number/itoa_stream + local.get $0 i32.add - local.set $1 - local.get $6 + local.set $0 + local.get $4 if local.get $0 + i32.const 1 + i32.shl local.get $1 - i32.const 4216 - i32.const 0 - local.get $2 - call $~lib/internal/string/copyUnsafe - local.get $1 - local.get $2 i32.add - local.set $1 + i32.const 4536 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $0 + local.get $4 + i32.add + local.set $0 end local.get $5 i32.const 1 @@ -9600,76 +8765,70 @@ br $repeat|0 end end - local.get $0 - local.set $2 - local.get $7 - local.get $0 + local.get $6 local.get $1 + local.get $0 + local.get $2 local.get $3 - local.get $4 i32.add - i32.load8_u offset=8 - call $~lib/internal/number/itoa_stream - local.get $1 + i32.load8_u + call $~lib/util/number/itoa_stream + local.get $0 i32.add - local.tee $1 + local.tee $0 i32.gt_s if - local.get $0 local.get $1 + local.get $0 call $~lib/string/String#substring - local.set $2 + local.set $0 + local.get $1 + call $~lib/util/runtime/discard local.get $0 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + return end - local.get $2 + local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/array/Array<~lib/array/Array>#join (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 160 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 + i32.const 4208 local.set $1 - local.get $0 - i32.load - local.set $3 - i32.const 4216 + i32.const 4524 i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if local.get $3 - i32.load offset=8 + i32.load local.tee $0 if (result i32) local.get $0 - call $~lib/array/Array#join + call $~lib/array/Array#join_int else - i32.const 3904 + i32.const 4208 end return end @@ -9685,19 +8844,19 @@ i32.shl local.get $3 i32.add - i32.load offset=8 + i32.load local.tee $5 if local.get $1 local.get $5 - call $~lib/array/Array#join + call $~lib/array/Array#join_int call $~lib/string/String.__concat local.set $1 end local.get $4 if local.get $1 - i32.const 4216 + i32.const 4536 call $~lib/string/String.__concat local.set $1 end @@ -9713,56 +8872,56 @@ i32.shl local.get $3 i32.add - i32.load offset=8 + i32.load local.tee $0 - if + if (result i32) local.get $1 local.get $0 - call $~lib/array/Array#join + call $~lib/array/Array#join_int call $~lib/string/String.__concat - local.set $1 + else + local.get $1 end - local.get $1 ) - (func $~lib/array/Array<~lib/array/Array>#join (; 145 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 161 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 + i32.const 4208 local.set $1 - local.get $0 + i32.const 4524 i32.load - local.set $3 - i32.const 4216 - i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if local.get $3 - i32.load offset=8 + i32.load local.tee $0 if (result i32) local.get $0 - i32.const 4216 + i32.const 4536 call $~lib/array/Array#join else - i32.const 3904 + i32.const 4208 end return end @@ -9778,12 +8937,12 @@ i32.shl local.get $3 i32.add - i32.load offset=8 + i32.load local.tee $5 if local.get $1 local.get $5 - i32.const 4216 + i32.const 4536 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $1 @@ -9791,7 +8950,7 @@ local.get $4 if local.get $1 - i32.const 4216 + i32.const 4536 call $~lib/string/String.__concat local.set $1 end @@ -9807,56 +8966,56 @@ i32.shl local.get $3 i32.add - i32.load offset=8 + i32.load local.tee $0 - if + if (result i32) local.get $1 local.get $0 - i32.const 4216 + i32.const 4536 call $~lib/array/Array#join call $~lib/string/String.__concat - local.set $1 + else + local.get $1 end - local.get $1 ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.tee $2 i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 + i32.const 4208 local.set $1 - local.get $0 - i32.load - local.set $3 - i32.const 4216 + i32.const 4524 i32.load - i32.const 0 - i32.ne + i32.const 1 + i32.shr_u local.set $4 + local.get $0 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if local.get $3 - i32.load offset=8 + i32.load local.tee $0 if (result i32) local.get $0 - call $~lib/array/Array<~lib/array/Array>#join + call $~lib/array/Array<~lib/array/Array>#join_arr else - i32.const 3904 + i32.const 4208 end return end @@ -9872,19 +9031,19 @@ i32.shl local.get $3 i32.add - i32.load offset=8 + i32.load local.tee $5 if local.get $1 local.get $5 - call $~lib/array/Array<~lib/array/Array>#join + call $~lib/array/Array<~lib/array/Array>#join_arr call $~lib/string/String.__concat local.set $1 end local.get $4 if local.get $1 - i32.const 4216 + i32.const 4536 call $~lib/string/String.__concat local.set $1 end @@ -9900,34 +9059,34 @@ i32.shl local.get $3 i32.add - i32.load offset=8 + i32.load local.tee $0 - if + if (result i32) local.get $1 local.get $0 - call $~lib/array/Array<~lib/array/Array>#join + call $~lib/array/Array<~lib/array/Array>#join_arr call $~lib/string/String.__concat - local.set $1 + else + local.get $1 end - local.get $1 ) - (func $start:std/array (; 147 ;) (type $FUNCSIG$v) + (func $start:std/array (; 163 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 7912 + (local $2 i32) + i32.const 8400 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr global.get $std/array/Null if i32.const 0 - i32.const 120 - i32.const 37 + i32.const 160 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -9937,18 +9096,24 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 38 + i32.const 160 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register drop i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + i32.const 1 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor drop global.get $std/array/arr8 i32.const 1 @@ -9956,33 +9121,40 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr8 + i32.const 5 + i32.const 0 + i32.const 20 i32.const 256 + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 49 + i32.const 160 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/arr8 i32.const 0 i32.const 0 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 280 + i32.const 5 + i32.const 0 + i32.const 20 + i32.const 328 + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 52 + i32.const 160 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -9991,33 +9163,40 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 304 + i32.const 5 + i32.const 0 + i32.const 20 + i32.const 352 + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 55 + i32.const 160 + i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/array/arr8 i32.const 2 i32.const -2 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 328 + i32.const 5 + i32.const 0 + i32.const 20 + i32.const 376 + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 58 + i32.const 160 + i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -10026,15 +9205,19 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr8 - i32.const 352 + i32.const 5 + i32.const 0 + i32.const 20 + i32.const 400 + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 61 + i32.const 160 + i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -10043,35 +9226,42 @@ i32.const 3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 432 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 496 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 66 + i32.const 160 + i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/arr32 i32.const 0 i32.const 0 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 472 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 536 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 69 + i32.const 160 + i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -10080,35 +9270,42 @@ i32.const -3 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 512 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 576 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 72 + i32.const 160 + i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/array/arr32 i32.const 2 i32.const -2 - call $~lib/array/Array#fill|trampoline + i32.const 2147483647 + call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 552 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 616 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 75 + i32.const 160 + i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -10117,93 +9314,90 @@ i32.const 0 call $~lib/array/Array#fill global.get $std/array/arr32 - i32.const 592 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 656 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 78 + i32.const 160 + i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 82 + i32.const 160 + i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s if i32.const 0 - i32.const 120 - i32.const 83 + i32.const 160 + i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 42 call $~lib/array/Array#push - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 42 i32.ne if i32.const 0 - i32.const 120 - i32.const 87 + i32.const 160 + i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 88 + i32.const 160 + i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - 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 120 - i32.const 89 + i32.const 160 + i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10214,278 +9408,213 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 93 + i32.const 160 + i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 94 + i32.const 160 + i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - 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 120 - i32.const 95 + i32.const 160 + i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 99 + i32.const 160 + i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - 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 120 - i32.const 100 + i32.const 160 + i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 101 + i32.const 160 + i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 44 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 105 + i32.const 160 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - 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 120 - i32.const 106 + i32.const 160 + i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 107 + i32.const 160 + i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 108 + i32.const 160 + i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 45 call $~lib/array/Array#push global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 112 + i32.const 160 + i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 113 + i32.const 160 + i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 114 + i32.const 160 + i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 115 + i32.const 160 + i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 45 i32.ne if i32.const 0 - i32.const 120 - i32.const 116 + i32.const 160 + i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 call $~lib/array/Array#constructor global.set $std/array/other global.get $std/array/arr @@ -10494,136 +9623,107 @@ global.set $std/array/out global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 123 + i32.const 160 + i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 124 + i32.const 160 + i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 125 + i32.const 160 + i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out - i32.const 608 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 696 + call $~lib/util/runtime/makeArray call $~lib/array/Array#concat drop global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 128 + i32.const 160 + i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/out - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 130 + i32.const 160 + i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/out - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 131 + i32.const 160 + i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 45 i32.ne if i32.const 0 - i32.const 120 - i32.const 132 + i32.const 160 + i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/other @@ -10638,184 +9738,123 @@ global.set $std/array/out global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 139 + i32.const 160 + i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/other - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 140 + i32.const 160 + i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 5 i32.ne if i32.const 0 - i32.const 120 - i32.const 141 + i32.const 160 + i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/out - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 142 + i32.const 160 + i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/out - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 143 + i32.const 160 + i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 45 i32.ne if i32.const 0 - i32.const 120 - i32.const 144 + i32.const 160 + i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 3 global.get $std/array/out - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 3 + call $~lib/array/Array#__get i32.const 46 i32.ne if i32.const 0 - i32.const 120 - i32.const 145 + i32.const 160 + i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 4 global.get $std/array/out - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 16 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 4 + call $~lib/array/Array#__get i32.const 47 i32.ne if i32.const 0 - i32.const 120 - i32.const 146 + i32.const 160 + i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out call $~lib/array/Array#pop drop global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if i32.const 0 - i32.const 120 - i32.const 149 + i32.const 160 + i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -10823,51 +9862,38 @@ call $~lib/array/Array#concat global.set $std/array/out global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 152 + i32.const 160 + i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/out - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 45 i32.ne if i32.const 0 - i32.const 120 - i32.const 153 + i32.const 160 + i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 156 + i32.const 160 + i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source @@ -10875,549 +9901,530 @@ call $~lib/array/Array#concat global.set $std/array/out global.get $std/array/out - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 158 + i32.const 160 + i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 159 + i32.const 160 + i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 664 - global.set $std/array/cwArr + i32.const 5 i32.const 2 - global.set $~lib/argc + i32.const 17 + i32.const 760 + call $~lib/util/runtime/makeArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 704 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 800 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 165 + i32.const 160 + i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 744 - global.set $std/array/cwArr + i32.const 5 i32.const 2 - global.set $~lib/argc + i32.const 17 + i32.const 840 + call $~lib/util/runtime/makeArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 784 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 880 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 167 + i32.const 160 + i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 824 - global.set $std/array/cwArr + i32.const 5 i32.const 2 - global.set $~lib/argc + i32.const 17 + i32.const 920 + call $~lib/util/runtime/makeArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 864 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 960 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 169 + i32.const 160 + i32.const 171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 904 - global.set $std/array/cwArr + i32.const 5 i32.const 2 - global.set $~lib/argc + i32.const 17 + i32.const 1000 + call $~lib/util/runtime/makeArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 2 i32.const 2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 944 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1040 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 171 + i32.const 160 + i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 984 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1080 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1024 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1120 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 173 + i32.const 160 + i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1064 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1160 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1104 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1200 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 175 + i32.const 160 + i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1144 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1240 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1184 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1280 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 177 + i32.const 160 + i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1224 - global.set $std/array/cwArr + i32.const 5 i32.const 2 - global.set $~lib/argc + i32.const 17 + i32.const 1320 + call $~lib/util/runtime/makeArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 - call $~lib/array/Array#copyWithin|trampoline - i32.const 1264 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1360 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 179 + i32.const 160 + i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1304 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1400 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1344 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1440 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 181 + i32.const 160 + i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1384 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1480 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - i32.const 1424 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1520 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 183 + i32.const 160 + i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1464 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1560 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1504 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1600 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 185 + i32.const 160 + i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1544 - global.set $std/array/cwArr + i32.const 5 i32.const 2 - global.set $~lib/argc + i32.const 17 + i32.const 1640 + call $~lib/util/runtime/makeArray + global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 - call $~lib/array/Array#copyWithin|trampoline - i32.const 1584 + i32.const 2147483647 + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1680 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 187 + i32.const 160 + i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 42 call $~lib/array/Array#unshift global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if i32.const 0 - i32.const 120 - i32.const 193 + i32.const 160 + i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - 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 120 - i32.const 194 + i32.const 160 + i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 42 i32.ne if i32.const 0 - i32.const 120 - i32.const 195 + i32.const 160 + i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 196 + i32.const 160 + i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 197 + i32.const 160 + i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 3 + call $~lib/array/Array#__get i32.const 45 i32.ne if i32.const 0 - i32.const 120 - i32.const 198 + i32.const 160 + i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 41 call $~lib/array/Array#unshift global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 5 i32.ne if i32.const 0 - i32.const 120 - i32.const 202 + i32.const 160 + i32.const 204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 i32.ne if i32.const 0 - i32.const 120 - i32.const 203 + i32.const 160 + i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 41 i32.ne if i32.const 0 - i32.const 120 - i32.const 204 + i32.const 160 + i32.const 206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 42 i32.ne if i32.const 0 - i32.const 120 - i32.const 205 + i32.const 160 + i32.const 207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 206 + i32.const 160 + i32.const 208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 3 + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 207 + i32.const 160 + i32.const 209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 4 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 16 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 4 + call $~lib/array/Array#__get i32.const 45 i32.ne if i32.const 0 - i32.const 120 - i32.const 208 + i32.const 160 + i32.const 210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11428,139 +10435,91 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 214 + i32.const 160 + i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if i32.const 0 - i32.const 120 - i32.const 215 + i32.const 160 + i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 i32.ne if i32.const 0 - i32.const 120 - i32.const 216 + i32.const 160 + i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 42 i32.ne if i32.const 0 - i32.const 120 - i32.const 217 + i32.const 160 + i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 218 + i32.const 160 + i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 219 + i32.const 160 + i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 3 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 3 + call $~lib/array/Array#__get i32.const 45 i32.ne if i32.const 0 - i32.const 120 - i32.const 220 + i32.const 160 + i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11571,218 +10530,148 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 224 + i32.const 160 + i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 225 + i32.const 160 + i32.const 227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 i32.ne if i32.const 0 - i32.const 120 - i32.const 226 + i32.const 160 + i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 42 i32.ne if i32.const 0 - i32.const 120 - i32.const 227 + i32.const 160 + i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 228 + i32.const 160 + i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 229 + i32.const 160 + i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr call $~lib/array/Array#reverse global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 3 i32.ne if i32.const 0 - i32.const 120 - i32.const 235 + i32.const 160 + i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 i32.ne if i32.const 0 - i32.const 120 - i32.const 236 + i32.const 160 + i32.const 238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 237 + i32.const 160 + i32.const 239 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 43 i32.ne if i32.const 0 - i32.const 120 - i32.const 238 + i32.const 160 + i32.const 240 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 global.get $std/array/arr - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 42 i32.ne if i32.const 0 - i32.const 120 - i32.const 239 + i32.const 160 + i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11799,10 +10688,10 @@ global.get $std/array/i if i32.const 0 - i32.const 120 - i32.const 248 + i32.const 160 + i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11815,10 +10704,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 252 + i32.const 160 + i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11831,10 +10720,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 256 + i32.const 160 + i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11847,10 +10736,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 260 + i32.const 160 + i32.const 262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11863,10 +10752,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 264 + i32.const 160 + i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11879,10 +10768,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 268 + i32.const 160 + i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11895,10 +10784,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 272 + i32.const 160 + i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11911,10 +10800,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 276 + i32.const 160 + i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11927,10 +10816,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 280 + i32.const 160 + i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -11943,206 +10832,166 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 284 + i32.const 160 + i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 44 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 290 + i32.const 160 + i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 42 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 294 + i32.const 160 + i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 45 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes if i32.const 0 - i32.const 120 - i32.const 298 + i32.const 160 + i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 i32.const 100 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes if i32.const 0 - i32.const 120 - i32.const 302 + i32.const 160 + i32.const 304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 i32.const -100 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 306 + i32.const 160 + i32.const 308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 i32.const -2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 310 + i32.const 160 + i32.const 312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 i32.const -4 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 314 + i32.const 160 + i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 i32.const 0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 318 + i32.const 160 + i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 i32.const 1 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 322 + i32.const 160 + i32.const 324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 i32.const 2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 326 + i32.const 160 + i32.const 328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12151,485 +11000,611 @@ call $~lib/array/Array#splice drop global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if i32.const 0 - i32.const 120 - i32.const 330 + i32.const 160 + i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.load - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.shr_s i32.const 5 i32.ne if i32.const 0 - i32.const 120 - i32.const 331 + i32.const 160 + i32.const 333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 44 i32.ne if i32.const 0 - i32.const 120 - i32.const 332 + i32.const 160 + i32.const 334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 global.get $std/array/arr - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 42 i32.ne if i32.const 0 - i32.const 120 - i32.const 333 + i32.const 160 + i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const 0 - call $~lib/array/Array#splice|trampoline - i32.const 1664 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1792 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 338 + i32.const 160 + i32.const 340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 1680 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 1832 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 339 + i32.const 160 + i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1720 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1848 + call $~lib/util/runtime/makeArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const 2 - call $~lib/array/Array#splice|trampoline - i32.const 1760 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 3 + i32.const 2 + i32.const 17 + i32.const 1888 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 342 + i32.const 160 + i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 1784 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 1920 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 343 + i32.const 160 + i32.const 345 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1824 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1944 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice - i32.const 1848 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 1984 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 346 + i32.const 160 + i32.const 348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 1888 + i32.const 3 + i32.const 2 + i32.const 17 + i32.const 2008 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 347 + i32.const 160 + i32.const 349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1928 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2040 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice - i32.const 1952 + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 2080 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 350 + i32.const 160 + i32.const 352 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 1992 + i32.const 4 + i32.const 2 + i32.const 17 + i32.const 2104 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 351 + i32.const 160 + i32.const 353 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2032 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2136 + call $~lib/util/runtime/makeArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const -1 - call $~lib/array/Array#splice|trampoline - i32.const 2056 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 2176 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 354 + i32.const 160 + i32.const 356 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2096 + i32.const 4 + i32.const 2 + i32.const 17 + i32.const 2200 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 355 + i32.const 160 + i32.const 357 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2136 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2232 + call $~lib/util/runtime/makeArray global.set $std/array/sarr - i32.const 1 - global.set $~lib/argc global.get $std/array/sarr i32.const -2 - call $~lib/array/Array#splice|trampoline - i32.const 2160 + i32.const 2147483647 + call $~lib/array/Array#splice + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 2272 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 358 + i32.const 160 + i32.const 360 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2200 + i32.const 3 + i32.const 2 + i32.const 17 + i32.const 2296 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 359 + i32.const 160 + i32.const 361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2240 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2328 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice - i32.const 2264 + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 2368 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 362 + i32.const 160 + i32.const 364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2304 + i32.const 4 + i32.const 2 + i32.const 17 + i32.const 2392 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 363 + i32.const 160 + i32.const 365 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2344 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2424 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice - i32.const 2368 + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 2464 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 366 + i32.const 160 + i32.const 368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2408 + i32.const 4 + i32.const 2 + i32.const 17 + i32.const 2488 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 367 + i32.const 160 + i32.const 369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2448 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2520 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice - i32.const 2464 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2560 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 370 + i32.const 160 + i32.const 372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2504 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2576 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 371 + i32.const 160 + i32.const 373 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2544 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2616 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice - i32.const 2560 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2656 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 374 + i32.const 160 + i32.const 376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2600 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2672 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 375 + i32.const 160 + i32.const 377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2640 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2712 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice - i32.const 2656 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2752 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 378 + i32.const 160 + i32.const 380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2696 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2768 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 379 + i32.const 160 + i32.const 381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2736 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2808 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice - i32.const 2752 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2848 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 382 + i32.const 160 + i32.const 384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2792 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2864 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 383 + i32.const 160 + i32.const 385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2832 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2904 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice - i32.const 2848 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2944 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 386 + i32.const 160 + i32.const 388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2888 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2960 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 387 + i32.const 160 + i32.const 389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12655,10 +11630,10 @@ global.get $std/array/i if i32.const 0 - i32.const 120 - i32.const 397 + i32.const 160 + i32.const 399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12670,10 +11645,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 400 + i32.const 160 + i32.const 402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12685,10 +11660,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 403 + i32.const 160 + i32.const 405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12700,22 +11675,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 411 + i32.const 160 + i32.const 413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 412 + i32.const 160 + i32.const 414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12727,10 +11702,10 @@ i32.eq if i32.const 0 - i32.const 120 - i32.const 414 + i32.const 160 + i32.const 416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12754,22 +11729,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 427 + i32.const 160 + i32.const 429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 428 + i32.const 160 + i32.const 430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12787,10 +11762,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 436 + i32.const 160 + i32.const 438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12800,10 +11775,10 @@ global.get $std/array/every if i32.const 0 - i32.const 120 - i32.const 439 + i32.const 160 + i32.const 441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12815,22 +11790,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 447 + i32.const 160 + i32.const 449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 448 + i32.const 160 + i32.const 450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12840,10 +11815,10 @@ global.get $std/array/every if i32.const 0 - i32.const 120 - i32.const 450 + i32.const 160 + i32.const 452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12867,22 +11842,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 463 + i32.const 160 + i32.const 465 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 464 + i32.const 160 + i32.const 466 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12900,10 +11875,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 472 + i32.const 160 + i32.const 474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12913,10 +11888,10 @@ global.get $std/array/some if i32.const 0 - i32.const 120 - i32.const 475 + i32.const 160 + i32.const 477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12926,22 +11901,22 @@ global.get $std/array/some if i32.const 0 - i32.const 120 - i32.const 483 + i32.const 160 + i32.const 485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 484 + i32.const 160 + i32.const 486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12953,10 +11928,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 486 + i32.const 160 + i32.const 488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -12978,22 +11953,22 @@ global.get $std/array/some if i32.const 0 - i32.const 120 - i32.const 499 + i32.const 160 + i32.const 501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 500 + i32.const 160 + i32.const 502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13012,10 +11987,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 509 + i32.const 160 + i32.const 511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13028,22 +12003,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 518 + i32.const 160 + i32.const 520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 519 + i32.const 160 + i32.const 521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13056,10 +12031,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 522 + i32.const 160 + i32.const 524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13084,22 +12059,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 536 + i32.const 160 + i32.const 538 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 537 + i32.const 160 + i32.const 539 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13112,29 +12087,29 @@ i32.const 21 call $~lib/array/Array#forEach global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 100 i32.ne if i32.const 0 - i32.const 120 - i32.const 562 + i32.const 160 + i32.const 564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end loop $repeat|0 - local.get $1 + local.get $0 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end @@ -13154,53 +12129,31 @@ call $~lib/array/Array#map global.set $std/array/newArr global.get $std/array/newArr - i32.load offset=4 + i32.load offset=12 i32.const 4 i32.ne if i32.const 0 - i32.const 120 - i32.const 573 + i32.const 160 + i32.const 575 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 global.get $std/array/newArr - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $1 - f32.load offset=8 - else - unreachable - end i32.const 0 + call $~lib/array/Array#__get global.get $std/array/arr - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get f32.convert_i32_s f32.ne if i32.const 0 - i32.const 120 - i32.const 574 + i32.const 160 + i32.const 576 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13213,22 +12166,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 583 + i32.const 160 + i32.const 585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 584 + i32.const 160 + i32.const 586 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13241,10 +12194,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 591 + i32.const 160 + i32.const 593 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13269,22 +12222,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 606 + i32.const 160 + i32.const 608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 607 + i32.const 160 + i32.const 609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13298,15 +12251,15 @@ call $~lib/array/Array#filter global.set $std/array/filteredArr global.get $std/array/filteredArr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 615 + i32.const 160 + i32.const 617 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13320,22 +12273,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 624 + i32.const 160 + i32.const 626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 625 + i32.const 160 + i32.const 627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -13349,10 +12302,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 632 + i32.const 160 + i32.const 634 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13378,22 +12331,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 647 + i32.const 160 + i32.const 649 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 648 + i32.const 160 + i32.const 650 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13412,10 +12365,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 656 + i32.const 160 + i32.const 658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13428,10 +12381,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 660 + i32.const 160 + i32.const 662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13446,10 +12399,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 663 + i32.const 160 + i32.const 665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13462,10 +12415,10 @@ global.get $std/array/boolVal if i32.const 0 - i32.const 120 - i32.const 666 + i32.const 160 + i32.const 668 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13478,22 +12431,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 674 + i32.const 160 + i32.const 676 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 675 + i32.const 160 + i32.const 677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13506,10 +12459,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 677 + i32.const 160 + i32.const 679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13534,22 +12487,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 690 + i32.const 160 + i32.const 692 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 691 + i32.const 160 + i32.const 693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13568,10 +12521,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 699 + i32.const 160 + i32.const 701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13584,10 +12537,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 703 + i32.const 160 + i32.const 705 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13602,10 +12555,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 706 + i32.const 160 + i32.const 708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13618,10 +12571,10 @@ global.get $std/array/boolVal if i32.const 0 - i32.const 120 - i32.const 709 + i32.const 160 + i32.const 711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13634,22 +12587,22 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 717 + i32.const 160 + i32.const 719 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 718 + i32.const 160 + i32.const 720 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13662,10 +12615,10 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 720 + i32.const 160 + i32.const 722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13690,20 +12643,20 @@ i32.ne if i32.const 0 - i32.const 120 - i32.const 733 + i32.const 160 + i32.const 735 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 120 - i32.const 734 + i32.const 160 + i32.const 736 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -13724,9 +12677,9 @@ i32.const 0 global.set $~lib/argc global.get $std/array/f32ArrayTyped - local.set $0 - i32.const 0 local.set $1 + i32.const 0 + local.set $0 block $1of1 block $0of1 block $outOfRange @@ -13736,119 +12689,137 @@ unreachable end i32.const 44 - local.set $1 + local.set $0 end - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#sort global.get $std/array/f32ArrayTyped + i32.const 8 + i32.const 2 + i32.const 22 + i32.const 3312 + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 821 + i32.const 160 + i32.const 824 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 global.set $~lib/argc global.get $std/array/f64ArrayTyped - local.set $0 - i32.const 0 local.set $1 - block $1of155 - block $0of156 - block $outOfRange57 + i32.const 0 + local.set $0 + block $1of143 + block $0of144 + block $outOfRange45 global.get $~lib/argc - br_table $0of156 $1of155 $outOfRange57 + br_table $0of144 $1of143 $outOfRange45 end unreachable end i32.const 45 - local.set $1 + local.set $0 end - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#sort global.get $std/array/f64ArrayTyped + i32.const 8 + i32.const 3 + i32.const 23 + i32.const 3472 + call $~lib/util/runtime/makeArray call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 825 + i32.const 160 + i32.const 828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 global.set $~lib/argc global.get $std/array/i32ArrayTyped - local.set $0 - i32.const 0 local.set $1 - block $1of158 - block $0of159 - block $outOfRange60 + i32.const 0 + local.set $0 + block $1of146 + block $0of147 + block $outOfRange48 global.get $~lib/argc - br_table $0of159 $1of158 $outOfRange60 + br_table $0of147 $1of146 $outOfRange48 end unreachable end i32.const 46 - local.set $1 + local.set $0 end - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#sort drop global.get $std/array/i32ArrayTyped - i32.const 3592 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 3624 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 829 + i32.const 160 + i32.const 832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 global.set $~lib/argc global.get $std/array/u32ArrayTyped - local.set $0 - i32.const 0 local.set $1 - block $1of161 - block $0of162 - block $outOfRange63 + i32.const 0 + local.set $0 + block $1of149 + block $0of150 + block $outOfRange51 global.get $~lib/argc - br_table $0of162 $1of161 $outOfRange63 + br_table $0of150 $1of149 $outOfRange51 end unreachable end i32.const 47 - local.set $1 + local.set $0 end - local.get $0 local.get $1 + local.get $0 call $~lib/array/Array#sort drop global.get $std/array/u32ArrayTyped - i32.const 3672 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 3736 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 833 + i32.const 160 + i32.const 836 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 64 @@ -13871,31 +12842,39 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - i32.const 3840 + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 4064 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 853 + i32.const 160 + i32.const 856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - i32.const 3864 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 4088 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 856 + i32.const 160 + i32.const 859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed4 @@ -13907,10 +12886,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 859 + i32.const 160 + i32.const 862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed64 @@ -13922,10 +12901,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 862 + i32.const 160 + i32.const 865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed128 @@ -13937,10 +12916,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 865 + i32.const 160 + i32.const 868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed1024 @@ -13952,10 +12931,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 868 + i32.const 160 + i32.const 871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed10000 @@ -13967,10 +12946,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 871 + i32.const 160 + i32.const 874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/randomized512 @@ -14006,17 +12985,17 @@ i32.const 1 global.set $~lib/argc global.get $std/array/randomStringsActual - call $std/array/assertSorted<~lib/string/String>|trampoline + call $std/array/assertSorted<~lib/string/String | null>|trampoline global.get $std/array/randomStringsActual global.get $std/array/randomStringsExpected - call $std/array/isArraysEqual<~lib/string/String> + call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz if i32.const 0 - i32.const 120 - i32.const 901 + i32.const 160 + i32.const 904 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $std/array/createRandomStringArray @@ -14024,303 +13003,605 @@ i32.const 1 global.set $~lib/argc global.get $std/array/randomStrings400 - call $std/array/assertSorted<~lib/string/String>|trampoline - call $~lib/array/Array#join - i32.const 4248 + local.set $1 + i32.const 0 + local.set $0 + block $1of152 + block $0of153 + block $outOfRange54 + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of153 $1of152 $outOfRange54 + end + unreachable + end + i32.const 56 + local.set $0 + end + local.get $1 + local.get $0 + call $std/array/assertSorted<~lib/array/Array> + i32.const 2 + i32.const 0 + i32.const 29 + i32.const 4560 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#join_bool + i32.const 4584 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 910 + i32.const 160 + i32.const 913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 4872 - i32.const 3904 + i32.const 3 + i32.const 2 + i32.const 17 + i32.const 5128 + call $~lib/util/runtime/makeArray + i32.const 4208 call $~lib/array/Array#join - i32.const 4880 + i32.const 5160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 911 + i32.const 160 + i32.const 914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 4976 - i32.const 4936 + i32.const 3 + i32.const 2 + i32.const 21 + i32.const 5248 + call $~lib/util/runtime/makeArray + i32.const 5224 call $~lib/array/Array#join - i32.const 4880 + i32.const 5160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 912 + i32.const 160 + i32.const 915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 5032 - i32.const 5008 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 5328 + call $~lib/util/runtime/makeArray + i32.const 5304 call $~lib/array/Array#join - i32.const 5040 + i32.const 5352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 913 + i32.const 160 + i32.const 916 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#join - i32.const 6696 + i32.const 6 + i32.const 3 + i32.const 23 + i32.const 6680 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#join_flt + i32.const 6744 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 914 + i32.const 160 + i32.const 917 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 6864 - i32.const 3904 + i32.const 3 + i32.const 2 + i32.const 28 + i32.const 6896 + call $~lib/util/runtime/makeArray + i32.const 4208 call $~lib/array/Array<~lib/string/String>#join - i32.const 6784 + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 915 + i32.const 160 + i32.const 918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 - call $~lib/array/Array#constructor - local.set $1 - i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - local.get $1 - i32.load - local.get $0 - i32.store offset=8 - local.get $1 - i32.load - i32.const 4 - i32.add + i32.const 2 + i32.const 33 i32.const 0 - i32.store offset=8 + call $~lib/util/runtime/makeArray + local.tee $1 + i32.load offset=4 + local.tee $0 + call $std/array/Ref#constructor + i32.store + local.get $0 i32.const 0 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - local.get $1 - i32.load - i32.const 8 - i32.add + i32.store offset=4 local.get $0 + call $std/array/Ref#constructor i32.store offset=8 local.get $1 global.set $std/array/refArr global.get $std/array/refArr - call $~lib/array/Array#join - i32.const 6912 + call $~lib/array/Array#join_ref + i32.const 6976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 917 + i32.const 160 + i32.const 920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed0 - i32.const 4216 - call $~lib/array/Array#join - i32.const 3904 + call $~lib/array/Array#toString + i32.const 4208 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 921 + i32.const 160 + i32.const 924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed1 - i32.const 4216 - call $~lib/array/Array#join - i32.const 6784 + call $~lib/array/Array#toString + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 922 + i32.const 160 + i32.const 925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed2 - i32.const 4216 - call $~lib/array/Array#join - i32.const 6984 + call $~lib/array/Array#toString + i32.const 7056 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 923 + i32.const 160 + i32.const 926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed4 - i32.const 4216 - call $~lib/array/Array#join - i32.const 7000 + call $~lib/array/Array#toString + i32.const 7080 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 924 + i32.const 160 + i32.const 927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#join - i32.const 7072 + i32.const 3 + i32.const 0 + i32.const 34 + i32.const 7136 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#join_int + i32.const 7160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 926 + i32.const 160 + i32.const 929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#join - i32.const 7136 + i32.const 3 + i32.const 1 + i32.const 35 + i32.const 7216 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#join_int + i32.const 7240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 927 + i32.const 160 + i32.const 930 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#join - i32.const 7240 + i32.const 3 + i32.const 3 + i32.const 30 + i32.const 7320 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#join_int + i32.const 7360 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 928 + i32.const 160 + i32.const 931 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#join - i32.const 7440 + i32.const 4 + i32.const 3 + i32.const 36 + i32.const 7472 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#join_int + i32.const 7520 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 929 + i32.const 160 + i32.const 932 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/randomStringsExpected - i32.const 4216 - call $~lib/array/Array<~lib/string/String>#join - i32.const 7528 + call $~lib/array/Array<~lib/string/String | null>#toString + i32.const 7624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 930 + i32.const 160 + i32.const 933 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 7648 - i32.const 4216 - call $~lib/array/Array<~lib/string/String>#join - i32.const 7656 + i32.const 4 + i32.const 2 + i32.const 28 + i32.const 7752 + call $~lib/util/runtime/makeArray + call $~lib/array/Array<~lib/string/String | null>#toString + i32.const 7784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 931 + i32.const 160 + i32.const 934 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 2 + i32.const 2 + i32.const 24 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $0 + i32.load offset=4 + local.tee $1 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 7840 + call $~lib/util/runtime/makeArray + i32.store + local.get $1 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 7864 + call $~lib/util/runtime/makeArray + i32.store offset=4 + local.get $0 + global.set $std/array/subarr32 global.get $std/array/subarr32 - call $~lib/array/Array<~lib/array/Array>#join - i32.const 7744 + call $~lib/array/Array<~lib/array/Array>#join_arr + i32.const 7888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 934 + i32.const 160 + i32.const 937 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 2 + i32.const 2 + i32.const 37 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $0 + i32.load offset=4 + local.tee $1 + i32.const 2 + i32.const 0 + i32.const 20 + i32.const 7944 + call $~lib/util/runtime/makeArray + i32.store + local.get $1 + i32.const 2 + i32.const 0 + i32.const 20 + i32.const 7968 + call $~lib/util/runtime/makeArray + i32.store offset=4 + local.get $0 + global.set $std/array/subarr8 global.get $std/array/subarr8 - call $~lib/array/Array<~lib/array/Array>#join - i32.const 7744 + call $~lib/array/Array<~lib/array/Array>#join_arr + i32.const 7888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 937 + i32.const 160 + i32.const 940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 1 + i32.const 2 + i32.const 39 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $0 + i32.load offset=4 + local.set $1 + i32.const 1 + i32.const 2 + i32.const 38 + i32.const 0 + call $~lib/util/runtime/makeArray + local.tee $2 + i32.load offset=4 + i32.const 1 + i32.const 2 + i32.const 21 + i32.const 8064 + call $~lib/util/runtime/makeArray + i32.store + local.get $1 + local.get $2 + i32.store + local.get $0 + global.set $std/array/subarrU32 global.get $std/array/subarrU32 - call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join - i32.const 6784 + call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 940 + i32.const 160 + i32.const 943 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $std/array/main (; 164 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:std/array + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 40 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + i32.const 1 + global.set $~lib/started + end + ) + (func $~lib/runtime/runtime.instanceof (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 8072 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 8072 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 166 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 8072 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 8072 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 168 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 169 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + if (result i32) + local.get $2 + i32.const 8072 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 8072 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end + local.get $2 ) - (func $start (; 148 ;) (type $FUNCSIG$v) - call $start:std/array + (func $~lib/runtime/runtime.retain (; 171 ;) (type $FUNCSIG$vi) (param $0 i32) + nop ) - (func $null (; 149 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 172 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/array.ts b/tests/compiler/std/array.ts index 777d62a416..0a6fce0a1f 100644 --- a/tests/compiler/std/array.ts +++ b/tests/compiler/std/array.ts @@ -1,12 +1,14 @@ -import "allocator/arena"; +import "collector/dummy"; import { Array } from "array"; -import { COMPARATOR } from "internal/sort"; +import { COMPARATOR } from "util/sort"; + +@start export function main(): void {} // Obtains the internal capacity of an array from its backing buffer. function internalCapacity(array: Array): i32 { // the memory region used by the backing buffer might still be larger in that the ArrayBuffer // pre-allocates a power of 2 sized buffer itself and reuses it as long as it isn't exceeded. - var buffer: ArrayBuffer = array.buffer_; + var buffer: ArrayBuffer = array.data; return buffer.byteLength >> alignof(); } @@ -749,9 +751,9 @@ function isSorted(data: Array, comparator: (a: T, b: T) => i32 = COMPARATO } function createReverseOrderedArray(size: i32): Array { - var arr = new Array(size); - for (let i = 0; i < arr.length; i++) { - arr[i] = arr.length - 1 - i; + var arr = Array.create(size); + for (let i = 0; i < size; i++) { + arr[i] = size - 1 - i; } return arr; } @@ -759,18 +761,19 @@ function createReverseOrderedArray(size: i32): Array { NativeMath.seedRandom(reinterpret(JSMath.random())); function createRandomOrderedArray(size: i32): Array { - var arr = new Array(size); - for (let i = 0; i < arr.length; i++) { - arr[i] = (NativeMath.random() * arr.length); + var arr = Array.create(size); + for (let i = 0; i < size; i++) { + arr[i] = (NativeMath.random() *size); } return arr; } function createReverseOrderedNestedArray(size: i32): Array> { - var arr = new Array>(size); - for (let i: i32 = 0; i < arr.length; i++) { - arr[i] = new Array(1); - arr[i][0] = arr.length - 1 - i; + var arr = Array.create>(size); + for (let i: i32 = 0; i < size; i++) { + let inner = Array.create(1); + inner[0] = size - 1 - i; + arr[i] = inner; } return arr; } @@ -780,9 +783,9 @@ class Proxy { } function createReverseOrderedElementsArray(size: i32): Proxy[] { - var arr = new Array>(size); - for (let i: i32 = 0; i < arr.length; i++) { - arr[i] = new Proxy(arr.length - 1 - i); + var arr = Array.create>(size); + for (let i: i32 = 0; i < size; i++) { + arr[i] = new Proxy(size - 1 - i); } return arr; } @@ -799,8 +802,8 @@ function createRandomString(len: i32): string { } function createRandomStringArray(size: i32): string[] { - var arr = new Array(size); - for (let i: i32 = 0; i < arr.length; i++) { + var arr = Array.create(size); + for (let i: i32 = 0; i < size; i++) { arr[i] = createRandomString((NativeMath.random() * 32)); } return arr; @@ -894,11 +897,11 @@ assertSorted>(reversedElements512, (a: Proxy, b: Proxy): i3 // Test sorting strings -var randomStringsActual: string[] = ["a", "b", "a", "ab", "ba", "", null]; -var randomStringsExpected: string[] = ["", "a", "a", "ab", "b", "ba", null]; +var randomStringsActual: (string | null)[] = ["a", "b", "a", "ab", "ba", "", null]; +var randomStringsExpected: (string | null)[] = ["", "a", "a", "ab", "b", "ba", null]; -assertSorted(randomStringsActual); -assert(isArraysEqual(randomStringsActual, randomStringsExpected)); +assertSorted(randomStringsActual); +assert(isArraysEqual(randomStringsActual, randomStringsExpected)); var randomStrings400 = createRandomStringArray(400); assertSorted(randomStrings400); @@ -913,7 +916,7 @@ assert(([1, 2, 3]).join("-") == "1-2-3"); assert(([i32.MIN_VALUE, i32.MIN_VALUE]).join("__") == "-2147483648__-2147483648"); assert(([0.0, 1.0, -2.0, NaN, -Infinity, Infinity]).join(", ") == "0.0, 1.0, -2.0, NaN, -Infinity, Infinity"); assert((["", "1", null]).join("") == "1"); -var refArr: Ref[] = [new Ref(), null, new Ref()]; +var refArr: (Ref | null)[] = [new Ref(), null, new Ref()]; assert(refArr.join() == "[object Object],,[object Object]"); // Array#toString ////////////////////////////////////////////////////////////////////////////////// diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 5d7c3e9b8a..153a667d76 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -1,13 +1,12 @@ (module - (type $FUNCSIG$v (func)) (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$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 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))) (type $FUNCSIG$d (func (result f64))) @@ -19,337 +18,233 @@ (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $FUNCSIG$iiid (func (param i32 i32 f64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$iiij (func (param i32 i32 i64) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 40) "\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") - (data (i32.const 104) "\03\00\00\00a\00b\00c\00") - (data (i32.const 120) "\0c\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 152) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 216) "\05\00\00\00\00\00\00\00\01\02\03\04\05\00\00\00") - (data (i32.const 232) "\d8\00\00\00\05\00\00\00") - (data (i32.const 240) "\05\00\00\00\00\00\00\00\01\01\01\04\05\00\00\00") - (data (i32.const 256) "\f0\00\00\00\05\00\00\00") - (data (i32.const 264) "\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 280) "\08\01\00\00\05\00\00\00") - (data (i32.const 288) "\05\00\00\00\00\00\00\00\01\01\00\00\00\00\00\00") - (data (i32.const 304) " \01\00\00\05\00\00\00") - (data (i32.const 312) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 328) "8\01\00\00\05\00\00\00") - (data (i32.const 336) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 352) "P\01\00\00\05\00\00\00") - (data (i32.const 360) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 392) "h\01\00\00\05\00\00\00") - (data (i32.const 400) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 432) "\90\01\00\00\05\00\00\00") - (data (i32.const 440) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 472) "\b8\01\00\00\05\00\00\00") - (data (i32.const 480) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 512) "\e0\01\00\00\05\00\00\00") - (data (i32.const 520) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 552) "\08\02\00\00\05\00\00\00") - (data (i32.const 560) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 592) "0\02\00\00\05\00\00\00") - (data (i32.const 600) "\00\00\00\00\00\00\00\00") - (data (i32.const 608) "X\02\00\00\00\00\00\00") - (data (i32.const 616) "\00\00\00\00\00\00\00\00") - (data (i32.const 624) "h\02\00\00\00\00\00\00") - (data (i32.const 632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 664) "x\02\00\00\05\00\00\00") - (data (i32.const 672) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 704) "\a0\02\00\00\05\00\00\00") - (data (i32.const 712) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 744) "\c8\02\00\00\05\00\00\00") - (data (i32.const 752) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 784) "\f0\02\00\00\05\00\00\00") - (data (i32.const 792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 824) "\18\03\00\00\05\00\00\00") - (data (i32.const 832) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 864) "@\03\00\00\05\00\00\00") - (data (i32.const 872) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 904) "h\03\00\00\05\00\00\00") - (data (i32.const 912) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 944) "\90\03\00\00\05\00\00\00") - (data (i32.const 952) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 984) "\b8\03\00\00\05\00\00\00") - (data (i32.const 992) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1024) "\e0\03\00\00\05\00\00\00") - (data (i32.const 1032) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1064) "\08\04\00\00\05\00\00\00") - (data (i32.const 1072) "\14\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1104) "0\04\00\00\05\00\00\00") - (data (i32.const 1112) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1144) "X\04\00\00\05\00\00\00") - (data (i32.const 1152) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1184) "\80\04\00\00\05\00\00\00") - (data (i32.const 1192) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1224) "\a8\04\00\00\05\00\00\00") - (data (i32.const 1232) "\14\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1264) "\d0\04\00\00\05\00\00\00") - (data (i32.const 1272) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1304) "\f8\04\00\00\05\00\00\00") - (data (i32.const 1312) "\14\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1344) " \05\00\00\05\00\00\00") - (data (i32.const 1352) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1384) "H\05\00\00\05\00\00\00") - (data (i32.const 1392) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1424) "p\05\00\00\05\00\00\00") - (data (i32.const 1432) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1464) "\98\05\00\00\05\00\00\00") - (data (i32.const 1472) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1504) "\c0\05\00\00\05\00\00\00") - (data (i32.const 1512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1544) "\e8\05\00\00\05\00\00\00") - (data (i32.const 1552) "\14\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1584) "\10\06\00\00\05\00\00\00") - (data (i32.const 1592) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1624) "8\06\00\00\05\00\00\00") - (data (i32.const 1632) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1664) "`\06\00\00\05\00\00\00") - (data (i32.const 1672) "\00\00\00\00\00\00\00\00") - (data (i32.const 1680) "\88\06\00\00\00\00\00\00") - (data (i32.const 1688) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1720) "\98\06\00\00\05\00\00\00") - (data (i32.const 1728) "\0c\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1760) "\c0\06\00\00\03\00\00\00") - (data (i32.const 1768) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 1784) "\e8\06\00\00\02\00\00\00") - (data (i32.const 1792) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1824) "\00\07\00\00\05\00\00\00") - (data (i32.const 1832) "\08\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") - (data (i32.const 1848) "(\07\00\00\02\00\00\00") - (data (i32.const 1856) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1888) "@\07\00\00\03\00\00\00") - (data (i32.const 1896) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 1928) "h\07\00\00\05\00\00\00") - (data (i32.const 1936) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 1952) "\90\07\00\00\01\00\00\00") - (data (i32.const 1960) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1992) "\a8\07\00\00\04\00\00\00") - (data (i32.const 2000) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2032) "\d0\07\00\00\05\00\00\00") - (data (i32.const 2040) "\04\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2056) "\f8\07\00\00\01\00\00\00") - (data (i32.const 2064) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2096) "\10\08\00\00\04\00\00\00") - (data (i32.const 2104) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2136) "8\08\00\00\05\00\00\00") - (data (i32.const 2144) "\08\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") - (data (i32.const 2160) "`\08\00\00\02\00\00\00") - (data (i32.const 2168) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2200) "x\08\00\00\03\00\00\00") - (data (i32.const 2208) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2240) "\a0\08\00\00\05\00\00\00") - (data (i32.const 2248) "\04\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") - (data (i32.const 2264) "\c8\08\00\00\01\00\00\00") - (data (i32.const 2272) "\10\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2304) "\e0\08\00\00\04\00\00\00") - (data (i32.const 2312) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2344) "\08\t\00\00\05\00\00\00") - (data (i32.const 2352) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 2368) "0\t\00\00\01\00\00\00") - (data (i32.const 2376) "\10\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2408) "H\t\00\00\04\00\00\00") - (data (i32.const 2416) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2448) "p\t\00\00\05\00\00\00") - (data (i32.const 2456) "\00\00\00\00\00\00\00\00") - (data (i32.const 2464) "\98\t\00\00\00\00\00\00") - (data (i32.const 2472) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2504) "\a8\t\00\00\05\00\00\00") - (data (i32.const 2512) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2544) "\d0\t\00\00\05\00\00\00") - (data (i32.const 2552) "\00\00\00\00\00\00\00\00") - (data (i32.const 2560) "\f8\t\00\00\00\00\00\00") - (data (i32.const 2568) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2600) "\08\n\00\00\05\00\00\00") - (data (i32.const 2608) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2640) "0\n\00\00\05\00\00\00") - (data (i32.const 2648) "\00\00\00\00\00\00\00\00") - (data (i32.const 2656) "X\n\00\00\00\00\00\00") - (data (i32.const 2664) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2696) "h\n\00\00\05\00\00\00") - (data (i32.const 2704) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2736) "\90\n\00\00\05\00\00\00") - (data (i32.const 2744) "\00\00\00\00\00\00\00\00") - (data (i32.const 2752) "\b8\n\00\00\00\00\00\00") - (data (i32.const 2760) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2792) "\c8\n\00\00\05\00\00\00") - (data (i32.const 2800) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2832) "\f0\n\00\00\05\00\00\00") - (data (i32.const 2840) "\00\00\00\00\00\00\00\00") - (data (i32.const 2848) "\18\0b\00\00\00\00\00\00") - (data (i32.const 2856) "\14\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 2888) "(\0b\00\00\05\00\00\00") - (data (i32.const 2896) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 2928) "V\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") - (data (i32.const 3104) " \00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3168) " \0c\00\00\08\00\00\00") - (data (i32.const 3176) " \00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3240) "h\0c\00\00\08\00\00\00") - (data (i32.const 3248) "@\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3376) "\b0\0c\00\00\08\00\00\00") - (data (i32.const 3384) "@\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3512) "8\0d\00\00\08\00\00\00") - (data (i32.const 3520) "\14\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3552) "\c0\0d\00\00\05\00\00\00") - (data (i32.const 3560) "\14\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3592) "\e8\0d\00\00\05\00\00\00") - (data (i32.const 3600) "\14\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 3632) "\10\0e\00\00\05\00\00\00") - (data (i32.const 3640) "\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00") - (data (i32.const 3672) "8\0e\00\00\05\00\00\00") - (data (i32.const 3680) "\00\00\00\00\00\00\00\00") - (data (i32.const 3688) "`\0e\00\00\00\00\00\00") - (data (i32.const 3696) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3712) "p\0e\00\00\01\00\00\00") - (data (i32.const 3720) "\08\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") - (data (i32.const 3736) "\88\0e\00\00\02\00\00\00") - (data (i32.const 3744) "\10\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3776) "\a0\0e\00\00\04\00\00\00") - (data (i32.const 3784) "\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3816) "\c8\0e\00\00\04\00\00\00") - (data (i32.const 3824) "\04\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 3840) "\f0\0e\00\00\01\00\00\00") - (data (i32.const 3848) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 3864) "\08\0f\00\00\02\00\00\00") - (data (i32.const 3872) "\01\00\00\00a\00") - (data (i32.const 3880) "\01\00\00\00b\00") - (data (i32.const 3888) "\02\00\00\00a\00b\00") - (data (i32.const 3896) "\02\00\00\00b\00a\00") - (data (i32.const 3904) "\00\00\00\00") - (data (i32.const 3912) "\1c\00\00\00\00\00\00\00 \0f\00\00(\0f\00\00 \0f\00\000\0f\00\008\0f\00\00@\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 3976) "H\0f\00\00\07\00\00\00") - (data (i32.const 3984) "\1c\00\00\00\00\00\00\00@\0f\00\00 \0f\00\00 \0f\00\000\0f\00\00(\0f\00\008\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4048) "\90\0f\00\00\07\00\00\00") - (data (i32.const 4056) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4088) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 4144) "\04\00\00\00n\00u\00l\00l\00") - (data (i32.const 4160) "\02\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 4176) "@\10\00\00\02\00\00\00") - (data (i32.const 4184) "\04\00\00\00t\00r\00u\00e\00") - (data (i32.const 4200) "\05\00\00\00f\00a\00l\00s\00e\00") - (data (i32.const 4216) "\01\00\00\00,\00") - (data (i32.const 4224) "\02\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00") - (data (i32.const 4240) "\80\10\00\00\02\00\00\00") - (data (i32.const 4248) "\n\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") - (data (i32.const 4272) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4304) "\b0\10\00\00\03\00\00\00") - (data (i32.const 4312) "\01\00\00\000\00") - (data (i32.const 4320) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4832) "\e0\10\00\00d\00\00\00") - (data (i32.const 4840) "\0c\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4872) "\e8\12\00\00\03\00\00\00") - (data (i32.const 4880) "\05\00\00\001\00-\002\00-\003\00") - (data (i32.const 4896) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4928) " \13\00\00\03\00\00\00") - (data (i32.const 4936) "\01\00\00\00-\00") - (data (i32.const 4944) "\0c\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 4976) "P\13\00\00\03\00\00\00") - (data (i32.const 4984) "\08\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5000) "x\13\00\00\02\00\00\00") - (data (i32.const 5008) "\02\00\00\00_\00_\00") - (data (i32.const 5016) "\08\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") - (data (i32.const 5032) "\98\13\00\00\02\00\00\00") - (data (i32.const 5040) "\18\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 5096) "0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\00\00") - (data (i32.const 5160) "\e8\13\00\00\06\00\00\00") - (data (i32.const 5168) "\02\00\00\00,\00 \00") - (data (i32.const 5176) "\03\00\00\000\00.\000\00") - (data (i32.const 5192) "\03\00\00\00N\00a\00N\00") - (data (i32.const 5208) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5232) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 5256) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|0 $~lib/internal/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/internal/sort/COMPARATOR<~lib/string/String>~anonymous|0) + (data (i32.const 8) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") + (data (i32.const 144) "\10\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 184) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\02\03\04\05") + (data (i32.const 208) "\14\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\00\00\00\c8\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 240) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") + (data (i32.const 264) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 312) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 336) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") + (data (i32.const 360) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 384) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 408) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 448) "\15\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a8\01\00\00\a8\01\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 480) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 520) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 560) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 600) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 640) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 680) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 696) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 712) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\02\00\00\c8\02\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 744) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 784) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 824) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 864) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 904) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 944) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 984) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1024) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1064) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1104) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1144) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1184) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\04\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1224) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1264) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1304) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1344) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1384) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1424) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1464) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1504) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1544) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1584) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1624) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1664) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\05\00\00\00") + (data (i32.const 1704) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1744) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\b8\06\00\00\b8\06\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 1776) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1816) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 1832) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1872) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1904) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 1928) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 1968) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00") + (data (i32.const 1992) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\05\00\00\00") + (data (i32.const 2024) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2064) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 2088) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2120) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2160) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\05\00\00\00") + (data (i32.const 2184) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00") + (data (i32.const 2216) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2256) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2280) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 2312) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2352) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\04\00\00\00") + (data (i32.const 2376) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\05\00\00\00") + (data (i32.const 2408) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2448) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 2472) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2504) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2544) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2560) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2600) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2640) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2656) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2696) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2736) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2752) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2792) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2832) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2848) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2888) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2928) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 2944) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 2984) "\10\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 3024) "\10\00\00\00\ac\00\00\00\00\00\00\00\00\00\00\00A\00B\00C\00D\00E\00F\00G\00H\00I\00J\00K\00L\00M\00N\00O\00P\00Q\00R\00S\00T\00U\00V\00W\00X\00Y\00Z\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00o\00p\00q\00r\00s\00t\00u\00v\00w\00x\00y\00z\000\001\002\003\004\005\006\007\008\009\00_\00-\00,\00.\00+\00/\00\\\00[\00]\00{\00}\00(\00)\00<\00>\00*\00&\00$\00%\00^\00@\00#\00!\00?\00") + (data (i32.const 3216) "\0f\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80?\00\00\c0\7f\00\00\80\ff\00\00\80?\00\00\00\00\00\00\80\bf\00\00\00\c0\00\00\80\7f") + (data (i32.const 3264) "\16\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\0c\00\00\a0\0c\00\00 \00\00\00\08\00\00\00") + (data (i32.const 3296) "\0f\00\00\00 \00\00\00\00\00\00\00\00\00\00\00\00\00\80\ff\00\00\00\c0\00\00\80\bf\00\00\00\00\00\00\80?\00\00\80?\00\00\80\7f\00\00\c0\7f") + (data (i32.const 3344) "\0f\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\05\00\00\00\00\00\f0?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\7f") + (data (i32.const 3424) "\17\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00 \0d\00\00 \0d\00\00@\00\00\00\08\00\00\00") + (data (i32.const 3456) "\0f\00\00\00@\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f0\bf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\05\00\00\00\00\00\f0?\00\00\00\00\00\00\f0\7f\00\00\00\00\00\00\f8\7f") + (data (i32.const 3536) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3576) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\e0\0d\00\00\e0\0d\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3608) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 3648) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\ff\ff\ff\ff\fe\ff\ff\ff\00\00\00\00\02\00\00\00") + (data (i32.const 3688) "\15\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00P\0e\00\00P\0e\00\00\14\00\00\00\05\00\00\00") + (data (i32.const 3720) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\fe\ff\ff\ff\ff\ff\ff\ff") + (data (i32.const 3760) "\0f\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3776) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c0\0e\00\00\c0\0e\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 3808) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 3832) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\f0\0e\00\00\f0\0e\00\00\04\00\00\00\01\00\00\00") + (data (i32.const 3864) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00") + (data (i32.const 3888) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00(\0f\00\00(\0f\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 3920) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\02\00\00\00\01\00\00\00\00\00\00\00") + (data (i32.const 3952) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00`\0f\00\00`\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 3984) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 4016) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\0f\00\00\a0\0f\00\00\10\00\00\00\04\00\00\00") + (data (i32.const 4048) "\0f\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00") + (data (i32.const 4072) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 4096) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") + (data (i32.const 4120) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00b\00") + (data (i32.const 4144) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") + (data (i32.const 4168) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00b\00a\00") + (data (i32.const 4192) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 4208) "\0f\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00\10\10\00\00(\10\00\00\10\10\00\00@\10\00\00X\10\00\00p\10\00\00\00\00\00\00") + (data (i32.const 4256) "\1b\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\80\10\00\00\80\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4288) "\0f\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00p\10\00\00\10\10\00\00\10\10\00\00@\10\00\00(\10\00\00X\10\00\00\00\00\00\00") + (data (i32.const 4336) "\1b\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\d0\10\00\00\d0\10\00\00\1c\00\00\00\07\00\00\00") + (data (i32.const 4368) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 4416) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") + (data (i32.const 4440) "\0f\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4464) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00") + (data (i32.const 4488) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00f\00a\00l\00s\00e\00") + (data (i32.const 4520) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00,\00") + (data (i32.const 4544) "\0f\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\01\00") + (data (i32.const 4568) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00t\00r\00u\00e\00,\00f\00a\00l\00s\00e\00") + (data (i32.const 4608) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 4640) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\000\00") + (data (i32.const 4664) "\0f\00\00\00\90\01\00\00\00\00\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00") + (data (i32.const 5080) "\15\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\12\00\00H\12\00\00\90\01\00\00d\00\00\00") + (data (i32.const 5112) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\fe\ff\ff\ff\fd\ff\ff\ff") + (data (i32.const 5144) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\001\00-\002\00-\003\00") + (data (i32.const 5176) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 5208) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00-\00") + (data (i32.const 5232) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00") + (data (i32.const 5264) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 5288) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00_\00_\00") + (data (i32.const 5312) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\00\80\00\00\00\80") + (data (i32.const 5336) "\10\00\00\000\00\00\00\00\00\00\00\00\00\00\00-\002\001\004\007\004\008\003\006\004\008\00_\00_\00-\002\001\004\007\004\008\003\006\004\008\00") + (data (i32.const 5400) "\0f\00\00\000\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f0?\00\00\00\00\00\00\00\c0\00\00\00\00\00\00\f8\7f\00\00\00\00\00\00\f0\ff\00\00\00\00\00\00\f0\7f") + (data (i32.const 5464) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00,\00 \00") + (data (i32.const 5488) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\000\00.\000\00") + (data (i32.const 5512) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00N\00a\00N\00") + (data (i32.const 5536) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 5576) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") + (data (i32.const 5608) "\0f\00\00\00\b8\02\00\00\00\00\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|0 $~lib/util/sort/COMPARATOR~anonymous|1 $start:std/array~anonymous|43 $start:std/array~anonymous|44 $start:std/array~anonymous|45 $start:std/array~anonymous|46 $start:std/array~anonymous|47 $start:std/array~anonymous|48 $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) (global $std/array/arr (mut i32) (i32.const 0)) (global $std/array/num (mut i32) (i32.const 1)) (global $std/array/Null (mut i32) (i32.const 0)) - (global $std/array/str (mut i32) (i32.const 104)) - (global $std/array/arr8 (mut i32) (i32.const 232)) + (global $std/array/str (mut i32) (i32.const 136)) + (global $std/array/arr8 (mut i32) (i32.const 224)) (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $~lib/argc (mut i32) (i32.const 0)) - (global $std/array/arr32 (mut i32) (i32.const 392)) + (global $std/array/arr32 (mut i32) (i32.const 464)) (global $std/array/i (mut i32) (i32.const 0)) (global $std/array/other (mut i32) (i32.const 0)) (global $std/array/out (mut i32) (i32.const 0)) - (global $std/array/source (mut i32) (i32.const 624)) + (global $std/array/source (mut i32) (i32.const 728)) (global $std/array/cwArr (mut i32) (i32.const 0)) (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/sarr (mut i32) (i32.const 1624)) + (global $std/array/sarr (mut i32) (i32.const 1760)) + (global $~lib/argc (mut i32) (i32.const 0)) (global $std/array/every (mut i32) (i32.const 0)) (global $std/array/some (mut i32) (i32.const 0)) (global $std/array/newArr (mut i32) (i32.const 0)) @@ -360,16 +255,16 @@ (global $~lib/math/random_state1_64 (mut i64) (i64.const 0)) (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) - (global $std/array/charset i32 (i32.const 2928)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 3168)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 3376)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 3552)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 3632)) - (global $std/array/reversed0 (mut i32) (i32.const 3688)) - (global $std/array/reversed1 (mut i32) (i32.const 3712)) - (global $std/array/reversed2 (mut i32) (i32.const 3736)) - (global $std/array/reversed4 (mut i32) (i32.const 3776)) - (global $std/array/expected4 (mut i32) (i32.const 3816)) + (global $std/array/charset i32 (i32.const 3040)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 3280)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 3440)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 3592)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 3704)) + (global $std/array/reversed0 (mut i32) (i32.const 3792)) + (global $std/array/reversed1 (mut i32) (i32.const 3848)) + (global $std/array/reversed2 (mut i32) (i32.const 3904)) + (global $std/array/reversed4 (mut i32) (i32.const 3968)) + (global $std/array/expected4 (mut i32) (i32.const 4032)) (global $std/array/reversed64 (mut i32) (i32.const 0)) (global $std/array/reversed128 (mut i32) (i32.const 0)) (global $std/array/reversed1024 (mut i32) (i32.const 0)) @@ -379,44 +274,43 @@ (global $std/array/randomized257 (mut i32) (i32.const 0)) (global $std/array/reversedNested512 (mut i32) (i32.const 0)) (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 3976)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 4048)) + (global $std/array/randomStringsActual (mut i32) (i32.const 4272)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 4352)) (global $std/array/randomStrings400 (mut i32) (i32.const 0)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/util/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp (mut i32) (i32.const 0)) + (global $~lib/util/number/_K (mut i32) (i32.const 0)) + (global $~lib/util/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/util/number/_exp_pow (mut i32) (i32.const 0)) (global $std/array/refArr (mut i32) (i32.const 0)) (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) - (global $std/array/subarr32 (mut i32) (i32.const 7736)) - (global $std/array/subarr8 (mut i32) (i32.const 7832)) - (global $std/array/subarrU32 (mut i32) (i32.const 7904)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 7912)) + (global $std/array/subarr32 (mut i32) (i32.const 0)) + (global $std/array/subarr8 (mut i32) (i32.const 0)) + (global $std/array/subarrU32 (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 8072)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 8400)) (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) - (func $start:~lib/allocator/arena (; 2 ;) (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/internal/arraybuffer/computeSize (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (export "main" (func $std/array/main)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -424,7 +318,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (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) @@ -503,477 +397,518 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 40 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $1 - local.get $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/memory/memory.allocate (; 6 ;) (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/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/internal/memory/memset (; 7 ;) (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 + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store 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 + i32.store offset=4 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub + i32.const 0 + i32.store offset=8 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 + i32.store offset=12 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 + global.get $~lib/util/runtime/HEADER_SIZE 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/array/Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (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.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 i32.eqz if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end local.get $0 - i32.const 0 - i32.store + local.get $1 + i32.store8 local.get $0 - i32.const 0 - i32.store offset=4 + 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 + br $~lib/util/memory/memset|inlined.0 + end local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 + i32.const 1 i32.add - local.set $4 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 local.get $2 - local.set $6 - local.get $4 local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - if (result i32) + 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 - i32.const 0 - i32.ne - else - i32.const 1 - end - ) - (func $~lib/array/Array.isArray<~lib/array/Array> (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - if (result i32) + local.get $4 + i32.store local.get $0 - i32.const 0 - i32.ne - else - i32.const 1 - end - ) - (func $std/array/P#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - ) - (func $~lib/array/Array.isArray (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 0 - if (result i32) + 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 + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 + i32.add + local.get $4 + i32.store local.get $0 - i32.const 0 - i32.ne - else - i32.const 0 - end - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 13 ;) (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 $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 152 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.1 - local.get $3 i32.const 8 i32.add - local.set $4 - i32.const 0 - local.set $5 + local.get $4 + i32.store + local.get $0 local.get $2 - local.set $6 + i32.add + i32.const 12 + i32.sub local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) + i32.store local.get $0 - i32.eqz + 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 - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end local.get $0 - i32.const 0 + i32.const 12 + i32.add + local.get $4 i32.store local.get $0 - i32.const 0 - i32.store offset=4 + i32.const 16 + i32.add + local.get $4 + i32.store local.get $0 - i32.const 0 - i32.store offset=8 + i32.const 20 + i32.add + local.get $4 + i32.store local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Uint8Array#constructor (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 + end + ) + (func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/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 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq i32.eqz if + i32.const 0 + i32.const 80 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/dummy/__ref_register + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/util/runtime/allocate + local.set $2 + local.get $2 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $2 + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/collector/dummy/__ref_link (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 12 ;) (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.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 24 i32.const 12 - call $~lib/memory/memory.allocate + i32.const 57 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.get $1 + local.get $2 + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $3 + block (result i32) + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + end + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + i32.load + local.tee $6 + i32.ne + if (result i32) + local.get $6 + if + local.get $6 + local.get $4 + call $~lib/collector/dummy/__ref_unlink + end + local.get $5 + local.get $4 + call $~lib/collector/dummy/__ref_link + local.get $5 + else + local.get $5 + end + i32.store + local.get $0 + local.get $3 + i32.store offset=4 + local.get $0 + local.get $1 + i32.store offset=8 + local.get $0 + ) + (func $~lib/array/Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 16 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + end + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $0 + ) + (func $~lib/array/Array.isArray<~lib/array/Array | null> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 + end + ) + (func $~lib/array/Array.isArray<~lib/array/Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 + end + ) + (func $std/array/P#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 + ) + (func $~lib/array/Array.isArray (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + if (result i32) + local.get $0 + i32.const 0 + i32.ne + else + i32.const 0 + end + ) + (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + end local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/typedarray/Uint8Array> (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -983,7 +918,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -993,7 +928,7 @@ i32.const 0 end ) - (func $~lib/array/Array.isArray<~lib/string/String> (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.isArray<~lib/string/String> (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 if (result i32) local.get $0 @@ -1003,17 +938,16 @@ i32.const 0 end ) - (func $~lib/array/Array#fill (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) local.get $0 - i32.load + i32.load offset=4 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 local.get $2 i32.const 0 @@ -1072,298 +1006,328 @@ local.get $4 local.get $2 i32.add - i32.const 8 - i32.add - local.set $6 local.get $1 - local.set $7 local.get $3 local.get $2 i32.sub - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill end local.get $0 ) - (func $~lib/array/Array#__get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.get $2 - i32.load - i32.const 0 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 + block $~lib/util/memory/memmove|inlined.0 + local.get $0 local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $5 - i32.add - i32.load8_u offset=8 - else - unreachable - end - ) - (func $std/array/isArraysEqual (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $2 - i32.eqz - if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end - local.set $2 - local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end - i32.ne + i32.eq if - i32.const 0 - return + br $~lib/util/memory/memmove|inlined.0 end local.get $0 local.get $1 - i32.eq + i32.lt_u if - i32.const 1 - return - end - end - block $break|0 - i32.const 0 - local.set $3 - loop $repeat|0 - local.get $3 - local.get $2 - i32.lt_s - i32.eqz - br_if $break|0 + local.get $1 + i32.const 7 + i32.and local.get $0 - local.get $3 - call $~lib/array/Array#__get - i32.const 255 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|2 + end + end + end + else local.get $1 - local.get $3 - call $~lib/array/Array#__get - i32.const 255 + i32.const 7 i32.and - i32.ne + local.get $0 + i32.const 7 + i32.and + i32.eq if - i32.const 0 - return + 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 + br $~lib/util/memory/memmove|inlined.0 + 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 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $repeat|0 - unreachable - end - unreachable - end - i32.const 1 - ) - (func $~lib/array/Array#fill|trampoline (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange + 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 - unreachable end - i32.const 0 - local.set $2 end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#fill ) - (func $~lib/array/Array#fill (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 24 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) (local $9 i32) - local.get $0 - i32.load + i32.const 16 + call $~lib/util/runtime/allocate + local.get $2 + call $~lib/util/runtime/register local.set $4 local.get $0 - i32.load offset=4 - local.set $5 - local.get $2 - i32.const 0 - i32.lt_s + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.set $6 + local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne if (result i32) - local.get $5 - local.get $2 - i32.add - local.tee $6 - i32.const 0 - local.tee $7 - local.get $6 + local.get $9 + if + local.get $9 + local.get $7 + call $~lib/collector/dummy/__ref_unlink + end + local.get $8 local.get $7 - i32.gt_s - select + call $~lib/collector/dummy/__ref_link + local.get $8 else - local.get $2 - local.tee $6 - local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select + local.get $8 end - local.set $2 + i32.store + local.get $4 + local.get $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 local.get $3 - i32.const 0 - i32.lt_s - if (result i32) - local.get $5 - local.get $3 - i32.add - local.tee $6 - i32.const 0 - local.tee $7 + if local.get $6 - local.get $7 - i32.gt_s - select - else local.get $3 - local.tee $6 local.get $5 - local.tee $7 - local.get $6 - local.get $7 - i32.lt_s - select - end - local.set $3 - block $break|0 - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $4 - local.set $6 - local.get $2 - local.set $7 - local.get $1 - local.set $8 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 - unreachable - end - unreachable + call $~lib/memory/memory.copy end + local.get $4 + ) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + i32.load offset=12 ) - (func $~lib/array/Array#__get (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__unchecked_get (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.get $2 - i32.load - i32.const 2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + ) + (func $~lib/array/Array#__get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 0 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $std/array/isArraysEqual (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 28 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -1388,10 +1352,10 @@ br_if $break|0 local.get $0 local.get $3 - call $~lib/array/Array#__get + call $~lib/array/Array#__get local.get $1 local.get $3 - call $~lib/array/Array#__get + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -1408,1731 +1372,473 @@ end i32.const 1 ) - (func $~lib/array/Array#fill|trampoline (; 25 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end + (func $~lib/array/Array#fill (; 29 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) local.get $0 - local.get $1 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=12 + local.set $5 local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $2 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $2 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $2 local.get $3 - call $~lib/array/Array#fill - ) - (func $std/array/internalCapacity (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.load - local.set $1 - local.get $1 - i32.load - i32.const 2 - i32.shr_s - ) - (func $~lib/internal/memory/memcpy (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + i32.const 0 + i32.lt_s + if (result i32) + local.get $5 + local.get $3 + i32.add + local.tee $6 + i32.const 0 + local.tee $7 + local.get $6 + local.get $7 + i32.gt_s + select + else + local.get $3 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + local.get $7 + i32.lt_s + select + end + local.set $3 block $break|0 - loop $continue|0 + loop $repeat|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 (; 28 ;) (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 + local.get $3 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable end - else + unreachable + end + local.get $0 + ) + (func $~lib/array/Array#get:length (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $std/array/isArraysEqual (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $2 + i32.eqz + if + local.get $0 + call $~lib/array/Array#get:length + local.set $2 + local.get $2 local.get $1 - i32.const 7 - i32.and + call $~lib/array/Array#get:length + i32.ne + if + i32.const 0 + return + end local.get $0 - i32.const 7 - i32.and + local.get $1 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 + i32.const 1 + return 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 + block $break|0 + i32.const 0 + local.set $3 + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $0 + local.get $3 + call $~lib/array/Array#__get + local.get $1 + local.get $3 + call $~lib/array/Array#__get + i32.ne + if + i32.const 0 + return end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + unreachable end + unreachable end + i32.const 1 + ) + (func $~lib/array/Array#get:length (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $std/array/internalCapacity (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.load + local.set $1 + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 2 + i32.shr_s ) - (func $~lib/allocator/arena/__memory_free (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/memory/memory.free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/util/runtime/reallocate (; 39 ;) (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 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub local.set $2 - local.get $1 local.get $2 - i32.gt_s + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u if local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz + call $~lib/util/runtime/adjust + local.set $4 + local.get $3 + call $~lib/util/runtime/adjust + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u if + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load + i32.store + local.get $5 i32.const 0 - i32.const 40 - 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 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 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 - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $6 - local.get $6 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end local.get $3 - local.set $0 - end - block $~lib/memory/memory.fill|inlined.3 - local.get $0 - i32.const 8 - i32.add - local.get $2 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 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 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq if - i32.const 0 - i32.const 40 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/memory/memory.free + else + local.get $0 + call $~lib/collector/dummy/__ref_register end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else local.get $0 + local.get $3 + i32.add + i32.const 0 local.get $1 - i32.store + local.get $3 + i32.sub + call $~lib/memory/memory.fill end + else + nop end + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#push (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/array/ensureCapacity (; 40 ;) (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 $9 i32) - local.get $0 - i32.load offset=4 - local.set $2 + local.get $1 local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 - i32.shr_u - local.set $4 - local.get $2 - i32.const 1 - i32.add - local.set $5 + i32.load offset=8 local.get $2 - local.get $4 - i32.ge_u + i32.shr_u + i32.gt_u if + local.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 - i32.const 268435454 - i32.ge_u + i32.shr_u + i32.gt_u if i32.const 0 - i32.const 8 - i32.const 182 - i32.const 42 - call $~lib/env/abort + i32.const 280 + i32.const 14 + i32.const 64 + call $~lib/builtins/abort unreachable end - local.get $3 - local.get $5 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 local.get $0 - local.get $3 - i32.store - end - local.get $0 - local.get $5 - i32.store offset=4 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $6 - local.get $2 - local.set $7 + i32.load + local.set $3 local.get $1 - local.set $8 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 - i32.const 2 + local.get $2 i32.shl - i32.add - local.get $9 - i32.add - local.get $8 + local.set $4 + local.get $3 + local.get $4 + call $~lib/util/runtime/reallocate + local.set $5 + local.get $5 + local.get $3 + i32.ne + if + local.get $0 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $0 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $4 i32.store offset=8 end - local.get $5 ) - (func $~lib/array/Array#__get (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load + i32.load offset=12 local.set $2 - local.get $1 local.get $2 + i32.const 1 + i32.add + local.set $3 + local.get $0 + local.get $3 + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store + local.get $0 + local.get $3 + i32.store offset=12 + local.get $3 + ) + (func $~lib/array/Array#__unchecked_get (; 42 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array#__get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/array/Array#pop (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $1 local.get $1 i32.const 1 i32.lt_s if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 280 + i32.const 311 i32.const 20 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.tee $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end - local.set $5 local.get $0 + i32.load offset=4 local.get $1 - i32.store offset=4 - local.get $5 + i32.const 1 + i32.sub + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $2 + local.get $0 + local.get $1 + i32.store offset=12 + local.get $2 ) - (func $~lib/array/Array#concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#concat (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3141,11 +1847,11 @@ (local $7 i32) (local $8 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 i32.const 0 local.get $1 - i32.load offset=4 + i32.load offset=12 local.get $1 i32.const 0 i32.eq @@ -3155,59 +1861,53 @@ local.get $3 i32.add local.set $4 - i32.const 0 local.get $4 - call $~lib/array/Array#constructor - local.set $5 - local.get $2 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u if - local.get $5 - i32.load - i32.const 8 - i32.add - local.set $6 - local.get $0 - i32.load - i32.const 8 - i32.add - local.set $7 - local.get $2 - i32.const 2 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove + i32.const 0 + i32.const 280 + i32.const 236 + i32.const 60 + call $~lib/builtins/abort + unreachable end - local.get $3 - if + block $~lib/util/runtime/NEWARRAY|inlined.0 (result i32) + local.get $4 + local.set $5 local.get $5 - i32.load - i32.const 8 - i32.add - local.get $2 - i32.const 2 - i32.shl - i32.add - local.set $8 - local.get $1 - i32.load - i32.const 8 - i32.add - local.set $7 - local.get $3 i32.const 2 - i32.shl - local.set $6 - local.get $8 - local.get $7 - local.get $6 - call $~lib/internal/memory/memmove + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray end - local.get $5 + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $2 + i32.const 2 + i32.shl + local.set $8 + local.get $7 + local.get $0 + i32.load offset=4 + local.get $8 + call $~lib/memory/memory.copy + local.get $7 + local.get $8 + i32.add + local.get $1 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $6 ) - (func $~lib/array/Array#copyWithin (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/array/Array#copyWithin (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3216,14 +1916,11 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load + i32.load offset=4 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 local.get $3 local.tee $6 @@ -3325,7 +2022,6 @@ local.get $9 local.get $8 i32.lt_s - local.tee $6 if (result i32) local.get $8 local.get $9 @@ -3333,7 +2029,7 @@ i32.add i32.lt_s else - local.get $6 + i32.const 0 end if local.get $9 @@ -3353,40 +2049,18 @@ local.get $11 if block - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $4 - local.set $6 - local.get $8 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $4 - local.set $12 - local.get $9 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $14 - i32.const 0 - local.set $13 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - local.get $14 - i32.store offset=8 - end + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $4 + local.get $9 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store local.get $9 i32.const 1 i32.sub @@ -3406,71 +2080,33 @@ end else local.get $4 - i32.const 8 - i32.add local.get $8 i32.const 2 i32.shl i32.add - local.set $13 local.get $4 - i32.const 8 - i32.add local.get $9 i32.const 2 i32.shl i32.add - local.set $14 local.get $11 i32.const 2 i32.shl - local.set $7 - local.get $13 - local.get $14 - local.get $7 - call $~lib/internal/memory/memmove - end - local.get $0 - ) - (func $~lib/array/Array#copyWithin|trampoline (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 2 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 + call $~lib/memory/memory.copy end local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/array/Array#copyWithin ) - (func $std/array/isArraysEqual (; 37 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.15 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.17 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -3515,330 +2151,156 @@ end i32.const 1 ) - (func $~lib/array/Array#unshift (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 48 ;) (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 $8 i32) - (local $9 i32) local.get $0 - i32.load + i32.load offset=12 + i32.const 1 + i32.add local.set $2 + local.get $0 local.get $2 - i32.load i32.const 2 - i32.shr_u - local.set $3 + call $~lib/array/ensureCapacity local.get $0 i32.load offset=4 - local.set $4 - local.get $4 - i32.const 1 + local.set $3 + local.get $3 + i32.const 4 i32.add - local.set $5 - local.get $4 local.get $3 - i32.ge_u - if - local.get $4 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 327 - i32.const 42 - call $~lib/env/abort - unreachable - end - local.get $2 - local.get $5 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $2 - local.get $2 - i32.load - i32.const 2 - i32.shr_u - local.set $3 - local.get $0 - local.get $2 - i32.store - end - block $~lib/memory/memory.copy|inlined.4 - local.get $2 - i32.const 8 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $2 - i32.const 8 - i32.add - local.set $7 - local.get $3 - i32.const 1 - i32.sub - i32.const 2 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - i32.const 0 - local.set $7 - local.get $1 - local.set $6 - i32.const 0 - local.set $9 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $6 - i32.store offset=8 - end + local.get $2 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $3 + local.get $1 + i32.store local.get $0 - local.get $5 - i32.store offset=4 - local.get $5 + local.get $2 + i32.store offset=12 + local.get $2 ) - (func $~lib/array/Array#shift (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 49 ;) (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 $7 i32) - (local $8 i32) - local.get $0 - i32.load offset=4 - local.set $1 - local.get $1 - i32.const 1 - i32.lt_s - if - i32.const 0 - i32.const 8 - i32.const 299 - i32.const 20 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load - local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $2 - local.set $3 - i32.const 0 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $6 - local.get $1 - i32.const 1 - i32.sub - local.set $7 - block $~lib/memory/memory.copy|inlined.5 - local.get $2 - i32.const 8 - i32.add - local.set $5 - local.get $2 - i32.const 8 - i32.add - i32.const 4 - i32.add - local.set $4 - local.get $7 - i32.const 2 - i32.shl - local.set $3 - local.get $5 - local.get $4 - local.get $3 - call $~lib/internal/memory/memmove - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $3 - local.get $7 - local.set $4 - i32.const 0 - local.set $5 + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=12 + local.set $1 + local.get $1 + i32.const 1 + i32.lt_s + if i32.const 0 - local.set $8 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $5 - i32.store offset=8 + i32.const 280 + i32.const 383 + i32.const 20 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $7 - i32.store offset=4 - local.get $6 + i32.load offset=4 + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $1 + i32.const 1 + i32.sub + local.set $4 + local.get $2 + local.get $2 + i32.const 4 + i32.add + local.get $4 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store + local.get $0 + local.get $4 + i32.store offset=12 + local.get $3 ) - (func $~lib/array/Array#reverse (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 50 ;) (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 $7 i32) - (local $8 i32) - (local $9 i32) local.get $0 - i32.load + i32.load offset=12 local.set $1 - block $break|0 - block - i32.const 0 - local.set $2 - local.get $0 - i32.load offset=4 - i32.const 1 - i32.sub - local.set $3 - end - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $1 - local.set $5 - local.get $2 - local.set $4 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $1 - local.set $7 + local.get $1 + if + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + i32.add + local.set $3 + block $break|0 + loop $continue|0 + local.get $2 + local.get $3 + i32.lt_u + if + block + local.get $2 + i32.load + local.set $4 + local.get $2 local.get $3 - local.set $8 - i32.const 0 - local.set $9 - local.get $7 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 + i32.load + i32.store + local.get $3 + local.get $4 + i32.store + local.get $2 + i32.const 4 i32.add - i32.load offset=8 + local.set $2 + local.get $3 + i32.const 4 + i32.sub + local.set $3 end - local.set $9 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $9 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $1 - local.set $8 - local.get $3 - local.set $9 - local.get $6 - local.set $4 - i32.const 0 - local.set $5 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $4 - i32.store offset=8 + br $continue|0 end end - block - local.get $2 - i32.const 1 - i32.add - local.set $2 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - end - br $repeat|0 - unreachable end - unreachable end local.get $0 ) - (func $~lib/array/Array#indexOf (; 41 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 51 ;) (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.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 local.get $3 i32.const 0 i32.eq - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 local.get $3 @@ -3865,7 +2327,7 @@ local.set $2 end local.get $0 - i32.load + i32.load offset=4 local.set $6 block $break|0 loop $continue|0 @@ -3874,22 +2336,12 @@ i32.lt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $6 - local.set $7 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $7 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $6 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $1 i32.eq if @@ -3907,7 +2359,15 @@ end i32.const -1 ) - (func $~lib/array/Array#splice (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#indexOf + i32.const 0 + i32.ge_s + ) + (func $~lib/array/Array#splice (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3917,7 +2377,7 @@ (local $9 i32) (local $10 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 local.get $1 i32.const 0 @@ -3962,38 +2422,35 @@ i32.gt_s select local.set $2 - local.get $0 - i32.load - local.set $6 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $7 - local.get $6 - i32.const 8 - i32.add - local.get $1 - i32.const 2 - i32.shl - i32.add - local.set $8 - block $~lib/memory/memory.copy|inlined.6 - local.get $7 - i32.load - i32.const 8 - i32.add - local.set $4 - local.get $8 - local.set $5 + block $~lib/util/runtime/NEWARRAY|inlined.1 (result i32) local.get $2 - i32.const 2 - i32.shl - local.set $9 + local.set $4 local.get $4 - local.get $5 - local.get $9 - call $~lib/internal/memory/memmove + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray end + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 + local.get $0 + i32.load offset=4 + local.set $8 + local.get $8 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $9 + local.get $6 + i32.load offset=4 + local.get $9 + local.get $2 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy local.get $1 local.get $2 i32.add @@ -4002,137 +2459,78 @@ local.get $10 i32.ne if + local.get $9 local.get $8 - local.set $9 - local.get $6 - i32.const 8 - i32.add local.get $10 i32.const 2 i32.shl i32.add - local.set $5 local.get $3 local.get $10 i32.sub i32.const 2 i32.shl - local.set $4 - local.get $9 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end local.get $0 local.get $3 local.get $2 i32.sub - i32.store offset=4 - local.get $7 + i32.store offset=12 + local.get $6 ) - (func $~lib/array/Array#splice|trampoline (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end + (func $~lib/array/Array#__unchecked_set (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 + i32.load offset=4 local.get $1 + i32.const 2 + i32.shl + i32.add local.get $2 - call $~lib/array/Array#splice + i32.store ) - (func $~lib/array/Array#__set (; 44 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 55 ;) (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 + i32.load offset=12 local.set $3 - local.get $3 - i32.load + local.get $0 + local.get $1 + i32.const 1 + i32.add i32.const 2 - i32.shr_u - local.set $4 + call $~lib/array/ensureCapacity + local.get $0 local.get $1 - local.get $4 - i32.ge_u + local.get $2 + call $~lib/array/Array#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - 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.6 - 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 + i32.store offset=12 end ) - (func $start:std/array~anonymous|0 (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|0 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $~lib/array/Array#findIndex (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 57 ;) (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) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4140,7 +2538,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4152,30 +2550,18 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if local.get $2 return @@ -4191,17 +2577,17 @@ end i32.const -1 ) - (func $start:std/array~anonymous|1 (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|1 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.eq ) - (func $start:std/array~anonymous|2 (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|2 (; 59 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|3 (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|3 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4210,12 +2596,12 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|4 (; 50 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|4 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 100 i32.eq ) - (func $start:std/array~anonymous|5 (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|5 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4223,23 +2609,22 @@ i32.const 100 i32.eq ) - (func $start:std/array~anonymous|6 (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|6 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.ge_s ) - (func $~lib/array/Array#every (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 64 ;) (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) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4247,7 +2632,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4259,23 +2644,13 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4299,12 +2674,12 @@ end i32.const 1 ) - (func $start:std/array~anonymous|7 (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|7 (; 65 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.le_s ) - (func $start:std/array~anonymous|8 (; 55 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|8 (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4313,12 +2688,12 @@ i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|9 (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|9 (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.lt_s ) - (func $start:std/array~anonymous|10 (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|10 (; 68 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4326,23 +2701,22 @@ i32.const 3 i32.lt_s ) - (func $start:std/array~anonymous|11 (; 58 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|11 (; 69 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 3 i32.ge_s ) - (func $~lib/array/Array#some (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 70 ;) (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) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4350,7 +2724,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4362,30 +2736,18 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $2 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 return @@ -4401,12 +2763,12 @@ end i32.const 0 ) - (func $start:std/array~anonymous|12 (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|12 (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const -1 i32.le_s ) - (func $start:std/array~anonymous|13 (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|13 (; 72 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4415,12 +2777,12 @@ i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|14 (; 62 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|14 (; 73 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 10 i32.gt_s ) - (func $start:std/array~anonymous|15 (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|15 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4428,24 +2790,23 @@ i32.const 3 i32.gt_s ) - (func $start:std/array~anonymous|16 (; 64 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|16 (; 75 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $~lib/array/Array#forEach (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) block $break|0 block i32.const 0 local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $3 end loop $repeat|0 @@ -4453,7 +2814,7 @@ local.get $3 local.tee $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $5 local.get $4 local.get $5 @@ -4465,23 +2826,13 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result i32) - local.get $0 - i32.load - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load local.get $2 local.get $0 local.get $1 @@ -4497,7 +2848,7 @@ unreachable end ) - (func $start:std/array~anonymous|17 (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|17 (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4507,13 +2858,13 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|18 (; 67 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|18 (; 78 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|19 (; 68 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|19 (; 79 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $2 call $~lib/array/Array#pop drop @@ -4522,7 +2873,7 @@ i32.add global.set $std/array/i ) - (func $start:std/array~anonymous|20 (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start:std/array~anonymous|20 (; 80 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) local.get $1 i32.const 0 @@ -4617,121 +2968,62 @@ unreachable end unreachable - end - end - local.get $1 - i32.const 2 - i32.eq - if - local.get $0 - i32.const 202 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 559 - i32.const 4 - call $~lib/env/abort - unreachable - end - end - ) - (func $start:std/array~anonymous|21 (; 70 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - local.get $0 - f32.convert_i32_s - ) - (func $~lib/array/Array#constructor (; 71 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.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 + end end - local.get $3 - i32.store - local.get $0 local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.4 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.const 2 + i32.eq + if + local.get $0 + i32.const 202 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 561 + i32.const 4 + call $~lib/builtins/abort + unreachable + end end + ) + (func $start:std/array~anonymous|21 (; 81 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) local.get $0 + f32.convert_i32_s ) - (func $~lib/array/Array#map (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 82 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 f32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - local.get $3 - i32.load + block $~lib/util/runtime/NEWARRAY|inlined.0 (result i32) + local.get $2 + local.set $3 + local.get $3 + i32.const 2 + i32.const 22 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $4 + local.get $4 + i32.load offset=4 + local.set $5 block $break|0 i32.const 0 - local.set $5 + local.set $3 loop $repeat|0 - local.get $5 + local.get $3 local.get $2 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -4740,94 +3032,75 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $4 + block + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load local.set $6 local.get $5 - local.set $7 + local.get $3 + i32.const 2 + i32.shl + i32.add block (result f32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result i32) - local.get $0 - i32.load - local.set $8 - local.get $5 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.get $5 + local.get $6 + local.get $3 local.get $0 local.get $1 call_indirect (type $FUNCSIG$fiii) end - local.set $11 - i32.const 0 - local.set $10 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - f32.store offset=8 + f32.store end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end unreachable end - local.get $3 + local.get $4 ) - (func $~lib/array/Array#__get (; 73 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 84 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - i32.load + i32.const 2 + i32.shl + i32.add + f32.load + ) + (func $~lib/array/Array#__get (; 85 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result f32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - f32.load offset=8 - else + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $start:std/array~anonymous|22 (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|22 (; 86 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -4838,35 +3111,38 @@ global.set $std/array/i local.get $0 ) - (func $~lib/array/Array#map (; 75 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 87 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 - i32.const 0 - local.get $2 - call $~lib/array/Array#constructor - local.set $3 - local.get $3 - i32.load + block $~lib/util/runtime/NEWARRAY|inlined.2 (result i32) + local.get $2 + local.set $3 + local.get $3 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $4 + local.get $4 + i32.load offset=4 + local.set $5 block $break|0 i32.const 0 - local.set $5 + local.set $3 loop $repeat|0 - local.get $5 + local.get $3 local.get $2 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -4875,68 +3151,50 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $4 + block + local.get $0 + i32.load offset=4 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load local.set $6 local.get $5 - local.set $7 + local.get $3 + i32.const 2 + i32.shl + i32.add block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.16 (result i32) - local.get $0 - i32.load - local.set $8 - local.get $5 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.get $5 + local.get $6 + local.get $3 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end - local.set $10 - i32.const 0 - local.set $9 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 + i32.store end - local.get $5 + local.get $3 i32.const 1 i32.add - local.set $5 + local.set $3 br $repeat|0 unreachable end unreachable end - local.get $3 + local.get $4 ) - (func $start:std/array~anonymous|23 (; 76 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|23 (; 88 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|24 (; 77 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|24 (; 89 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -4946,93 +3204,86 @@ global.set $std/array/i local.get $0 ) - (func $start:std/array~anonymous|25 (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|25 (; 90 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.ge_s ) - (func $~lib/array/Array#filter (; 79 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 91 ;) (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) - i32.const 0 - i32.const 0 - call $~lib/array/Array#constructor - local.set $2 + block $~lib/util/runtime/NEWARRAY|inlined.3 (result i32) + i32.const 0 + local.set $2 + local.get $2 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $3 block $break|0 block i32.const 0 - local.set $3 + local.set $2 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $4 end - loop $repeat|0 - local.get $3 - local.get $4 - local.tee $5 - local.get $0 - i32.load offset=4 - local.tee $6 - local.get $5 - local.get $6 - i32.lt_s - select - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.17 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $3 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + loop $repeat|0 + local.get $2 + local.get $4 + local.tee $5 + local.get $0 + i32.load offset=12 + local.tee $6 + local.get $5 + local.get $6 + i32.lt_s + select + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $0 + i32.load offset=4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 block (result i32) i32.const 3 global.set $~lib/argc - local.get $7 - local.get $3 + local.get $5 + local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if - local.get $2 - local.get $7 + local.get $3 + local.get $5 call $~lib/array/Array#push drop end end - local.get $3 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 br $repeat|0 unreachable end unreachable end - local.get $2 + local.get $3 ) - (func $start:std/array~anonymous|26 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|26 (; 92 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 i32.const 100 call $~lib/array/Array#push @@ -5045,7 +3296,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|27 (; 81 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|27 (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) global.get $std/array/i local.get $0 i32.add @@ -5054,7 +3305,7 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|28 (; 82 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start:std/array~anonymous|28 (; 94 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $2 call $~lib/array/Array#pop drop @@ -5066,18 +3317,17 @@ i32.const 2 i32.ge_s ) - (func $start:std/array~anonymous|29 (; 83 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|29 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduce (; 84 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 96 ;) (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 $2 local.set $3 block $break|0 @@ -5085,7 +3335,7 @@ i32.const 0 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 end loop $repeat|0 @@ -5093,7 +3343,7 @@ local.get $5 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -5106,23 +3356,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.18 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $4 - local.set $7 - i32.const 0 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5140,30 +3380,27 @@ end local.get $3 ) - (func $start:std/array~anonymous|30 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|30 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|31 (; 86 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|31 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - local.get $0 + i32.const 1 else local.get $1 i32.const 2 i32.gt_s end ) - (func $~lib/array/Array#reduce (; 87 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 99 ;) (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 $2 local.set $3 block $break|0 @@ -5171,7 +3408,7 @@ i32.const 0 local.set $4 local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $5 end loop $repeat|0 @@ -5179,7 +3416,7 @@ local.get $5 local.tee $6 local.get $0 - i32.load offset=4 + i32.load offset=12 local.tee $7 local.get $6 local.get $7 @@ -5192,23 +3429,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.19 (result i32) - local.get $0 - i32.load - local.set $6 - local.get $4 - local.set $7 - i32.const 0 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5226,19 +3453,17 @@ end local.get $3 ) - (func $start:std/array~anonymous|32 (; 88 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|32 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - local.get $0 + i32.const 1 else local.get $1 i32.const 100 i32.gt_s end ) - (func $start:std/array~anonymous|33 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|33 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -5247,12 +3472,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|34 (; 90 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|34 (; 102 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|35 (; 91 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|35 (; 103 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -5260,22 +3485,19 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|36 (; 92 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|36 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/array/Array#reduceRight (; 93 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 105 ;) (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.get $2 local.set $3 block $break|0 local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $4 @@ -5289,23 +3511,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.20 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $4 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5323,34 +3535,29 @@ end local.get $3 ) - (func $start:std/array~anonymous|37 (; 94 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|37 (; 106 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|38 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|38 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - local.get $0 + i32.const 1 else local.get $1 i32.const 2 i32.gt_s end ) - (func $~lib/array/Array#reduceRight (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 108 ;) (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.get $2 local.set $3 block $break|0 local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $4 @@ -5364,23 +3571,13 @@ i32.const 4 global.set $~lib/argc local.get $3 - block $~lib/internal/arraybuffer/LOAD|inlined.21 (result i32) - local.get $0 - i32.load - local.set $5 - local.get $4 - local.set $6 - i32.const 0 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load local.get $4 local.get $0 local.get $1 @@ -5398,19 +3595,17 @@ end local.get $3 ) - (func $start:std/array~anonymous|39 (; 97 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|39 (; 109 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 - i32.const 0 - i32.ne if (result i32) - local.get $0 + i32.const 1 else local.get $1 i32.const 100 i32.gt_s end ) - (func $start:std/array~anonymous|40 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|40 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 i32.const 1 call $~lib/array/Array#push @@ -5419,12 +3614,12 @@ local.get $1 i32.add ) - (func $start:std/array~anonymous|41 (; 99 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|41 (; 111 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $start:std/array~anonymous|42 (; 100 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start:std/array~anonymous|42 (; 112 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $3 call $~lib/array/Array#pop drop @@ -5432,7 +3627,7 @@ local.get $1 i32.add ) - (func $~lib/math/murmurHash3 (; 101 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 113 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 local.get $0 i64.const 33 @@ -5461,7 +3656,7 @@ local.set $0 local.get $0 ) - (func $~lib/math/splitMix32 (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/math/splitMix32 (; 114 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 1831565813 i32.add @@ -5496,15 +3691,15 @@ i32.shr_u i32.xor ) - (func $~lib/math/NativeMath.seedRandom (; 103 ;) (type $FUNCSIG$vj) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 115 ;) (type $FUNCSIG$vj) (param $0 i64) local.get $0 i64.eqz if i32.const 0 - i32.const 2896 - i32.const 978 + i32.const 3000 + i32.const 1021 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -5525,216 +3720,154 @@ call $~lib/math/splitMix32 global.set $~lib/math/random_state1_32 ) - (func $~lib/internal/sort/insertionSort (; 104 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) + (func $~lib/util/sort/insertionSort (; 116 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 f32) (local $5 i32) - (local $6 i32) + (local $6 f32) (local $7 i32) - (local $8 f32) - (local $9 i32) - (local $10 f32) - (local $11 f32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - f32.load offset=8 - end - local.set $8 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $5 block $break|1 loop $continue|1 - local.get $7 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result f32) - local.get $0 - local.set $6 - local.get $7 - local.set $5 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $10 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $8 - local.get $10 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if local.get $0 - local.set $9 block (result i32) - local.get $7 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $7 - local.get $5 - end - i32.const 1 - i32.add - local.set $5 - local.get $10 - local.set $11 - local.get $1 - local.set $6 - local.get $9 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $11 - f32.store offset=8 - else - br $break|1 - end - end - br $continue|1 - end - end - end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $6 - local.get $7 - i32.const 1 - i32.add - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - f32.store offset=8 + local.set $5 + local.get $7 + end + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + f32.store + else + br $break|1 + end + end + br $continue|1 + end + end end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + f32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 105 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 117 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f32) - (local $13 f32) - (local $14 f32) - (local $15 f32) - local.get $2 + (local $8 f32) + (local $9 f32) + (local $10 f32) + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.1 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.5 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -5744,72 +3877,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result f32) - local.get $0 - local.set $11 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $13 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $12 - local.get $13 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -5817,236 +3930,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $14 - f32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + f32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f32) - local.get $0 - local.set $5 - i32.const 0 - local.set $7 - local.get $1 - local.set $9 - local.get $5 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $9 - i32.const 0 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result f32) - local.get $0 - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $11 - local.get $8 - local.set $7 - local.get $13 - local.set $12 - local.get $1 - local.set $9 - local.get $11 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f32.store offset=8 - end + local.get $0 + f32.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + f32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store i32.const 1 - local.set $9 + local.set $7 block $break|3 loop $continue|3 - local.get $9 + local.get $7 i32.const 1 i32.shl - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $9 + local.get $7 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $7 - local.get $8 + local.tee $6 + local.get $5 i32.lt_s if - local.get $7 - local.set $9 + local.get $6 + local.set $7 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $9 + local.get $7 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f32) - local.get $0 - local.set $11 - i32.const 0 - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - f32.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f32) - local.get $0 - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 + local.get $0 + f32.load + local.set $9 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $8 block (result i32) i32.const 2 global.set $~lib/argc - local.get $13 - local.get $12 - local.get $3 + local.get $9 + local.get $8 + local.get $2 call_indirect (type $FUNCSIG$iff) end i32.const 0 i32.lt_s if - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 @@ -6054,301 +4067,142 @@ i32.add i32.load i32.const 1 - local.get $9 + local.get $7 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $11 - local.get $9 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $14 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f32.store offset=8 - end + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + f32.store + local.get $0 + local.get $8 + f32.store end - local.get $9 + local.get $7 i32.const 1 i32.shr_s - local.set $9 + local.set $7 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.1 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 - end - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f32) - local.get $0 - local.set $8 - i32.const 1 - local.set $7 - local.get $1 - local.set $9 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - f32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $9 - i32.const 1 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result f32) - local.get $0 - local.set $8 - i32.const 0 - local.set $11 - local.get $1 - local.set $10 - local.get $8 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - f32.load offset=8 - end - local.set $13 - local.get $1 - local.set $10 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - local.get $13 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $10 - i32.const 0 - local.set $7 - local.get $15 - local.set $13 - local.get $1 - local.set $9 - local.get $10 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $13 - f32.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + f32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + f32.load + f32.store offset=4 + local.get $0 + local.get $10 + f32.store ) - (func $~lib/array/Array#sort (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 f32) + (local $5 f32) (local $6 i32) - (local $7 f32) - (local $8 f32) - (local $9 f32) - (local $10 i32) + (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 - i32.le_s - if - local.get $0 - return - end - local.get $0 - i32.load - local.set $3 - local.get $2 - i32.const 2 - i32.eq - if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - f32.load offset=8 - end - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f32) - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - f32.load offset=8 - end - local.set $8 - block (result i32) - i32.const 2 - global.set $~lib/argc - local.get $7 - local.get $8 - local.get $1 - call_indirect (type $FUNCSIG$iff) - end - i32.const 0 - i32.lt_s - if - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $9 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - local.get $7 - local.set $9 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $9 - f32.store offset=8 - end - end + i32.le_s + if local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 + i32.const 2 + i32.eq + if local.get $3 + f32.load offset=4 local.set $4 - i32.const 0 + local.get $3 + f32.load local.set $5 + block (result i32) + i32.const 2 + global.set $~lib/argc + local.get $4 + local.get $5 + local.get $1 + call_indirect (type $FUNCSIG$iff) + end + i32.const 0 + i32.lt_s + if + local.get $3 + local.get $5 + f32.store offset=4 + local.get $3 + local.get $4 + f32.store + end + local.get $0 + return + end + block $~lib/util/sort/SORT|inlined.0 + local.get $3 + local.set $8 local.get $2 - local.set $6 + local.set $7 local.get $1 - local.set $10 - local.get $6 + local.set $6 + local.get $7 i32.const 256 i32.lt_s if - local.get $4 - local.get $5 + local.get $8 + local.get $7 local.get $6 - local.get $10 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else - local.get $4 - local.get $5 + local.get $8 + local.get $7 local.get $6 - local.get $10 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 107 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 119 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) local.get $0 @@ -6381,7 +4235,7 @@ i32.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 120 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -6390,9 +4244,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 44 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -6400,30 +4254,22 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/builtins/isNaN (; 109 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 121 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) local.get $0 local.get $0 f32.ne ) - (func $std/array/isArraysEqual (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 122 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.3 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -6484,107 +4330,74 @@ end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 111 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) + (func $~lib/util/sort/insertionSort (; 123 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 f64) (local $5 i32) - (local $6 i32) + (local $6 f64) (local $7 i32) - (local $8 f64) - (local $9 i32) - (local $10 f64) - (local $11 f64) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f64) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - f64.load offset=8 - end - local.set $8 - local.get $4 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $5 block $break|1 loop $continue|1 - local.get $7 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f64) - local.get $0 - local.set $6 - local.get $7 - local.set $5 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $10 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $8 - local.get $10 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if local.get $0 - local.set $9 block (result i32) - local.get $7 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $7 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $10 - local.set $11 - local.get $1 - local.set $6 - local.get $9 - local.get $5 i32.const 3 i32.shl i32.add local.get $6 - i32.add - local.get $11 - f64.store offset=8 + f64.store else br $break|1 end @@ -6593,107 +4406,78 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $0 - local.set $6 - local.get $7 - i32.const 1 - i32.add - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 112 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 124 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - local.get $2 + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.2 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.6 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -6703,72 +4487,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result f64) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f64) - local.get $0 - local.set $11 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 + local.set $7 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $12 - local.get $13 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -6776,236 +4540,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $8 + f64.store + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result f64) - local.get $0 - local.set $5 - i32.const 0 - local.set $7 - local.get $1 - local.set $9 - local.get $5 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $9 - i32.const 0 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f64) - local.get $0 - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $11 - local.get $8 - local.set $7 - local.get $13 - local.set $12 - local.get $1 - local.set $9 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f64.store offset=8 - end - i32.const 1 + local.get $0 + f64.load local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + f64.store + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + i32.const 1 + local.set $7 block $break|3 loop $continue|3 - local.get $9 + local.get $7 i32.const 1 i32.shl - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $9 + local.get $7 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $7 - local.get $8 + local.tee $6 + local.get $5 i32.lt_s if - local.get $7 - local.set $9 + local.get $6 + local.set $7 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $9 + local.get $7 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result f64) - local.get $0 - local.set $11 - i32.const 0 - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f64) - local.get $0 - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 + local.get $0 + f64.load + local.set $9 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 block (result i32) i32.const 2 global.set $~lib/argc - local.get $13 - local.get $12 - local.get $3 + local.get $9 + local.get $8 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 @@ -7013,170 +4677,75 @@ i32.add i32.load i32.const 1 - local.get $9 + local.get $7 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $11 - local.get $9 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + local.get $0 + local.get $8 + f64.store end - local.get $9 + local.get $7 i32.const 1 i32.shr_s - local.set $9 + local.set $7 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 - br $repeat|2 - unreachable - end - unreachable - end - block $~lib/memory/memory.free|inlined.2 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.2 - end - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f64) - local.get $0 - local.set $8 - i32.const 1 - local.set $7 - local.get $1 - local.set $9 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $9 - i32.const 1 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f64) - local.get $0 - local.set $8 - i32.const 0 - local.set $11 - local.get $1 - local.set $10 - local.get $8 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 + local.set $5 + br $repeat|2 + unreachable end - local.set $13 - local.get $1 - local.set $10 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - local.get $13 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $10 - i32.const 0 - local.set $7 - local.get $15 - local.set $13 - local.get $1 - local.set $9 - local.get $10 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $13 - f64.store offset=8 + unreachable end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + f64.load offset=8 + local.set $10 + local.get $0 + local.get $0 + f64.load + f64.store offset=8 + local.get $0 + local.get $10 + f64.store ) - (func $~lib/array/Array#sort (; 113 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 125 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) + (local $4 f64) + (local $5 f64) (local $6 i32) - (local $7 f64) - (local $8 f64) - (local $9 f64) - (local $10 i32) + (local $7 i32) + (local $8 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -7186,128 +4755,64 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result f64) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - f64.load offset=8 - end - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f64) - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - f64.load offset=8 - end - local.set $8 + local.get $3 + f64.load offset=8 + local.set $4 + local.get $3 + f64.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $8 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $8 - local.set $9 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $9 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $6 - i32.const 0 - local.set $5 - local.get $7 - local.set $9 - i32.const 0 - local.set $4 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - local.get $9 - f64.store offset=8 - end + local.get $3 + local.get $5 + f64.store offset=8 + local.get $3 + local.get $4 + f64.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $4 - i32.const 0 - local.set $5 + local.set $8 local.get $2 - local.set $6 + local.set $7 local.get $1 - local.set $10 - local.get $6 + local.set $6 + local.get $7 i32.const 256 i32.lt_s if - local.get $4 - local.get $5 + local.get $8 + local.get $7 local.get $6 - local.get $10 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else - local.get $4 - local.get $5 + local.get $8 + local.get $7 local.get $6 - local.get $10 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 114 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 126 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -7340,7 +4845,7 @@ i64.lt_s i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 115 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -7349,9 +4854,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 45 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -7359,63 +4864,54 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/array/Array#__get (; 116 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 129 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - i32.load + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/array/Array#__get (; 130 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 3 i32.shr_u - i32.lt_u - if (result f64) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - else + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/builtins/isNaN (; 117 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 131 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $std/array/isArraysEqual (; 118 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 132 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 i32.eqz if - block $~lib/array/Array#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $2 local.get $2 - block $~lib/array/Array#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -7476,107 +4972,74 @@ end i32.const 1 ) - (func $~lib/internal/sort/insertionSort (; 119 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 133 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.24 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.25 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -7585,39 +5048,28 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 120 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 134 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -7625,67 +5077,49 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - local.get $2 + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.3 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.3 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.7 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -7695,309 +5129,189 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.26 (result i32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.27 (result i32) - local.get $0 - local.set $10 - local.get $8 - local.set $9 - local.get $1 - local.set $12 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.set $12 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $11 - local.get $12 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - i32.load - i32.const 1 - local.get $8 - i32.const 31 - i32.and - i32.shl - i32.xor - i32.store - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $11 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.13 - local.get $0 - local.set $14 - local.get $5 - local.set $13 - local.get $12 - local.set $10 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end - end - end - local.get $8 - i32.const 1 - i32.sub - local.set $8 - br $repeat|0 - unreachable - end - unreachable - end - block $break|2 - local.get $2 - i32.const 1 - i32.sub - local.set $8 - loop $repeat|2 - local.get $8 - i32.const 2 - i32.ge_s - i32.eqz - br_if $break|2 - block - block $~lib/internal/arraybuffer/LOAD|inlined.28 (result i32) - local.get $0 - local.set $12 - i32.const 0 - local.set $11 - local.get $1 - local.set $5 - local.get $12 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/STORE|inlined.14 - local.get $0 - local.set $11 - i32.const 0 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.29 (result i32) - local.get $0 - local.set $7 - local.get $8 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.15 + i32.load + i32.const 1 + local.get $5 + i32.const 31 + i32.and + i32.shl + i32.xor + i32.store local.get $0 - local.set $9 - local.get $8 - local.set $10 local.get $5 - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $10 i32.const 2 i32.shl i32.add - local.get $11 + local.get $8 + i32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl i32.add - local.get $12 - i32.store offset=8 + local.get $9 + i32.store end + end + local.get $5 + i32.const 1 + i32.sub + local.set $5 + br $repeat|0 + unreachable + end + unreachable + end + block $break|2 + local.get $1 + i32.const 1 + i32.sub + local.set $5 + loop $repeat|2 + local.get $5 + i32.const 2 + i32.ge_s + i32.eqz + br_if $break|2 + block + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store i32.const 1 - local.set $11 + local.set $8 block $break|3 loop $continue|3 - local.get $11 + local.get $8 i32.const 1 i32.shl - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $11 + local.get $8 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $12 - local.get $8 + local.tee $7 + local.get $5 i32.lt_s if - local.get $12 - local.set $11 + local.get $7 + local.set $8 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $11 + local.get $8 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.30 (result i32) - local.get $0 - local.set $10 - i32.const 0 - local.set $9 - local.get $1 - local.set $7 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.31 (result i32) - local.get $0 - local.set $7 - local.get $11 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $5 - local.get $10 - local.get $3 + local.get $9 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 @@ -8005,169 +5319,73 @@ i32.add i32.load i32.const 1 - local.get $11 + local.get $8 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.16 - local.get $0 - local.set $9 - local.get $11 - local.set $7 - local.get $5 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.17 - local.get $0 - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.set $7 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $7 - i32.store offset=8 - end + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store + local.get $0 + local.get $6 + i32.store end - local.get $11 + local.get $8 i32.const 1 i32.shr_s - local.set $11 + local.set $8 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.3 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.3 - end - block $~lib/internal/arraybuffer/LOAD|inlined.32 (result i32) - local.get $0 - local.set $8 - i32.const 1 - local.set $12 - local.get $1 - local.set $11 - local.get $8 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.18 - local.get $0 - local.set $11 - i32.const 1 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.33 (result i32) - local.get $0 - local.set $8 - i32.const 0 - local.set $5 - local.get $1 - local.set $10 - local.get $8 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.19 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $15 - local.set $12 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + i32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + i32.load + i32.store offset=4 + local.get $0 + local.get $10 + i32.store ) - (func $~lib/array/Array#sort (; 121 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 135 ;) (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 $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -8177,103 +5395,41 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 - i32.eq - if - block $~lib/internal/arraybuffer/LOAD|inlined.22 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.23 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + i32.eq + if + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $7 - i32.const 0 local.set $6 local.get $2 local.set $4 @@ -8283,27 +5439,25 @@ i32.const 256 i32.lt_s if - local.get $7 local.get $6 local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else - local.get $7 local.get $6 local.get $4 local.get $5 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 123 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -8312,9 +5466,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 46 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -8322,107 +5476,74 @@ local.get $1 call $~lib/array/Array#sort ) - (func $~lib/internal/sort/insertionSort (; 124 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 138 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -8431,39 +5552,28 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 125 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 139 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -8471,67 +5581,49 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) - local.get $2 + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.4 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.4 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.8 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -8541,72 +5633,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $0 - local.set $10 - local.get $8 - local.set $9 - local.get $1 - local.set $12 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.set $12 + local.set $7 + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $8 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $11 - local.get $12 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -8614,236 +5686,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $11 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $14 - local.get $5 - local.set $13 - local.get $12 - local.set $10 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + local.get $0 + local.get $7 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s i32.eqz br_if $break|2 block - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $0 - local.set $12 - i32.const 0 - local.set $11 - local.get $1 - local.set $5 - local.get $12 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $11 - i32.const 0 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $0 - local.set $7 - local.get $8 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $5 - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 - end + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + i32.store + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store i32.const 1 - local.set $11 + local.set $8 block $break|3 loop $continue|3 - local.get $11 + local.get $8 i32.const 1 i32.shl - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $11 + local.get $8 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $12 - local.get $8 + local.tee $7 + local.get $5 i32.lt_s if - local.get $12 - local.set $11 + local.get $7 + local.set $8 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $11 + local.get $8 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $0 - local.set $10 - i32.const 0 - local.set $9 - local.get $1 - local.set $7 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $0 - local.set $7 - local.get $11 - local.set $9 - local.get $1 - local.set $10 - local.get $7 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $10 + local.get $0 + i32.load + local.set $9 + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $5 - local.get $10 - local.get $3 + local.get $9 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $11 + local.get $4 + local.get $8 i32.const 5 i32.shr_s i32.const 2 @@ -8851,169 +5823,73 @@ i32.add i32.load i32.const 1 - local.get $11 + local.get $8 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $9 - local.get $11 - local.set $7 - local.get $5 - local.set $13 - local.get $1 - local.set $14 - local.get $9 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.set $7 - local.get $1 - local.set $9 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $7 - i32.store offset=8 - end + local.get $0 + local.get $8 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store + local.get $0 + local.get $6 + i32.store end - local.get $11 + local.get $8 i32.const 1 - i32.shr_s - local.set $11 - end - br $continue|4 - end - end - end - end - local.get $8 - i32.const 1 - i32.sub - local.set $8 - br $repeat|2 - unreachable - end - unreachable - end - block $~lib/memory/memory.free|inlined.4 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.4 - end - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $0 - local.set $8 - i32.const 1 - local.set $12 - local.get $1 - local.set $11 - local.get $8 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $11 - i32.const 1 - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $0 - local.set $8 - i32.const 0 - local.set $5 - local.get $1 - local.set $10 - local.get $8 + i32.shr_s + local.set $8 + end + br $continue|4 + end + end + end + end local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 + i32.const 1 + i32.sub + local.set $5 + br $repeat|2 + unreachable end - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $15 - local.set $12 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i32.store offset=8 + unreachable end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + i32.load offset=4 + local.set $10 + local.get $0 + local.get $0 + i32.load + i32.store offset=4 + local.get $0 + local.get $10 + i32.store ) - (func $~lib/array/Array#sort (; 126 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 140 ;) (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 $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -9023,103 +5899,41 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT|inlined.0 + block $~lib/util/sort/SORT|inlined.0 local.get $3 - local.set $7 - i32.const 0 local.set $6 local.get $2 local.set $4 @@ -9129,22 +5943,20 @@ i32.const 256 i32.lt_s if - local.get $7 local.get $6 local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else - local.get $7 local.get $6 local.get $4 local.get $5 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end end local.get $0 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.gt_u @@ -9153,7 +5965,7 @@ i32.lt_u i32.sub ) - (func $~lib/array/Array#sort|trampoline (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort|trampoline (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -9162,9 +5974,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 47 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -9172,36 +5984,61 @@ local.get $1 call $~lib/array/Array#sort ) - (func $std/array/createReverseOrderedArray (; 129 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array.create (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 280 + i32.const 44 + i32.const 62 + call $~lib/builtins/abort + unreachable + end + block $~lib/util/runtime/NEWARRAY|inlined.4 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $2 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.load offset=4 i32.const 0 + local.get $2 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $2 + ) + (func $std/array/createReverseOrderedArray (; 144 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) local.get $0 - call $~lib/array/Array#constructor + call $~lib/array/Array.create local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array#get:length|inlined.43 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 i32.lt_s i32.eqz br_if $break|0 local.get $1 local.get $2 - block $~lib/array/Array#get:length|inlined.44 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 i32.const 1 i32.sub local.get $2 @@ -9218,7 +6055,7 @@ end local.get $1 ) - (func $~lib/math/NativeMath.random (; 130 ;) (type $FUNCSIG$d) (result f64) + (func $~lib/math/NativeMath.random (; 145 ;) (type $FUNCSIG$d) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -9226,10 +6063,10 @@ i32.eqz if i32.const 0 - i32.const 2896 - i32.const 987 + i32.const 3000 + i32.const 1030 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_64 @@ -9275,37 +6112,25 @@ f64.const 1 f64.sub ) - (func $std/array/createRandomOrderedArray (; 131 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 146 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - i32.const 0 local.get $0 - call $~lib/array/Array#constructor + call $~lib/array/Array.create local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array#get:length|inlined.46 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 i32.lt_s i32.eqz br_if $break|0 local.get $1 local.get $2 call $~lib/math/NativeMath.random - block $~lib/array/Array#get:length|inlined.47 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 f64.convert_i32_s f64.mul i32.trunc_f64_s @@ -9321,24 +6146,20 @@ end local.get $1 ) - (func $~lib/internal/sort/COMPARATOR~anonymous|1 (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|1 (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $std/array/isSorted (; 133 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array#get:length|inlined.48 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array#get:length local.set $3 end loop $repeat|0 @@ -9378,7 +6199,7 @@ end i32.const 1 ) - (func $std/array/assertSorted (; 134 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 149 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array#sort @@ -9387,246 +6208,180 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 160 + i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/array/assertSortedDefault (; 135 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/array/assertSortedDefault (; 150 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 - block $~lib/internal/sort/COMPARATOR|inlined.1 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.1 (result i32) i32.const 48 - br $~lib/internal/sort/COMPARATOR|inlined.1 + br $~lib/util/sort/COMPARATOR|inlined.1 end call $std/array/assertSorted ) - (func $start:std/array~anonymous|43 (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|43 (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|44 (; 137 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|44 (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $start:std/array~anonymous|45 (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|45 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 i32.sub ) - (func $start:std/array~anonymous|46 (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|46 (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.sub ) - (func $~lib/array/Array<~lib/array/Array>#constructor (; 140 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array.create<~lib/array/Array> (; 155 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.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 - end - local.get $3 - i32.store local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.9 - local.get $3 - i32.const 8 - i32.add - local.set $4 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u + if i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.const 280 + i32.const 44 + i32.const 62 + call $~lib/builtins/abort + unreachable end - local.get $0 + block $~lib/util/runtime/NEWARRAY<~lib/array/Array>|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 2 + i32.const 24 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $2 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.load offset=4 + i32.const 0 + local.get $2 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $2 ) - (func $~lib/array/Array<~lib/array/Array>#__set (; 141 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_set (; 156 ;) (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 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add local.set $3 local.get $3 i32.load - i32.const 2 - i32.shr_u local.set $4 - local.get $1 + local.get $2 local.get $4 - i32.ge_u + i32.ne if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - 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<~lib/array/Array,~lib/array/Array>|inlined.0 local.get $3 - local.set $5 - local.get $1 - local.set $6 local.get $2 - local.set $7 + i32.store + local.get $4 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 + i32.ne + if + local.get $4 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link end ) - (func $~lib/array/Array<~lib/array/Array>#__get (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/array/Array<~lib/array/Array>#__set (; 157 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + local.set $3 local.get $1 - local.get $2 - i32.load + local.get $3 + i32.gt_u + if + i32.const 0 + i32.const 280 + i32.const 111 + i32.const 38 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 + call $~lib/array/ensureCapacity + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array<~lib/array/Array>#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s + if + local.get $0 local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 + i32.const 1 i32.add - i32.load offset=8 - else - unreachable + i32.store offset=12 end ) - (func $std/array/createReverseOrderedNestedArray (; 143 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 158 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 0 local.get $0 - call $~lib/array/Array<~lib/array/Array>#constructor + call $~lib/array/Array.create<~lib/array/Array> local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array<~lib/array/Array>#get:length|inlined.1 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 i32.lt_s i32.eqz br_if $break|0 block - local.get $1 - local.get $2 - i32.const 0 i32.const 1 - call $~lib/array/Array#constructor - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - local.get $2 - call $~lib/array/Array<~lib/array/Array>#__get + call $~lib/array/Array.create + local.set $3 + local.get $3 i32.const 0 - block $~lib/array/Array<~lib/array/Array>#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 i32.const 1 i32.sub local.get $2 i32.sub call $~lib/array/Array#__set + local.get $1 + local.get $2 + local.get $3 + call $~lib/array/Array<~lib/array/Array>#__set end local.get $2 i32.const 1 @@ -9639,7 +6394,7 @@ end local.get $1 ) - (func $start:std/array~anonymous|47 (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|47 (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.const 0 call $~lib/array/Array#__get @@ -9648,168 +6403,120 @@ call $~lib/array/Array#__get i32.sub ) - (func $~lib/internal/sort/insertionSort<~lib/array/Array> (; 145 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort<~lib/array/Array> (; 160 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.4 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 - else - br $break|1 - end - end - br $continue|1 - end - end - end - block $~lib/internal/arraybuffer/STORE<~lib/array/Array,~lib/array/Array>|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store + else + br $break|1 + end + end + br $continue|1 + end + end end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array<~lib/array/Array>#sort (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#sort (; 161 ;) (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 $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -9819,129 +6526,106 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.1 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.2 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE<~lib/array/Array,~lib/array/Array>|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE<~lib/array/Array,~lib/array/Array>|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT<~lib/array/Array>|inlined.0 + block $~lib/util/sort/SORT<~lib/array/Array>|inlined.0 local.get $3 - local.set $7 - i32.const 0 local.set $6 local.get $2 local.set $4 local.get $1 local.set $5 - local.get $7 local.get $6 local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort<~lib/array/Array> + call $~lib/util/sort/insertionSort<~lib/array/Array> + end + local.get $0 + ) + (func $~lib/array/Array<~lib/array/Array>#get:length (; 162 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array<~lib/array/Array>#__unchecked_get (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/array/Array<~lib/array/Array>#__get (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable end local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted<~lib/array/Array> (; 147 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/array/Array> (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array<~lib/array/Array>#get:length|inlined.3 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array<~lib/array/Array>#get:length local.set $3 end loop $repeat|0 @@ -9981,7 +6665,7 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/array/Array> (; 148 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/array/Array> (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array<~lib/array/Array>#sort @@ -9990,80 +6674,58 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 160 + i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/array/Array>#constructor (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array.create> (; 167 ;) (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 $1 - i32.const 268435454 + local.get $0 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort + i32.const 280 + i32.const 44 + i32.const 62 + call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + block $~lib/util/runtime/NEWARRAY>|inlined.0 (result i32) local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.10 - local.get $3 - i32.const 8 - i32.add - local.set $4 + local.set $1 + local.get $1 + i32.const 2 + i32.const 26 i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset + call $~lib/util/runtime/makeArray end - local.get $0 + local.set $2 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.load offset=4 + i32.const 0 + local.get $2 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $2 ) - (func $std/array/Proxy#constructor (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.eqz if i32.const 4 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -10071,104 +6733,95 @@ i32.store local.get $0 ) - (func $~lib/array/Array>#__set (; 151 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__unchecked_set (; 169 ;) (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 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add local.set $3 local.get $3 i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne + if + local.get $3 + local.get $2 + i32.store + local.get $4 + i32.const 0 + i32.ne + if + local.get $4 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + end + ) + (func $~lib/array/Array>#__set (; 170 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + local.get $3 + i32.gt_u + if + i32.const 0 + i32.const 280 + i32.const 111 + i32.const 38 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add i32.const 2 - i32.shr_u - local.set $4 + call $~lib/array/ensureCapacity + local.get $0 local.get $1 - local.get $4 - i32.ge_u + local.get $2 + call $~lib/array/Array>#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 8 - 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,std/array/Proxy>|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 + i32.store offset=12 end ) - (func $std/array/createReverseOrderedElementsArray (; 152 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 171 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - (local $3 i32) - i32.const 0 local.get $0 - call $~lib/array/Array>#constructor + call $~lib/array/Array.create> local.set $1 block $break|0 i32.const 0 local.set $2 loop $repeat|0 local.get $2 - block $~lib/array/Array>#get:length|inlined.1 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 i32.lt_s i32.eqz br_if $break|0 local.get $1 local.get $2 i32.const 0 - block $~lib/array/Array>#get:length|inlined.2 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 i32.const 1 i32.sub local.get $2 @@ -10186,114 +6839,81 @@ end local.get $1 ) - (func $start:std/array~anonymous|48 (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $start:std/array~anonymous|48 (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.sub ) - (func $~lib/internal/sort/insertionSort> (; 154 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort> (; 173 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD,std/array/Proxy>|inlined.2 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD,std/array/Proxy>|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -10302,59 +6922,44 @@ end end end - block $~lib/internal/arraybuffer/STORE,std/array/Proxy>|inlined.4 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array>#sort (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 174 ;) (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 $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -10364,162 +6969,106 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD,std/array/Proxy>|inlined.0 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD,std/array/Proxy>|inlined.1 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE,std/array/Proxy>|inlined.1 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE,std/array/Proxy>|inlined.2 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT>|inlined.0 + block $~lib/util/sort/SORT>|inlined.0 local.get $3 - local.set $7 - i32.const 0 local.set $6 local.get $2 local.set $4 local.get $1 local.set $5 - local.get $7 local.get $6 local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort> + call $~lib/util/sort/insertionSort> end local.get $0 ) - (func $~lib/array/Array>#__get (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array>#get:length (; 175 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array>#__unchecked_get (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array>#__get (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 280 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array>#__unchecked_get ) - (func $std/array/isSorted> (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array>#get:length|inlined.3 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array>#get:length local.set $3 end loop $repeat|0 @@ -10559,7 +7108,7 @@ end i32.const 1 ) - (func $std/array/assertSorted> (; 158 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 179 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 call $~lib/array/Array>#sort @@ -10568,114 +7117,81 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 160 + i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/sort/insertionSort<~lib/string/String> (; 159 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort<~lib/string/String | null> (; 180 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD<~lib/string/String,~lib/string/String>|inlined.2 (result i32) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 - local.get $4 + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $6 + local.set $5 block $break|1 loop $continue|1 - local.get $6 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD<~lib/string/String,~lib/string/String>|inlined.3 (result i32) - local.get $0 - local.set $5 - local.get $6 - local.set $8 - local.get $1 - local.set $9 - local.get $5 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - i32.load offset=8 - end - local.set $9 + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $7 - local.get $9 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if local.get $0 - local.set $8 block (result i32) - local.get $6 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $6 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $8 - local.get $5 i32.const 2 i32.shl i32.add - local.get $11 - i32.add - local.get $10 - i32.store offset=8 + local.get $6 + i32.store else br $break|1 end @@ -10684,59 +7200,44 @@ end end end - block $~lib/internal/arraybuffer/STORE<~lib/string/String,~lib/string/String>|inlined.3 - local.get $0 - local.set $9 - local.get $6 - i32.const 1 - i32.add - local.set $11 - local.get $7 - local.set $10 - local.get $1 - local.set $5 - local.get $9 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - local.get $10 - i32.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/array/Array<~lib/string/String>#sort (; 160 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#sort (; 181 ;) (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 $8 i32) - (local $9 i32) local.get $1 i32.eqz if i32.const 0 - i32.const 8 - i32.const 395 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 local.get $2 i32.const 1 @@ -10746,162 +7247,94 @@ return end local.get $0 - i32.load + i32.load offset=4 local.set $3 local.get $2 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD<~lib/string/String,~lib/string/String>|inlined.0 (result i32) - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - i32.const 0 - local.set $6 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - i32.load offset=8 - end - local.set $6 - block $~lib/internal/arraybuffer/LOAD<~lib/string/String,~lib/string/String>|inlined.1 (result i32) - local.get $3 - local.set $5 - i32.const 0 - local.set $4 - i32.const 0 - local.set $7 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 block (result i32) i32.const 2 global.set $~lib/argc - local.get $6 - local.get $7 + local.get $4 + local.get $5 local.get $1 call_indirect (type $FUNCSIG$iii) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE<~lib/string/String,~lib/string/String>|inlined.0 - local.get $3 - local.set $4 - i32.const 1 - local.set $5 - local.get $7 - local.set $8 - i32.const 0 - local.set $9 - local.get $4 - local.get $5 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE<~lib/string/String,~lib/string/String>|inlined.1 - local.get $3 - local.set $9 - i32.const 0 - local.set $8 - local.get $6 - local.set $5 - i32.const 0 - local.set $4 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store end local.get $0 return end - block $~lib/internal/sort/SORT<~lib/string/String>|inlined.0 + block $~lib/util/sort/SORT<~lib/string/String | null>|inlined.0 local.get $3 - local.set $7 - i32.const 0 local.set $6 local.get $2 local.set $4 local.get $1 local.set $5 - local.get $7 local.get $6 local.get $4 local.get $5 - call $~lib/internal/sort/insertionSort<~lib/string/String> + call $~lib/util/sort/insertionSort<~lib/string/String | null> end local.get $0 ) - (func $~lib/array/Array<~lib/string/String>#__get (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String | null>#get:length (; 182 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array<~lib/string/String | null>#__unchecked_get (; 183 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array<~lib/string/String | null>#__get (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String | null>#__unchecked_get ) - (func $std/array/isSorted<~lib/string/String> (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted<~lib/string/String | null> (; 185 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) block $break|0 block i32.const 1 local.set $2 - block $~lib/array/Array<~lib/string/String>#get:length|inlined.0 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end + local.get $0 + call $~lib/array/Array<~lib/string/String | null>#get:length local.set $3 end loop $repeat|0 @@ -10917,10 +7350,10 @@ local.get $2 i32.const 1 i32.sub - call $~lib/array/Array<~lib/string/String>#__get + call $~lib/array/Array<~lib/string/String | null>#__get local.get $0 local.get $2 - call $~lib/array/Array<~lib/string/String>#__get + call $~lib/array/Array<~lib/string/String | null>#__get local.get $1 call_indirect (type $FUNCSIG$iii) end @@ -10941,23 +7374,31 @@ end i32.const 1 ) - (func $std/array/assertSorted<~lib/string/String> (; 163 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted<~lib/string/String | null> (; 186 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $0 local.get $1 - call $~lib/array/Array<~lib/string/String>#sort + call $~lib/array/Array<~lib/string/String | null>#sort local.get $1 - call $std/array/isSorted<~lib/string/String> + call $std/array/isSorted<~lib/string/String | null> i32.eqz if i32.const 0 - i32.const 120 - i32.const 810 + i32.const 160 + i32.const 813 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/string/compareUnsafe (; 164 ;) (type $FUNCSIG$iiiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) (result i32) + (func $~lib/string/String#get:length (; 187 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 188 ;) (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) @@ -10980,14 +7421,14 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -11008,203 +7449,567 @@ end end end - local.get $5 + local.get $5 + ) + (func $~lib/util/sort/COMPARATOR<~lib/string/String | null>~anonymous|0 (; 189 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 1 + else + local.get $0 + i32.const 0 + i32.eq + end + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $1 + call $~lib/string/String#get:length + local.set $3 + local.get $2 + i32.eqz + if (result i32) + local.get $3 + i32.eqz + else + i32.const 0 + end + if + i32.const 0 + return + end + local.get $2 + i32.eqz + if + i32.const -1 + return + end + local.get $3 + i32.eqz + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + call $~lib/util/string/compareImpl + ) + (func $std/array/assertSorted<~lib/string/String | null>|trampoline (; 190 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end + unreachable + end + block $~lib/util/sort/COMPARATOR<~lib/string/String | null>|inlined.0 (result i32) + i32.const 55 + br $~lib/util/sort/COMPARATOR<~lib/string/String | null>|inlined.0 + end + local.set $1 + end + local.get $0 + local.get $1 + call $std/array/assertSorted<~lib/string/String | null> + ) + (func $~lib/string/String.__eq (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $~lib/string/String.__ne (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/string/String.__eq + i32.eqz + ) + (func $std/array/isArraysEqual<~lib/string/String | null> (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + local.get $2 + i32.eqz + if + local.get $0 + call $~lib/array/Array<~lib/string/String | null>#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/array/Array<~lib/string/String | null>#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + end + block $break|0 + i32.const 0 + local.set $3 + loop $repeat|0 + local.get $3 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $0 + local.get $3 + call $~lib/array/Array<~lib/string/String | null>#__get + local.get $1 + local.get $3 + call $~lib/array/Array<~lib/string/String | null>#__get + call $~lib/string/String.__ne + if + i32.const 0 + return + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $repeat|0 + unreachable + end + unreachable + end + i32.const 1 + ) + (func $~lib/array/Array.create<~lib/string/String> (; 194 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.const 2 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 280 + i32.const 44 + i32.const 62 + call $~lib/builtins/abort + unreachable + end + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.0 (result i32) + local.get $0 + local.set $1 + local.get $1 + i32.const 2 + i32.const 28 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $2 + local.get $2 + i32.const 0 + i32.store offset=12 + local.get $2 + i32.load offset=4 + i32.const 0 + local.get $2 + i32.load offset=8 + call $~lib/memory/memory.fill + local.get $2 + ) + (func $~lib/string/String#charAt (; 195 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 0 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 4384 + i32.const 47 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $0 + call $~lib/string/String#get:length + i32.ge_u + if + i32.const 4208 + return + end + i32.const 2 + call $~lib/util/runtime/allocate + local.set $2 + local.get $2 + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.store16 + local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 local.get $1 + i32.const 0 i32.eq - local.tee $2 - if (result i32) - local.get $2 - else - local.get $0 - i32.const 0 - i32.eq - end - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.const 0 - i32.eq - end if - i32.const 0 - return + i32.const 4432 + local.set $1 end local.get $0 - i32.load - local.set $3 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $2 local.get $1 - i32.load - local.set $4 - local.get $3 - i32.eqz - local.tee $2 - if (result i32) - local.get $4 - i32.eqz - else - local.get $2 - end - if - i32.const 0 - return - end + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + local.get $2 local.get $3 - i32.eqz - if - i32.const -1 - return - end + i32.add + local.set $4 local.get $4 - i32.eqz + i32.const 0 + i32.eq if - i32.const 1 + i32.const 4208 return end + local.get $4 + call $~lib/util/runtime/allocate + local.set $5 + local.get $5 local.get $0 - i32.const 0 + local.get $2 + call $~lib/memory/memory.copy + local.get $5 + local.get $2 + i32.add local.get $1 - i32.const 0 local.get $3 - local.tee $2 - local.get $4 - local.tee $5 - local.get $2 + call $~lib/memory/memory.copy local.get $5 - i32.lt_s + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/string/String.__concat (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 4432 + local.get $0 + i32.const 0 + i32.ne select - call $~lib/internal/string/compareUnsafe + local.get $1 + call $~lib/string/String#concat ) - (func $std/array/assertSorted<~lib/string/String>|trampoline (; 166 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange + (func $std/array/createRandomString (; 198 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 f64) + i32.const 4208 + local.set $1 + block $break|0 + i32.const 0 + local.set $2 + loop $repeat|0 + local.get $2 + local.get $0 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $1 + global.get $std/array/charset + block $~lib/math/NativeMath.floor|inlined.0 (result f64) + call $~lib/math/NativeMath.random + global.get $std/array/charset + call $~lib/string/String#get:length + f64.convert_i32_s + f64.mul + local.set $3 + local.get $3 + f64.floor end + i32.trunc_f64_s + call $~lib/string/String#charAt + call $~lib/string/String.__concat + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 unreachable end - block $~lib/internal/sort/COMPARATOR<~lib/string/String>|inlined.0 (result i32) - i32.const 55 - br $~lib/internal/sort/COMPARATOR<~lib/string/String>|inlined.0 - end - local.set $1 + unreachable end - local.get $0 local.get $1 - call $std/array/assertSorted<~lib/string/String> ) - (func $~lib/string/String.__eq (; 167 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 199 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) + (local $4 i32) local.get $0 + i32.load offset=4 local.get $1 - i32.eq + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne if - i32.const 1 - return - end - local.get $0 - i32.const 0 - i32.eq - local.tee $2 - if (result i32) + local.get $3 local.get $2 - else - local.get $1 - i32.const 0 - i32.eq - end - if + i32.store + local.get $4 i32.const 0 - return + i32.ne + if + local.get $4 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link end + ) + (func $~lib/array/Array<~lib/string/String>#__set (; 200 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) local.get $0 - i32.load + i32.load offset=12 local.set $3 - local.get $3 local.get $1 - i32.load - i32.ne + local.get $3 + i32.gt_u if i32.const 0 - return + i32.const 280 + i32.const 111 + i32.const 38 + call $~lib/builtins/abort + unreachable end local.get $0 - i32.const 0 local.get $1 - i32.const 0 - local.get $3 - call $~lib/internal/string/compareUnsafe - i32.eqz - ) - (func $~lib/string/String.__ne (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity local.get $0 local.get $1 - call $~lib/string/String.__eq - i32.eqz - ) - (func $std/array/isArraysEqual<~lib/string/String> (; 169 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) local.get $2 - i32.eqz + call $~lib/array/Array<~lib/string/String>#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s if - block $~lib/array/Array<~lib/string/String>#get:length|inlined.1 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=4 - end - local.set $2 - local.get $2 - block $~lib/array/Array<~lib/string/String>#get:length|inlined.3 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end - i32.ne - if - i32.const 0 - return - end local.get $0 local.get $1 - i32.eq - if + i32.const 1 + i32.add + i32.store offset=12 + end + ) + (func $std/array/createRandomStringArray (; 201 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + call $~lib/array/Array.create<~lib/string/String> + local.set $1 + block $break|0 + i32.const 0 + local.set $2 + loop $repeat|0 + local.get $2 + local.get $0 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $1 + local.get $2 + call $~lib/math/NativeMath.random + f64.const 32 + f64.mul + i32.trunc_f64_s + call $std/array/createRandomString + call $~lib/array/Array<~lib/string/String>#__set + local.get $2 i32.const 1 - return + i32.add + local.set $2 + br $repeat|0 + unreachable end + unreachable end + local.get $1 + ) + (func $~lib/util/sort/insertionSort<~lib/string/String> (; 202 ;) (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) block $break|0 i32.const 0 local.set $3 loop $repeat|0 local.get $3 - local.get $2 + local.get $1 i32.lt_s i32.eqz br_if $break|0 - local.get $0 - local.get $3 - call $~lib/array/Array<~lib/string/String>#__get - local.get $1 - local.get $3 - call $~lib/array/Array<~lib/string/String>#__get - call $~lib/string/String.__ne - if - i32.const 0 - return + block + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $4 + local.get $3 + i32.const 1 + i32.sub + local.set $5 + block $break|1 + loop $continue|1 + local.get $5 + i32.const 0 + i32.ge_s + if + block + local.get $0 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + block (result i32) + i32.const 2 + global.set $~lib/argc + local.get $4 + local.get $6 + local.get $2 + call_indirect (type $FUNCSIG$iii) + end + i32.const 0 + i32.lt_s + if + local.get $0 + block (result i32) + local.get $5 + local.tee $7 + i32.const 1 + i32.sub + local.set $5 + local.get $7 + end + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store + else + br $break|1 + end + end + br $continue|1 + end + end + end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $4 + i32.store end local.get $3 i32.const 1 @@ -11215,273 +8020,162 @@ end unreachable end - i32.const 1 ) - (func $~lib/array/Array<~lib/string/String>#constructor (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#sort (; 203 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.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 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.11 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/internal/string/allocateUnsafe (; 171 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if (result i32) - local.get $0 - i32.const 536870910 - i32.le_s - else - local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.5 (result i32) - i32.const 4 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.5 - end - local.set $2 - local.get $2 - local.get $0 - i32.store - local.get $2 - ) - (func $~lib/string/String#charAt (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $0 - i32.const 0 - i32.ne i32.eqz if i32.const 0 - i32.const 4056 - i32.const 58 + i32.const 280 + i32.const 528 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 - i32.load - i32.ge_u - if - i32.const 3904 - return - end - i32.const 1 - call $~lib/internal/string/allocateUnsafe + i32.load offset=12 local.set $2 local.get $2 - local.get $0 - local.get $1 i32.const 1 - i32.shl - i32.add - i32.load16_u offset=4 - i32.store16 offset=4 - local.get $2 - ) - (func $~lib/internal/string/copyUnsafe (; 173 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + i32.le_s + if + local.get $0 + return + end local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $5 + i32.load offset=4 + local.set $3 local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - ) - (func $~lib/string/String#concat (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz + i32.const 2 + i32.eq if + local.get $3 + i32.load offset=4 + local.set $4 + local.get $3 + i32.load + local.set $5 + block (result i32) + i32.const 2 + global.set $~lib/argc + local.get $4 + local.get $5 + local.get $1 + call_indirect (type $FUNCSIG$iii) + end i32.const 0 - i32.const 4056 - i32.const 110 - i32.const 4 - call $~lib/env/abort - unreachable + i32.lt_s + if + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store + end + local.get $0 + return end - local.get $1 - i32.const 0 - i32.eq - if - i32.const 4144 - local.set $1 + block $~lib/util/sort/SORT<~lib/string/String>|inlined.0 + local.get $3 + local.set $6 + local.get $2 + local.set $4 + local.get $1 + local.set $5 + local.get $6 + local.get $4 + local.get $5 + call $~lib/util/sort/insertionSort<~lib/string/String> end local.get $0 - i32.load - local.set $2 + ) + (func $~lib/array/Array<~lib/string/String>#get:length (; 204 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 local.get $1 - i32.load - local.set $3 - local.get $2 - local.get $3 + i32.const 2 + i32.shl i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.eq + i32.load + ) + (func $~lib/array/Array<~lib/string/String>#__get (; 206 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u if - i32.const 3904 - return + i32.const 0 + i32.const 280 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable end - local.get $4 - call $~lib/internal/string/allocateUnsafe - local.set $5 - local.get $5 - i32.const 0 - local.get $0 - i32.const 0 - local.get $2 - call $~lib/internal/string/copyUnsafe - local.get $5 - local.get $2 local.get $1 - i32.const 0 - local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $5 - ) - (func $~lib/string/String.__concat (; 175 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u if - i32.const 4144 - local.set $0 + i32.const 0 + i32.const 280 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable end local.get $0 local.get $1 - call $~lib/string/String#concat + call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $std/array/createRandomString (; 176 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $std/array/isSorted<~lib/string/String> (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 f64) - i32.const 3904 - local.set $1 + (local $3 i32) block $break|0 - i32.const 0 - local.set $2 + block + i32.const 1 + local.set $2 + local.get $0 + call $~lib/array/Array<~lib/string/String>#get:length + local.set $3 + end loop $repeat|0 local.get $2 - local.get $0 + local.get $3 i32.lt_s i32.eqz br_if $break|0 - local.get $1 - global.get $std/array/charset - block $~lib/math/NativeMath.floor|inlined.0 (result f64) - call $~lib/math/NativeMath.random - global.get $std/array/charset - i32.load - f64.convert_i32_s - f64.mul - local.set $3 - local.get $3 - f64.floor + block (result i32) + i32.const 2 + global.set $~lib/argc + local.get $0 + local.get $2 + i32.const 1 + i32.sub + call $~lib/array/Array<~lib/string/String>#__get + local.get $0 + local.get $2 + call $~lib/array/Array<~lib/string/String>#__get + local.get $1 + call_indirect (type $FUNCSIG$iii) + end + i32.const 0 + i32.gt_s + if + i32.const 0 + return end - i32.trunc_f64_s - call $~lib/string/String#charAt - call $~lib/string/String.__concat - local.set $1 local.get $2 i32.const 1 i32.add @@ -11491,117 +8185,116 @@ end unreachable end + i32.const 1 + ) + (func $std/array/assertSorted<~lib/string/String> (; 208 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 local.get $1 + call $~lib/array/Array<~lib/string/String>#sort + local.get $1 + call $std/array/isSorted<~lib/string/String> + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 813 + i32.const 2 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/array/Array<~lib/string/String>#__set (; 177 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/sort/COMPARATOR<~lib/string/String>~anonymous|0 (; 209 ;) (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 $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 8 - i32.const 107 - i32.const 41 - call $~lib/env/abort - unreachable - end - local.get $3 - local.get $1 + i32.eq + if (result i32) 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 + else local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.store offset=4 + i32.const 0 + i32.eq end - block $~lib/internal/arraybuffer/STORE<~lib/string/String,~lib/string/String>|inlined.4 - local.get $3 - local.set $5 + if (result i32) + i32.const 1 + else 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 + i32.eq + end + if + i32.const 0 + return end - ) - (func $std/array/createRandomStringArray (; 178 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 0 local.get $0 - call $~lib/array/Array<~lib/string/String>#constructor - local.set $1 - block $break|0 + call $~lib/string/String#get:length + local.set $2 + local.get $1 + call $~lib/string/String#get:length + local.set $3 + local.get $2 + i32.eqz + if (result i32) + local.get $3 + i32.eqz + else i32.const 0 - local.set $2 - loop $repeat|0 - local.get $2 - block $~lib/array/Array<~lib/string/String>#get:length|inlined.5 (result i32) - local.get $1 - local.set $3 - local.get $3 - i32.load offset=4 - end - i32.lt_s - i32.eqz - br_if $break|0 - local.get $1 - local.get $2 - call $~lib/math/NativeMath.random - f64.const 32 - f64.mul - i32.trunc_f64_s - call $std/array/createRandomString - call $~lib/array/Array<~lib/string/String>#__set - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 + end + if + i32.const 0 + return + end + local.get $2 + i32.eqz + if + i32.const -1 + return + end + local.get $3 + i32.eqz + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + call $~lib/util/string/compareImpl + ) + (func $std/array/assertSorted<~lib/string/String>|trampoline (; 210 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + block $1of1 + block $0of1 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of1 $1of1 $outOfRange + end unreachable end - unreachable + block $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 (result i32) + i32.const 56 + br $~lib/util/sort/COMPARATOR<~lib/string/String>|inlined.0 + end + local.set $1 end + local.get $0 local.get $1 + call $std/array/assertSorted<~lib/string/String> ) - (func $~lib/string/String#substring (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#substring (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11616,14 +8309,14 @@ i32.eqz if i32.const 0 - i32.const 4056 - i32.const 254 + i32.const 4384 + i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $1 local.tee $4 @@ -11665,6 +8358,8 @@ local.get $5 i32.lt_s select + i32.const 1 + i32.shl local.set $8 local.get $6 local.tee $4 @@ -11674,6 +8369,8 @@ local.get $5 i32.gt_s select + i32.const 1 + i32.shl local.set $9 local.get $9 local.get $8 @@ -11682,36 +8379,73 @@ local.get $3 i32.eqz if - i32.const 3904 + i32.const 4208 return end local.get $8 i32.eqz - local.tee $4 if (result i32) local.get $9 local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl i32.eq else - local.get $4 + i32.const 0 end if local.get $0 return end local.get $3 - call $~lib/internal/string/allocateUnsafe + call $~lib/util/runtime/allocate local.set $10 local.get $10 - i32.const 0 local.get $0 local.get $8 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $10 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/util/runtime/discard (; 212 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 115 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 117 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free ) - (func $~lib/array/Array#join (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_bool (; 213 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11721,13 +8455,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -11735,210 +8464,162 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - i32.const 4184 - i32.const 4200 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end - i32.const 0 - i32.ne + i32.const 4480 + i32.const 4504 + local.get $3 + i32.load8_u select return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 5 - local.set $10 - local.get $10 - local.get $6 + local.set $5 + local.get $5 + local.get $4 i32.add local.get $2 i32.mul - local.get $10 + local.get $5 i32.add - local.set $9 - local.get $9 - call $~lib/internal/string/allocateUnsafe - local.set $8 + local.set $6 + local.get $6 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $7 i32.const 0 - local.set $11 + local.set $8 block $break|0 i32.const 0 - local.set $12 + local.set $10 loop $repeat|0 - local.get $12 + local.get $10 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $13 - local.get $12 - local.set $14 - i32.const 0 - local.set $15 - local.get $13 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $15 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $10 + i32.add + i32.load8_u + local.set $9 i32.const 4 - local.get $4 + local.get $9 i32.const 0 i32.ne i32.eqz i32.add - local.set $10 + local.set $5 + local.get $7 local.get $8 - local.get $11 - i32.const 4184 - i32.const 4200 - local.get $4 - i32.const 0 - i32.ne + i32.const 1 + i32.shl + i32.add + i32.const 4480 + i32.const 4504 + local.get $9 select - i32.const 0 - local.get $10 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $10 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + local.get $5 i32.add - local.set $11 - local.get $7 + local.set $8 + local.get $4 if + local.get $7 local.get $8 - local.get $11 + i32.const 1 + i32.shl + i32.add local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $6 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + local.get $4 i32.add - local.set $11 + local.set $8 end end - local.get $12 + local.get $10 i32.const 1 i32.add - local.set $12 + local.set $10 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $2 - local.set $15 - i32.const 0 - local.set $14 - local.get $12 - local.get $15 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.set $4 + local.get $3 + local.get $2 + i32.add + i32.load8_u + local.set $9 i32.const 4 - local.get $4 + local.get $9 i32.const 0 i32.ne i32.eqz i32.add - local.set $10 + local.set $5 + local.get $7 local.get $8 - local.get $11 - i32.const 4184 - i32.const 4200 - local.get $4 - i32.const 0 - i32.ne + i32.const 1 + i32.shl + i32.add + i32.const 4480 + i32.const 4504 + local.get $9 select - i32.const 0 - local.get $10 - call $~lib/internal/string/copyUnsafe - local.get $11 - local.get $10 + local.get $5 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 + local.get $5 i32.add - local.set $11 + local.set $8 + local.get $6 local.get $8 - local.set $14 - local.get $9 - local.get $11 i32.gt_s if - local.get $8 + local.get $7 i32.const 0 - local.get $11 + local.get $8 call $~lib/string/String#substring - local.set $14 - block $~lib/internal/string/freeUnsafe|inlined.0 - local.get $8 - local.set $15 - local.get $15 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.5 - local.get $15 - local.set $12 - local.get $12 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.5 - end - end + local.set $10 + local.get $7 + call $~lib/util/runtime/discard + local.get $10 + return end - local.get $14 + local.get $7 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_bool return ) - (func $~lib/internal/number/decimalCount32 (; 181 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 215 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -12007,19 +8688,16 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 182 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 216 ;) (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 $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - i32.const 4832 - i32.load + (local $8 i64) + (local $9 i64) + i32.const 5096 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -12046,40 +8724,20 @@ i32.const 100 i32.rem_u local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $3 - local.set $8 - local.get $6 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i64.load32_u offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $3 - local.set $10 - local.get $7 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i64.load32_u offset=8 - end - local.set $12 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 local.get $2 i32.const 4 i32.sub @@ -12089,12 +8747,12 @@ i32.const 1 i32.shl i32.add - local.get $11 - local.get $12 + local.get $8 + local.get $9 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -12118,30 +8776,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $3 - local.set $5 - local.get $6 - local.set $4 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 - i32.store offset=4 + local.get $5 + i32.store end local.get $1 i32.const 10 @@ -12151,30 +8799,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result i32) - local.get $3 - local.set $8 - local.get $1 - local.set $6 - i32.const 0 - local.set $7 - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store offset=4 + local.get $5 + i32.store else local.get $2 i32.const 1 @@ -12183,17 +8821,17 @@ i32.const 48 local.get $1 i32.add - local.set $7 + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store16 offset=4 + local.get $5 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 183 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 217 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12203,7 +8841,7 @@ local.get $0 i32.eqz if - i32.const 4312 + i32.const 4656 return end local.get $0 @@ -12218,39 +8856,43 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 local.get $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $3 - block $~lib/internal/number/utoa32_core|inlined.0 + block $~lib/util/number/utoa32_core|inlined.0 local.get $3 - local.set $4 + local.set $6 local.get $0 local.set $5 local.get $2 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 - call $~lib/internal/number/utoa32_lut + local.get $5 + local.get $4 + call $~lib/util/number/utoa32_lut end local.get $1 if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa (; 184 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 return ) - (func $~lib/internal/number/itoa_stream (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12267,7 +8909,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -12285,31 +8927,31 @@ local.set $2 end local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.1 + block $~lib/util/number/utoa32_core|inlined.1 local.get $0 - local.set $5 + local.set $7 local.get $2 local.set $6 local.get $3 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 - call $~lib/internal/number/utoa32_lut + local.get $6 + local.get $5 + call $~lib/util/number/utoa32_lut end local.get $4 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 186 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12318,13 +8960,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -12332,174 +8969,128 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.34 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 11 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 11 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $11 + local.set $9 loop $repeat|0 - local.get $11 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.35 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $8 + local.get $3 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + i32.const 2 + i32.shl i32.add + i32.load local.set $8 local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $4 if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 local.get $6 + local.get $7 + i32.const 1 + i32.shl i32.add - local.set $8 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 end end - local.get $11 + local.get $9 i32.const 1 i32.add - local.set $11 + local.set $9 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.36 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $3 + local.get $2 + i32.const 2 + i32.shl i32.add + i32.load local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $7 + local.get $6 + local.get $7 local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $5 + local.get $7 i32.gt_s if - local.get $9 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.1 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.6 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.6 - end - end + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $13 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 221 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/utoa32 (; 187 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 222 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -12508,35 +9099,39 @@ local.get $0 i32.eqz if - i32.const 4312 + i32.const 4656 return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $2 - block $~lib/internal/number/utoa32_core|inlined.2 + block $~lib/util/number/utoa32_core|inlined.2 local.get $2 - local.set $3 + local.set $5 local.get $0 local.set $4 local.get $1 - local.set $5 - local.get $3 - local.get $4 + local.set $3 local.get $5 - call $~lib/internal/number/utoa32_lut + local.get $4 + local.get $3 + call $~lib/util/number/utoa32_lut end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa (; 188 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -12552,30 +9147,30 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end i32.const 0 local.set $3 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.3 + block $~lib/util/number/utoa32_core|inlined.3 local.get $0 - local.set $4 + local.set $6 local.get $2 local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 - call $~lib/internal/number/utoa32_lut + local.get $5 + local.get $4 + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -12584,13 +9179,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -12598,181 +9188,153 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $11 + local.set $9 loop $repeat|0 - local.get $11 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.16 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $8 + local.get $3 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + i32.const 2 + i32.shl i32.add + i32.load local.set $8 local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $4 if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 local.get $6 + local.get $7 + i32.const 1 + i32.shl i32.add - local.set $8 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 end end - local.get $11 + local.get $9 i32.const 1 i32.add - local.set $11 + local.set $9 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.17 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 2 - i32.shl - i32.add - local.get $13 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $3 + local.get $2 + i32.const 2 + i32.shl i32.add + i32.load local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $7 + local.get $6 + local.get $7 local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $5 + local.get $7 i32.gt_s if - local.get $9 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.2 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.7 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.7 - end - end + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $13 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 226 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/builtins/isFinite (; 191 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 227 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/internal/number/genDigits (; 192 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 228 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__unchecked_get (; 229 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $~lib/util/number/genDigits (; 230 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -12789,11 +9351,10 @@ (local $20 i32) (local $21 i64) (local $22 i64) - (local $23 i32) - (local $24 i32) + (local $23 i64) + (local $24 i64) (local $25 i32) - (local $26 i64) - (local $27 i64) + (local $26 i32) i32.const 0 local.get $4 i32.sub @@ -12824,12 +9385,12 @@ i64.and local.set $13 local.get $12 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $14 local.get $6 local.set $15 - i32.const 6616 - i32.load + i32.const 6648 + i32.load offset=4 local.set $16 block $break|0 loop $continue|0 @@ -13059,7 +9620,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $14 i32.const 1 @@ -13077,43 +9638,33 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 + global.set $~lib/util/number/_K + block $~lib/util/number/grisuRound|inlined.0 local.get $0 - local.set $18 - local.get $15 local.set $20 + local.get $15 + local.set $18 local.get $5 - local.set $21 + local.set $24 local.get $19 - local.set $22 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $16 - local.set $23 - local.get $14 - local.set $24 - i32.const 0 - local.set $25 - local.get $23 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.set $23 + local.get $16 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u local.get $7 i64.extend_i32_s i64.shl - local.set $26 + local.set $22 local.get $10 - local.set $27 - local.get $18 + local.set $21 local.get $20 + local.get $18 i32.const 1 i32.sub i32.const 1 @@ -13121,65 +9672,62 @@ i32.add local.set $25 local.get $25 - i32.load16_u offset=4 - local.set $24 + i32.load16_u + local.set $26 block $break|2 loop $continue|2 - local.get $22 - local.get $27 + local.get $23 + local.get $21 i64.lt_u - local.tee $23 if (result i32) - local.get $21 - local.get $22 + local.get $24 + local.get $23 i64.sub - local.get $26 + local.get $22 i64.ge_u else - local.get $23 + i32.const 0 end - local.tee $23 if (result i32) + local.get $23 local.get $22 - local.get $26 i64.add - local.get $27 + local.get $21 i64.lt_u - local.tee $23 if (result i32) - local.get $23 + i32.const 1 else - local.get $27 - local.get $22 + local.get $21 + local.get $23 i64.sub + local.get $23 local.get $22 - local.get $26 i64.add - local.get $27 + local.get $21 i64.sub i64.gt_u end else - local.get $23 + i32.const 0 end if block - local.get $24 + local.get $26 i32.const 1 i32.sub - local.set $24 + local.set $26 + local.get $23 local.get $22 - local.get $26 i64.add - local.set $22 + local.set $23 end br $continue|2 end end end local.get $25 - local.get $24 - i32.store16 offset=4 + local.get $26 + i32.store16 end local.get $15 return @@ -13232,7 +9780,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $13 local.get $9 @@ -13246,85 +9794,72 @@ local.get $5 i64.lt_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $16 - local.set $17 - i32.const 0 - local.get $14 - i32.sub - local.set $24 - i32.const 0 - local.set $25 - local.get $17 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u i64.mul local.set $10 - block $~lib/internal/number/grisuRound|inlined.1 + block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $25 + local.set $26 local.get $15 - local.set $24 + local.set $17 local.get $5 - local.set $27 + local.set $24 local.get $13 - local.set $26 + local.set $23 local.get $8 local.set $22 local.get $10 local.set $21 - local.get $25 - local.get $24 + local.get $26 + local.get $17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $17 - local.get $17 - i32.load16_u offset=4 - local.set $20 + local.set $25 + local.get $25 + i32.load16_u + local.set $18 block $break|4 loop $continue|4 - local.get $26 + local.get $23 local.get $21 i64.lt_u - local.tee $18 if (result i32) - local.get $27 - local.get $26 + local.get $24 + local.get $23 i64.sub local.get $22 i64.ge_u else - local.get $18 + i32.const 0 end - local.tee $18 if (result i32) - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $18 if (result i32) - local.get $18 + i32.const 1 else local.get $21 - local.get $26 + local.get $23 i64.sub - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -13332,26 +9867,26 @@ i64.gt_u end else - local.get $18 + i32.const 0 end if block - local.get $20 + local.get $18 i32.const 1 i32.sub - local.set $20 - local.get $26 + local.set $18 + local.get $23 local.get $22 i64.add - local.set $26 + local.set $23 end br $continue|4 end end end - local.get $17 - local.get $20 - i32.store16 offset=4 + local.get $25 + local.get $18 + i32.store16 end local.get $15 return @@ -13363,7 +9898,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -13386,7 +9921,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -13399,13 +9934,12 @@ local.get $1 local.get $3 i32.le_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if block $break|0 @@ -13423,7 +9957,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -13443,7 +9977,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -13452,13 +9986,12 @@ local.get $3 i32.const 0 i32.gt_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if local.get $0 @@ -13467,35 +10000,23 @@ i32.shl i32.add local.set $4 - block $~lib/memory/memory.copy|inlined.9 - local.get $4 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $4 - i32.const 4 - i32.add - local.set $6 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - end + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $3 i32.const 1 i32.shl i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -13504,48 +10025,35 @@ i32.const -6 local.get $3 i32.lt_s - local.tee $4 if (result i32) local.get $3 i32.const 0 i32.le_s else - local.get $4 + i32.const 0 end if i32.const 2 local.get $3 i32.sub local.set $4 - block $~lib/memory/memory.copy|inlined.10 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 1 - i32.shl - i32.add - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $1 - i32.const 1 - i32.shl - local.set $5 - local.get $7 - local.get $6 - local.get $5 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 i32.const 48 i32.const 46 i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store block $break|1 i32.const 2 local.set $5 @@ -13561,7 +10069,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $5 i32.const 1 i32.add @@ -13582,50 +10090,50 @@ if local.get $0 i32.const 101 - i32.store16 offset=6 - block $~lib/internal/number/genExponent|inlined.0 (result i32) + i32.store16 offset=2 + block $~lib/util/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 i32.add - local.set $4 + local.set $5 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.const 0 i32.lt_s local.set $6 local.get $6 if i32.const 0 - local.get $5 + local.get $4 i32.sub - local.set $5 + local.set $4 end - local.get $5 - call $~lib/internal/number/decimalCount32 + local.get $4 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 - block $~lib/internal/number/utoa32_core|inlined.4 - local.get $4 - local.set $8 + block $~lib/util/number/utoa32_core|inlined.4 local.get $5 + local.set $10 + local.get $4 local.set $9 local.get $7 - local.set $10 - local.get $8 - local.get $9 + local.set $8 local.get $10 - call $~lib/internal/number/utoa32_lut + local.get $9 + local.get $8 + call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $6 select - i32.store16 offset=4 + i32.store16 local.get $7 end local.set $1 @@ -13638,38 +10146,26 @@ i32.const 1 i32.shl local.set $7 - block $~lib/memory/memory.copy|inlined.11 - local.get $0 - i32.const 4 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $0 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $7 - i32.const 2 - i32.sub - local.set $4 - local.get $6 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove - end + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $7 i32.add i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $1 - block $~lib/internal/number/genExponent|inlined.1 (result i32) + block $~lib/util/number/genExponent|inlined.1 (result i32) local.get $0 local.get $7 i32.add @@ -13679,42 +10175,42 @@ local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 - i32.const 0 - i32.lt_s local.set $6 local.get $6 + i32.const 0 + i32.lt_s + local.set $5 + local.get $5 if i32.const 0 - local.get $5 + local.get $6 i32.sub - local.set $5 + local.set $6 end - local.get $5 - call $~lib/internal/number/decimalCount32 + local.get $6 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $10 - block $~lib/internal/number/utoa32_core|inlined.5 + local.set $8 + block $~lib/util/number/utoa32_core|inlined.5 local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 local.set $11 - local.get $9 + local.get $6 + local.set $10 local.get $8 + local.set $9 local.get $11 - call $~lib/internal/number/utoa32_lut + local.get $10 + local.get $9 + call $~lib/util/number/utoa32_lut end local.get $4 i32.const 45 i32.const 43 - local.get $6 + local.get $5 select - i32.store16 offset=4 - local.get $10 + i32.store16 + local.get $8 end i32.add local.set $1 @@ -13732,7 +10228,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 194 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 232 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -13748,21 +10244,18 @@ (local $14 i32) (local $15 i32) (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) (local $21 i64) (local $22 i64) (local $23 i64) (local $24 i64) (local $25 i64) - (local $26 i64) + (local $26 i32) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i32) + (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -13774,15 +10267,15 @@ local.set $1 local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end - block $~lib/internal/number/grisu2|inlined.0 (result i32) + block $~lib/util/number/grisu2|inlined.0 (result i32) local.get $1 local.set $3 local.get $0 - local.set $4 - local.get $2 local.set $5 + local.get $2 + local.set $4 local.get $3 i64.reinterpret_f64 local.set $6 @@ -13817,7 +10310,7 @@ i32.add i32.sub local.set $7 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block $~lib/util/number/normalizedBoundaries|inlined.0 local.get $9 local.set $10 local.get $7 @@ -13852,7 +10345,7 @@ i32.add local.set $15 local.get $12 - global.set $~lib/internal/number/_frc_plus + global.set $~lib/util/number/_frc_plus local.get $10 local.get $15 i64.extend_i32_s @@ -13866,12 +10359,12 @@ i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $13 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 - global.get $~lib/internal/number/_exp + block $~lib/util/number/getCachedPower|inlined.0 + global.get $~lib/util/number/_exp local.set $15 i32.const -61 local.get $15 @@ -13902,320 +10395,286 @@ local.get $13 i32.const 3 i32.shl - i32.sub - global.set $~lib/internal/number/_K - i32.const 6280 - i32.load - local.set $11 - i32.const 6544 - i32.load - local.set $17 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $11 - local.set $18 - local.get $13 - local.set $19 - i32.const 0 - local.set $20 - local.get $18 - local.get $19 - i32.const 3 - i32.shl - i32.add - local.get $20 - i32.add - i64.load offset=8 - end - global.set $~lib/internal/number/_frc_pow - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $17 - local.set $20 - local.get $13 - local.set $19 - i32.const 0 - local.set $18 - local.get $20 - local.get $19 - i32.const 1 - i32.shl - i32.add - local.get $18 - i32.add - i32.load16_s offset=8 - end - global.set $~lib/internal/number/_exp_pow + i32.sub + global.set $~lib/util/number/_K + i32.const 6336 + local.get $13 + call $~lib/array/Array#__unchecked_get + global.set $~lib/util/number/_frc_pow + i32.const 6560 + local.get $13 + call $~lib/array/Array#__unchecked_get + global.set $~lib/util/number/_exp_pow end local.get $9 i64.clz i32.wrap_i64 - local.set $17 + local.set $13 local.get $9 - local.get $17 + local.get $13 i64.extend_i32_s i64.shl local.set $9 local.get $7 - local.get $17 + local.get $13 i32.sub local.set $7 - global.get $~lib/internal/number/_frc_pow + global.get $~lib/util/number/_frc_pow local.set $12 - global.get $~lib/internal/number/_exp_pow - local.set $11 - block $~lib/internal/number/umul64f|inlined.0 (result i64) + global.get $~lib/util/number/_exp_pow + local.set $14 + block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 - local.set $10 + local.set $17 local.get $12 - local.set $21 - local.get $10 + local.set $10 + local.get $17 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $10 i64.const 4294967295 i64.and - local.set $23 - local.get $10 + local.set $19 + local.get $17 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $10 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $28 - local.get $28 + local.set $24 + local.get $24 i64.const 2147483647 i64.add - local.set $28 - local.get $27 + local.set $24 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $28 + local.set $23 + local.get $24 i64.const 32 i64.shr_u - local.set $28 - local.get $24 - local.get $25 + local.set $24 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $28 + local.get $24 i64.add end - local.set $28 - block $~lib/internal/number/umul64e|inlined.0 (result i32) + local.set $24 + block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $13 - local.get $11 - local.set $14 - local.get $13 + local.set $11 local.get $14 + local.set $15 + local.get $11 + local.get $15 i32.add i32.const 64 i32.add end - local.set $14 - block $~lib/internal/number/umul64f|inlined.1 (result i64) - global.get $~lib/internal/number/_frc_plus - local.set $27 + local.set $15 + block $~lib/util/number/umul64f|inlined.1 (result i64) + global.get $~lib/util/number/_frc_plus + local.set $22 local.get $12 - local.set $26 - local.get $27 + local.set $23 + local.get $22 i64.const 4294967295 i64.and - local.set $25 - local.get $26 + local.set $21 + local.get $23 i64.const 4294967295 i64.and - local.set $24 - local.get $27 + local.set $20 + local.get $22 i64.const 32 i64.shr_u - local.set $23 - local.get $26 + local.set $19 + local.get $23 i64.const 32 i64.shr_u - local.set $22 - local.get $25 - local.get $24 + local.set $18 + local.get $21 + local.get $20 i64.mul - local.set $21 - local.get $23 - local.get $24 + local.set $10 + local.get $19 + local.get $20 i64.mul - local.get $21 + local.get $10 i64.const 32 i64.shr_u i64.add - local.set $10 - local.get $25 - local.get $22 + local.set $17 + local.get $21 + local.get $18 i64.mul - local.get $10 + local.get $17 i64.const 4294967295 i64.and i64.add - local.set $29 - local.get $29 + local.set $25 + local.get $25 i64.const 2147483647 i64.add - local.set $29 - local.get $10 + local.set $25 + local.get $17 i64.const 32 i64.shr_u - local.set $10 - local.get $29 + local.set $17 + local.get $25 i64.const 32 i64.shr_u - local.set $29 - local.get $23 - local.get $22 + local.set $25 + local.get $19 + local.get $18 i64.mul - local.get $10 + local.get $17 i64.add - local.get $29 + local.get $25 i64.add end i64.const 1 i64.sub - local.set $29 - block $~lib/internal/number/umul64e|inlined.1 (result i32) - global.get $~lib/internal/number/_exp - local.set $13 + local.set $25 + block $~lib/util/number/umul64e|inlined.1 (result i32) + global.get $~lib/util/number/_exp + local.set $26 + local.get $14 + local.set $11 + local.get $26 local.get $11 - local.set $15 - local.get $13 - local.get $15 i32.add i32.const 64 i32.add end - local.set $15 - block $~lib/internal/number/umul64f|inlined.2 (result i64) - global.get $~lib/internal/number/_frc_minus + local.set $11 + block $~lib/util/number/umul64f|inlined.2 (result i64) + global.get $~lib/util/number/_frc_minus local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $23 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $23 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $22 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $22 i64.const 4294967295 i64.and i64.add - local.set $30 - local.get $30 + local.set $27 + local.get $27 i64.const 2147483647 i64.add - local.set $30 - local.get $27 + local.set $27 + local.get $22 i64.const 32 i64.shr_u - local.set $27 - local.get $30 + local.set $22 + local.get $27 i64.const 32 i64.shr_u - local.set $30 - local.get $24 - local.get $25 + local.set $27 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $22 i64.add - local.get $30 + local.get $27 i64.add end i64.const 1 i64.add - local.set $30 - local.get $29 - local.get $30 - i64.sub local.set $27 - local.get $4 - local.get $28 - local.get $14 - local.get $29 - local.get $15 + local.get $25 local.get $27 + i64.sub + local.set $22 local.get $5 - call $~lib/internal/number/genDigits + local.get $24 + local.get $15 + local.get $25 + local.get $11 + local.get $22 + local.get $4 + call $~lib/util/number/genDigits end - local.set $31 + local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $31 + local.get $28 local.get $2 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify - local.set $31 - local.get $31 + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 local.get $2 i32.add ) - (func $~lib/internal/number/dtoa (; 195 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 233 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 f64.const 0 f64.eq if - i32.const 5176 + i32.const 5504 return end local.get $0 @@ -14225,11 +10684,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 5192 + i32.const 5528 return end - i32.const 5208 - i32.const 5232 + i32.const 5552 + i32.const 5592 local.get $0 f64.const 0 f64.lt @@ -14237,47 +10696,27 @@ return end i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $1 local.get $1 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $2 local.get $1 i32.const 0 local.get $2 call $~lib/string/String#substring local.set $3 - block $~lib/internal/string/freeUnsafe|inlined.3 - local.get $1 - local.set $4 - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.8 - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.8 - end - end + local.get $1 + call $~lib/util/runtime/discard local.get $3 ) - (func $~lib/internal/number/dtoa_stream (; 196 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) + (func $~lib/util/number/dtoa_stream (; 234 ;) (type $FUNCSIG$iiid) (param $0 i32) (param $1 i32) (param $2 f64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) local.get $0 local.get $1 i32.const 1 @@ -14290,13 +10729,13 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 48 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return end @@ -14309,13 +10748,13 @@ if local.get $0 i32.const 78 - i32.store16 offset=4 + i32.store16 local.get $0 i32.const 97 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 78 - i32.store16 offset=8 + i32.store16 offset=4 i32.const 3 return else @@ -14327,29 +10766,17 @@ local.get $3 i32.add local.set $4 - i32.const 5208 - i32.const 5232 + i32.const 5552 + i32.const 5592 local.get $3 select local.set $5 - block $~lib/memory/memory.copy|inlined.12 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $5 - i32.const 4 - i32.add - local.set $7 - local.get $4 - i32.const 1 - i32.shl - local.set $8 - local.get $6 - local.get $7 - local.get $8 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $5 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $4 return end @@ -14358,24 +10785,19 @@ end local.get $0 local.get $2 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core ) - (func $~lib/array/Array#join (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_flt (; 235 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 f64) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14383,174 +10805,128 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result f64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - call $~lib/internal/number/dtoa + local.get $3 + f64.load + call $~lib/util/number/dtoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 28 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 28 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $11 + local.set $9 loop $repeat|0 - local.get $11 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result f64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - f64.load offset=8 - end - local.set $4 - local.get $8 + local.get $3 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/dtoa_stream + i32.const 3 + i32.shl i32.add + f64.load local.set $8 local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/dtoa_stream + i32.add + local.set $7 + local.get $4 if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 local.get $6 + local.get $7 + i32.const 1 + i32.shl i32.add - local.set $8 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 end end - local.get $11 + local.get $9 i32.const 1 i32.add - local.set $11 + local.set $9 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result f64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - f64.load offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/dtoa_stream + local.get $3 + local.get $2 + i32.const 3 + i32.shl i32.add + f64.load local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $7 + local.get $6 + local.get $7 local.get $8 + call $~lib/util/number/dtoa_stream + i32.add + local.set $7 + local.get $5 + local.get $7 i32.gt_s if - local.get $9 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.4 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.9 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.9 - end - end + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $13 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_flt return ) - (func $~lib/array/Array<~lib/string/String>#join (; 198 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#join_str (; 237 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14560,12 +10936,8 @@ (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14573,291 +10945,190 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD<~lib/string/String,~lib/string/String>|inlined.5 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end + local.get $3 + i32.load return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 0 - local.set $10 + local.set $5 block $break|0 block i32.const 0 - local.set $9 + local.set $7 local.get $2 i32.const 1 i32.add local.set $8 end loop $repeat|0 - local.get $9 + local.get $7 local.get $8 i32.lt_s i32.eqz br_if $break|0 - local.get $10 - block $~lib/internal/arraybuffer/LOAD<~lib/string/String,~lib/string/String>|inlined.6 (result i32) - local.get $5 - local.set $11 - local.get $9 - local.set $12 - i32.const 0 - local.set $13 - local.get $11 - local.get $12 + block + local.get $3 + local.get $7 i32.const 2 i32.shl i32.add - local.get $13 - i32.add - i32.load offset=8 + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $5 + local.get $6 + call $~lib/string/String#get:length + i32.add + local.set $5 + end end - i32.load - i32.add - local.set $10 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end i32.const 0 - local.set $8 - local.get $10 - local.get $6 + local.set $9 + local.get $5 + local.get $4 local.get $2 i32.mul i32.add - call $~lib/internal/string/allocateUnsafe - local.set $9 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $10 block $break|1 i32.const 0 - local.set $13 + local.set $8 loop $repeat|1 - local.get $13 + local.get $8 local.get $2 i32.lt_s i32.eqz br_if $break|1 block - block $~lib/internal/arraybuffer/LOAD<~lib/string/String,~lib/string/String>|inlined.7 (result i32) - local.get $5 - local.set $12 - local.get $13 - local.set $11 - i32.const 0 - local.set $14 - local.get $12 - local.get $11 - i32.const 2 + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $6 + call $~lib/string/String#get:length + local.set $7 + local.get $10 + local.get $9 + i32.const 1 i32.shl i32.add - local.get $14 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $7 i32.add - i32.load offset=8 + local.set $9 end - local.set $4 local.get $4 if - local.get $4 - i32.load - local.set $14 + local.get $10 local.get $9 - local.get $8 - local.get $4 - i32.const 0 - local.get $14 - call $~lib/internal/string/copyUnsafe - local.get $8 - local.get $14 + i32.const 1 + i32.shl i32.add - local.set $8 - end - local.get $7 - if - local.get $9 - local.get $8 local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 - local.get $6 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $4 i32.add - local.set $8 + local.set $9 end end - local.get $13 + local.get $8 i32.const 1 i32.add - local.set $13 + local.set $8 br $repeat|1 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD<~lib/string/String,~lib/string/String>|inlined.8 (result i32) - local.get $5 - local.set $13 - local.get $2 - local.set $14 - i32.const 0 - local.set $11 - local.get $13 - local.get $14 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne if - local.get $4 - i32.load - local.set $11 + local.get $10 local.get $9 - local.get $8 - local.get $4 - i32.const 0 - local.get $11 - call $~lib/internal/string/copyUnsafe + i32.const 1 + i32.shl + i32.add + local.get $6 + local.get $6 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + call $~lib/memory/memory.copy end - local.get $9 + local.get $10 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array<~lib/string/String>#join (; 238 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#join_str return ) - (func $std/array/Ref#constructor (; 199 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/array/Ref#constructor (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.eqz if i32.const 0 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 32 + call $~lib/util/runtime/register local.set $0 end local.get $0 ) - (func $~lib/array/Array#constructor (; 200 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - call $~lib/memory/memory.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 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.12 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array#__unchecked_set (; 201 ;) (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.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - ) - (func $~lib/array/Array#join (; 202 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_ref (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -14866,13 +11137,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -14880,177 +11146,158 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - i32.const 6872 + i32.const 6928 return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 15 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 15 i32.add - local.set $8 - local.get $8 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 i32.const 0 - local.set $10 + local.set $7 block $break|0 i32.const 0 - local.set $11 + local.set $9 loop $repeat|0 - local.get $11 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 + local.get $3 + local.get $9 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $8 + local.get $8 + if + local.get $6 + local.get $7 + i32.const 1 i32.shl i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 - if - local.get $9 - local.get $10 - i32.const 6872 - i32.const 0 + i32.const 6928 i32.const 15 - call $~lib/internal/string/copyUnsafe - local.get $10 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 i32.const 15 i32.add - local.set $10 + local.set $7 end - local.get $7 + local.get $4 if - local.get $9 - local.get $10 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $10 local.get $6 + local.get $7 + i32.const 1 + i32.shl i32.add - local.set $10 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 end end - local.get $11 + local.get $9 i32.const 1 i32.add - local.set $11 + local.set $9 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $13 - local.get $2 - local.set $14 - i32.const 0 - local.set $11 - local.get $13 - local.get $14 - i32.const 2 + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + if + local.get $6 + local.get $7 + i32.const 1 i32.shl i32.add - local.get $11 - i32.add - i32.load offset=8 - end - if - local.get $9 - local.get $10 - i32.const 6872 - i32.const 0 + i32.const 6928 i32.const 15 - call $~lib/internal/string/copyUnsafe - local.get $10 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 i32.const 15 i32.add - local.set $10 + local.set $7 end - local.get $9 - local.set $11 - local.get $8 - local.get $10 + local.get $5 + local.get $7 i32.gt_s if - local.get $9 + local.get $6 i32.const 0 - local.get $10 + local.get $7 call $~lib/string/String#substring - local.set $11 - block $~lib/internal/string/freeUnsafe|inlined.5 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.10 - local.get $14 - local.set $13 - local.get $13 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.10 - end - end + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $11 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 241 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_ref return ) - (func $~lib/internal/number/itoa (; 203 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa (; 243 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/number/itoa32 + call $~lib/util/number/itoa32 return ) - (func $~lib/internal/number/itoa_stream (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15071,7 +11318,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15097,13 +11344,13 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.6 + block $~lib/util/number/utoa32_core|inlined.6 local.get $0 - local.set $5 + local.set $7 local.get $2 i32.const 24 i32.shl @@ -15111,21 +11358,21 @@ i32.shr_s local.set $6 local.get $3 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 - call $~lib/internal/number/utoa32_lut + local.get $6 + local.get $5 + call $~lib/util/number/utoa32_lut end local.get $4 if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 ) - (func $~lib/array/Array#join (; 205 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 245 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15134,13 +11381,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15148,181 +11390,140 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_s offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load8_s + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 11 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 11 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $11 + local.set $9 loop $repeat|0 - local.get $11 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_s offset=8 - end - local.set $4 - local.get $8 + local.get $3 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + i32.const 0 + i32.shl i32.add + i32.load8_s local.set $8 local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $4 if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 local.get $6 + local.get $7 + i32.const 1 + i32.shl i32.add - local.set $8 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 end end - local.get $11 + local.get $9 i32.const 1 i32.add - local.set $11 + local.set $9 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $13 - i32.add - i32.load8_s offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $3 + local.get $2 + i32.const 0 + i32.shl i32.add + i32.load8_s local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $7 + local.get $6 + local.get $7 local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $5 + local.get $7 i32.gt_s if - local.get $9 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.6 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.11 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.11 - end - end + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $13 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 246 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/itoa (; 206 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#toString (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa (; 248 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 65535 i32.and - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 207 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 249 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15340,7 +11541,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15349,25 +11550,25 @@ local.get $2 i32.const 65535 i32.and - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.7 + block $~lib/util/number/utoa32_core|inlined.7 local.get $0 - local.set $4 + local.set $6 local.get $2 i32.const 65535 i32.and local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 - call $~lib/internal/number/utoa32_lut + local.get $5 + local.get $4 + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 250 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -15376,13 +11577,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15390,174 +11586,133 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - i32.load16_u offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load16_u + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $11 + local.set $9 loop $repeat|0 - local.get $11 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 1 - i32.shl - i32.add - local.get $14 - i32.add - i32.load16_u offset=8 - end - local.set $4 - local.get $8 + local.get $3 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + i32.const 1 + i32.shl i32.add + i32.load16_u local.set $8 local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $4 if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 local.get $6 + local.get $7 + i32.const 1 + i32.shl i32.add - local.set $8 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 end end - local.get $11 + local.get $9 i32.const 1 i32.add - local.set $11 + local.set $9 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 1 - i32.shl - i32.add - local.get $13 - i32.add - i32.load16_u offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $3 + local.get $2 + i32.const 1 + i32.shl i32.add + i32.load16_u local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $7 + local.get $6 + local.get $7 local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $5 + local.get $7 i32.gt_s if - local.get $9 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.7 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.12 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.12 - end - end + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $13 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 251 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/decimalCount64 (; 209 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/array/Array#toString (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array#join + ) + (func $~lib/util/number/decimalCount64 (; 253 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -15626,7 +11781,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 210 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 254 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -15636,13 +11791,10 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) - (local $16 i64) - i32.const 4832 - i32.load + (local $12 i64) + (local $13 i64) + i32.const 5096 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -15688,40 +11840,20 @@ i32.const 100 i32.rem_u local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i64) - local.get $3 - local.set $12 - local.get $10 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $3 - local.set $14 - local.get $11 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + local.get $3 + local.get $10 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $11 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -15731,46 +11863,26 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or - i64.store offset=4 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i64) - local.get $3 - local.set $12 - local.get $8 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $3 - local.set $14 - local.get $9 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + i64.store + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $9 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -15780,12 +11892,12 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -15795,9 +11907,9 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 211 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 255 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -15808,7 +11920,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 4656 return end local.get $0 @@ -15820,51 +11932,57 @@ i32.wrap_i64 local.set $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 local.get $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $1 - block $~lib/internal/number/utoa32_core|inlined.8 + block $~lib/util/number/utoa32_core|inlined.8 local.get $1 - local.set $4 + local.set $6 local.get $2 local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 - call $~lib/internal/number/utoa32_lut + local.get $5 + local.get $4 + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 local.get $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $1 - block $~lib/internal/number/utoa64_core|inlined.0 + block $~lib/util/number/utoa64_core|inlined.0 local.get $1 - local.set $2 + local.set $4 local.get $0 local.set $7 local.get $3 - local.set $6 - local.get $2 + local.set $2 + local.get $4 local.get $7 - local.get $6 - call $~lib/internal/number/utoa64_lut + local.get $2 + call $~lib/util/number/utoa64_lut end end local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa (; 212 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 256 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 - call $~lib/internal/number/utoa64 + call $~lib/util/number/utoa64 return ) - (func $~lib/internal/number/itoa_stream (; 213 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 257 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -15882,7 +12000,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -15897,55 +12015,50 @@ i32.wrap_i64 local.set $4 local.get $4 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.9 + block $~lib/util/number/utoa32_core|inlined.9 local.get $0 - local.set $5 + local.set $7 local.get $4 local.set $6 local.get $3 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 - call $~lib/internal/number/utoa32_lut + local.get $6 + local.get $5 + call $~lib/util/number/utoa32_lut end else local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 - block $~lib/internal/number/utoa64_core|inlined.1 + block $~lib/util/number/utoa64_core|inlined.1 local.get $0 - local.set $4 + local.set $5 local.get $2 local.set $8 local.get $3 - local.set $7 - local.get $4 + local.set $4 + local.get $5 local.get $8 - local.get $7 - call $~lib/internal/number/utoa64_lut + local.get $4 + call $~lib/util/number/utoa64_lut end end local.get $3 ) - (func $~lib/array/Array#join (; 214 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 258 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) + (local $8 i64) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -15953,174 +12066,133 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i64.load + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 20 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 20 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $11 + local.set $9 loop $repeat|0 - local.get $11 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.set $4 - local.get $8 + local.get $3 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + i32.const 3 + i32.shl i32.add + i64.load local.set $8 local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $4 if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 local.get $6 + local.get $7 + i32.const 1 + i32.shl i32.add - local.set $8 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 end end - local.get $11 + local.get $9 i32.const 1 i32.add - local.set $11 + local.set $9 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - i64.load offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $3 + local.get $2 + i32.const 3 + i32.shl i32.add + i64.load local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $7 + local.get $6 + local.get $7 local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $5 + local.get $7 i32.gt_s if - local.get $9 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.8 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.13 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.13 - end - end + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $13 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 259 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/internal/number/itoa64 (; 215 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/array/Array#toString (; 260 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array#join + ) + (func $~lib/util/number/itoa64 (; 261 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16132,7 +12204,7 @@ local.get $0 i64.eqz if - i32.const 4312 + i32.const 4656 return end local.get $0 @@ -16155,61 +12227,67 @@ i32.wrap_i64 local.set $3 local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $4 local.get $4 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $2 - block $~lib/internal/number/utoa32_core|inlined.10 + block $~lib/util/number/utoa32_core|inlined.10 local.get $2 - local.set $5 + local.set $7 local.get $3 local.set $6 local.get $4 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 - call $~lib/internal/number/utoa32_lut + local.get $6 + local.get $5 + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.set $4 local.get $4 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $2 - block $~lib/internal/number/utoa64_core|inlined.2 + block $~lib/util/number/utoa64_core|inlined.2 local.get $2 - local.set $3 + local.set $5 local.get $0 local.set $8 local.get $4 - local.set $7 - local.get $3 + local.set $3 + local.get $5 local.get $8 - local.get $7 - call $~lib/internal/number/utoa64_lut + local.get $3 + call $~lib/util/number/utoa64_lut end end local.get $1 if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa (; 216 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa (; 262 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 - call $~lib/internal/number/itoa64 + call $~lib/util/number/itoa64 return ) - (func $~lib/internal/number/itoa_stream (; 217 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) + (func $~lib/util/number/itoa_stream (; 263 ;) (type $FUNCSIG$iiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16228,7 +12306,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -16254,65 +12332,205 @@ i32.wrap_i64 local.set $5 local.get $5 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa32_core|inlined.11 + block $~lib/util/number/utoa32_core|inlined.11 local.get $0 - local.set $6 + local.set $8 local.get $5 local.set $7 local.get $3 - local.set $8 - local.get $6 - local.get $7 + local.set $6 local.get $8 - call $~lib/internal/number/utoa32_lut + local.get $7 + local.get $6 + call $~lib/util/number/utoa32_lut end else local.get $2 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $4 i32.add local.set $3 - block $~lib/internal/number/utoa64_core|inlined.3 + block $~lib/util/number/utoa64_core|inlined.3 local.get $0 - local.set $5 + local.set $6 local.get $2 local.set $9 local.get $3 - local.set $8 + local.set $5 + local.get $6 + local.get $9 local.get $5 + call $~lib/util/number/utoa64_lut + end + end + local.get $4 + if + local.get $0 + i32.const 45 + i32.store16 + end + local.get $3 + ) + (func $~lib/array/Array#join_int (; 264 ;) (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 $8 i64) + (local $9 i32) + local.get $0 + i32.load offset=12 + i32.const 1 + i32.sub + local.set $2 + local.get $2 + i32.const 0 + i32.lt_s + if + i32.const 4208 + return + end + local.get $0 + i32.load offset=4 + local.set $3 + local.get $2 + i32.eqz + if + local.get $3 + i64.load + call $~lib/util/number/itoa + return + end + local.get $1 + call $~lib/string/String#get:length + local.set $4 + i32.const 21 + local.get $4 + i32.add + local.get $2 + i32.mul + i32.const 21 + i32.add + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 + i32.const 0 + local.set $7 + block $break|0 + i32.const 0 + local.set $9 + loop $repeat|0 + local.get $9 + local.get $2 + i32.lt_s + i32.eqz + br_if $break|0 + block + local.get $3 + local.get $9 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $8 + local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $4 + if + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 + end + end local.get $9 - local.get $8 - call $~lib/internal/number/utoa64_lut + i32.const 1 + i32.add + local.set $9 + br $repeat|0 + unreachable end + unreachable end - local.get $4 + local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.set $8 + local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $5 + local.get $7 + i32.gt_s if - local.get $0 - i32.const 45 - i32.store16 offset=4 + local.get $6 + i32.const 0 + local.get $7 + call $~lib/string/String#substring + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $3 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 265 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int + return + ) + (func $~lib/array/Array#toString (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array#join ) - (func $~lib/array/Array#join (; 218 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#join_str (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) (local $9 i32) (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16320,186 +12538,196 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load return end - i32.const 21 - local.get $6 - i32.add - local.get $2 - i32.mul - i32.const 21 - i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 0 - local.set $8 + local.set $5 block $break|0 - i32.const 0 - local.set $11 - loop $repeat|0 - local.get $11 + block + i32.const 0 + local.set $7 local.get $2 + i32.const 1 + i32.add + local.set $8 + end + loop $repeat|0 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream - i32.add - local.set $8 + local.get $3 local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 + local.get $5 local.get $6 + call $~lib/string/String#get:length i32.add - local.set $8 + local.set $5 end end - local.get $11 + local.get $7 i32.const 1 i32.add - local.set $11 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 3 - i32.shl - i32.add - local.get $13 - i32.add - i64.load offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 + i32.const 0 + local.set $9 + local.get $5 local.get $4 - call $~lib/internal/number/itoa_stream + local.get $2 + i32.mul i32.add - local.set $8 - local.get $9 - local.set $13 - local.get $10 - local.get $8 - i32.gt_s - if - local.get $9 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $10 + block $break|1 i32.const 0 - local.get $8 - call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.9 - local.get $9 - local.set $14 - local.get $14 + local.set $8 + loop $repeat|1 + local.get $8 + local.get $2 + i32.lt_s i32.eqz - if + br_if $break|1 + block + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.14 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.14 + i32.ne + if + local.get $6 + call $~lib/string/String#get:length + local.set $7 + local.get $10 + local.get $9 + i32.const 1 + i32.shl + i32.add + local.get $6 + local.get $7 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $7 + i32.add + local.set $9 + end + local.get $4 + if + local.get $10 + local.get $9 + i32.const 1 + i32.shl + i32.add + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $4 + i32.add + local.set $9 + end end + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $repeat|1 + unreachable end + unreachable + end + local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 + i32.const 0 + i32.ne + if + local.get $10 + local.get $9 + i32.const 1 + i32.shl + i32.add + local.get $6 + local.get $6 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + call $~lib/memory/memory.copy end - local.get $13 + local.get $10 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array<~lib/string/String | null>#join (; 268 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String | null>#join_str return ) - (func $~lib/array/Array<~lib/array/Array>#join (; 219 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String | null>#toString (; 269 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array<~lib/string/String | null>#join + ) + (func $~lib/array/Array<~lib/string/String>#toString (; 270 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array<~lib/string/String>#join + ) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 271 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16507,88 +12735,60 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 + i32.const 4208 local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.5 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join else - i32.const 3904 + i32.const 4208 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.6 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $3 end - local.get $7 + local.get $4 if local.get $3 local.get $1 @@ -16596,52 +12796,52 @@ local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.7 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array<~lib/array/Array>#join (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/internal/number/itoa (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 273 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array<~lib/array/Array>#join + ) + (func $~lib/util/number/itoa (; 274 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and - call $~lib/internal/number/utoa32 + call $~lib/util/number/utoa32 return ) - (func $~lib/internal/number/itoa_stream (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/itoa_stream (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -16659,7 +12859,7 @@ if local.get $0 i32.const 48 - i32.store16 offset=4 + i32.store16 i32.const 1 return end @@ -16668,25 +12868,25 @@ local.get $2 i32.const 255 i32.and - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 - block $~lib/internal/number/utoa32_core|inlined.12 + block $~lib/util/number/utoa32_core|inlined.12 local.get $0 - local.set $4 + local.set $6 local.get $2 i32.const 255 i32.and local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 - call $~lib/internal/number/utoa32_lut + local.get $5 + local.get $4 + call $~lib/util/number/utoa32_lut end local.get $3 ) - (func $~lib/array/Array#join (; 222 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#join_int (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -16695,13 +12895,8 @@ (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16709,186 +12904,136 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 - local.set $3 local.get $0 - i32.load - local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 + i32.load offset=4 + local.set $3 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end - call $~lib/internal/number/itoa + local.get $3 + i32.load8_u + call $~lib/util/number/itoa return end + local.get $1 + call $~lib/string/String#get:length + local.set $4 i32.const 10 - local.get $6 + local.get $4 i32.add local.get $2 i32.mul i32.const 10 i32.add - local.set $10 - local.get $10 - call $~lib/internal/string/allocateUnsafe - local.set $9 + local.set $5 + local.get $5 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $6 i32.const 0 - local.set $8 + local.set $7 block $break|0 i32.const 0 - local.set $11 + local.set $9 loop $repeat|0 - local.get $11 + local.get $9 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $11 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.set $4 - local.get $8 + local.get $3 local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + i32.const 0 + i32.shl i32.add + i32.load8_u local.set $8 local.get $7 + local.get $6 + local.get $7 + local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $4 if - local.get $9 - local.get $8 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $8 local.get $6 + local.get $7 + i32.const 1 + i32.shl i32.add - local.set $8 + local.get $1 + local.get $4 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $7 + local.get $4 + i32.add + local.set $7 end end - local.get $11 + local.get $9 i32.const 1 i32.add - local.set $11 + local.set $9 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $5 - local.set $11 - local.get $2 - local.set $14 - i32.const 0 - local.set $13 - local.get $11 - local.get $14 - i32.const 0 - i32.shl - i32.add - local.get $13 - i32.add - i32.load8_u offset=8 - end - local.set $4 - local.get $8 - local.get $9 - local.get $8 - local.get $4 - call $~lib/internal/number/itoa_stream + local.get $3 + local.get $2 + i32.const 0 + i32.shl i32.add + i32.load8_u local.set $8 - local.get $9 - local.set $13 - local.get $10 + local.get $7 + local.get $6 + local.get $7 local.get $8 + call $~lib/util/number/itoa_stream + i32.add + local.set $7 + local.get $5 + local.get $7 i32.gt_s if - local.get $9 + local.get $6 i32.const 0 - local.get $8 + local.get $7 call $~lib/string/String#substring - local.set $13 - block $~lib/internal/string/freeUnsafe|inlined.10 - local.get $9 - local.set $14 - local.get $14 - i32.eqz - if - i32.const 0 - i32.const 4088 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.15 - local.get $14 - local.set $11 - local.get $11 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.15 - end - end + local.set $9 + local.get $6 + call $~lib/util/runtime/discard + local.get $9 + return end - local.get $13 + local.get $6 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/array/Array#join (; 277 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array#join_int return ) - (func $~lib/array/Array<~lib/array/Array>#join (; 223 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 278 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -16896,88 +13041,60 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 + i32.const 4208 local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join else - i32.const 3904 + i32.const 4208 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $3 end - local.get $7 + local.get $4 if local.get $3 local.get $1 @@ -16985,57 +13102,53 @@ local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array<~lib/array/Array>#join (; 279 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array>#join (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array>#toString (; 280 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array<~lib/array/Array>#join + ) + (func $~lib/array/Array<~lib/array/Array>#join_arr (; 281 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -17043,88 +13156,60 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 + i32.const 4208 local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join else - i32.const 3904 + i32.const 4208 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $3 end - local.get $7 + local.get $4 if local.get $3 local.get $1 @@ -17132,57 +13217,48 @@ local.set $3 end end - local.get $10 - i32.const 1 - i32.add - local.set $10 - br $repeat|0 - unreachable - end - unreachable - end - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array,~lib/array/Array>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $repeat|0 + unreachable + end + unreachable end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array#join call $~lib/string/String.__concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array<~lib/array/Array>#join (; 282 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array>#join_arr return ) - (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 225 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr (; 283 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.sub local.set $2 @@ -17190,88 +13266,60 @@ i32.const 0 i32.lt_s if - i32.const 3904 + i32.const 4208 return end - i32.const 3904 + i32.const 4208 local.set $3 + local.get $1 + call $~lib/string/String#get:length + local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 - local.get $1 - i32.load - local.set $6 - local.get $6 - i32.const 0 - i32.ne - local.set $7 local.get $2 i32.eqz if - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array<~lib/array/Array>,~lib/array/Array<~lib/array/Array>>|inlined.0 (result i32) - local.get $5 - local.set $8 - i32.const 0 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + i32.load + local.set $6 + local.get $6 if (result i32) - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array<~lib/array/Array>#join else - i32.const 3904 + i32.const 4208 end return end block $break|0 i32.const 0 - local.set $10 + local.set $7 loop $repeat|0 - local.get $10 + local.get $7 local.get $2 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array<~lib/array/Array>,~lib/array/Array<~lib/array/Array>>|inlined.1 (result i32) - local.get $5 - local.set $9 - local.get $10 - local.set $8 - i32.const 0 - local.set $11 - local.get $9 - local.get $8 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array<~lib/array/Array>#join call $~lib/string/String.__concat local.set $3 end - local.get $7 + local.get $4 if local.get $3 local.get $1 @@ -17279,50 +13327,60 @@ local.set $3 end end - local.get $10 + local.get $7 i32.const 1 i32.add - local.set $10 + local.set $7 br $repeat|0 unreachable end unreachable end - block $~lib/internal/arraybuffer/LOAD<~lib/array/Array<~lib/array/Array>,~lib/array/Array<~lib/array/Array>>|inlined.2 (result i32) - local.get $5 - local.set $10 - local.get $2 - local.set $11 - i32.const 0 - local.set $8 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $4 - local.get $4 + local.get $5 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $6 + local.get $6 if local.get $3 - local.get $4 + local.get $6 local.get $1 call $~lib/array/Array<~lib/array/Array>#join call $~lib/string/String.__concat local.set $3 end local.get $3 + ) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join_arr return ) - (func $start:std/array (; 226 ;) (type $FUNCSIG$v) + (func $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString (; 285 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 4536 + call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join + ) + (func $start:std/array (; 286 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - call $start:~lib/allocator/arena + (local $4 i32) + 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 i32.const 0 i32.const 0 call $~lib/array/Array#constructor @@ -17334,10 +13392,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 37 + i32.const 160 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17347,10 +13405,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 38 + i32.const 160 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -17361,10 +13419,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 39 + i32.const 160 + i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -17376,10 +13434,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 40 + i32.const 160 + i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/num @@ -17389,10 +13447,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 41 + i32.const 160 + i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/str @@ -17402,10 +13460,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 42 + i32.const 160 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -17415,39 +13473,43 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 + i32.const 5 + i32.const 0 + i32.const 20 i32.const 256 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 49 + i32.const 160 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/arr8 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr8 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 280 + i32.const 5 + i32.const 0 + i32.const 20 + i32.const 328 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 52 + i32.const 160 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -17457,39 +13519,43 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 304 + i32.const 5 + i32.const 0 + i32.const 20 + i32.const 352 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 55 + i32.const 160 + i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/arr8 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr8 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 328 + i32.const 5 + i32.const 0 + i32.const 20 + i32.const 376 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 58 + i32.const 160 + i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr8 @@ -17499,16 +13565,20 @@ call $~lib/array/Array#fill drop global.get $std/array/arr8 - i32.const 352 + i32.const 5 + i32.const 0 + i32.const 20 + i32.const 400 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 61 + i32.const 160 + i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -17518,39 +13588,43 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 432 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 496 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 66 + i32.const 160 + i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/arr32 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr32 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 472 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 536 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 69 + i32.const 160 + i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -17560,39 +13634,43 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 512 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 576 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 72 + i32.const 160 + i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/arr32 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/array/Array#fill|trampoline - end + global.get $std/array/arr32 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 552 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 616 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 75 + i32.const 160 + i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr32 @@ -17602,33 +13680,33 @@ call $~lib/array/Array#fill drop global.get $std/array/arr32 - i32.const 592 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 656 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 78 + i32.const 160 + i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 82 + i32.const 160 + i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17638,10 +13716,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 83 + i32.const 160 + i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17656,27 +13734,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 87 + i32.const 160 + i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.1 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 88 + i32.const 160 + i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17686,10 +13760,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 89 + i32.const 160 + i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17701,27 +13775,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 93 + i32.const 160 + i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.2 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 94 + i32.const 160 + i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17731,31 +13801,27 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 95 + i32.const 160 + i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 43 - call $~lib/array/Array#push - drop - block $~lib/array/Array#get:length|inlined.3 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + call $~lib/array/Array#push + drop + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 99 + i32.const 160 + i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17765,10 +13831,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 100 + i32.const 160 + i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17779,31 +13845,27 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 101 + i32.const 160 + i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 44 call $~lib/array/Array#push drop - block $~lib/array/Array#get:length|inlined.4 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 105 + i32.const 160 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17813,10 +13875,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 106 + i32.const 160 + i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17827,10 +13889,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 107 + i32.const 160 + i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17841,31 +13903,27 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 108 + i32.const 160 + i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 45 call $~lib/array/Array#push drop - block $~lib/array/Array#get:length|inlined.5 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 112 + i32.const 160 + i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17875,10 +13933,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 113 + i32.const 160 + i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17889,10 +13947,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 114 + i32.const 160 + i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17903,10 +13961,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 115 + i32.const 160 + i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -17917,10 +13975,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 116 + i32.const 160 + i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -17938,48 +13996,44 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 123 + i32.const 160 + i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.6 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 124 + i32.const 160 + i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.7 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 125 + i32.const 160 + i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out - i32.const 608 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 696 + call $~lib/util/runtime/makeArray call $~lib/array/Array#concat drop global.get $std/array/arr @@ -17989,10 +14043,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 128 + i32.const 160 + i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18003,10 +14057,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 130 + i32.const 160 + i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18017,10 +14071,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 131 + i32.const 160 + i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18031,10 +14085,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 132 + i32.const 160 + i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/other @@ -18056,44 +14110,36 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 139 + i32.const 160 + i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.8 (result i32) - global.get $std/array/other - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/other + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 140 + i32.const 160 + i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.9 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 5 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 141 + i32.const 160 + i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18104,10 +14150,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 142 + i32.const 160 + i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18118,10 +14164,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 143 + i32.const 160 + i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18132,10 +14178,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 144 + i32.const 160 + i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18146,10 +14192,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 145 + i32.const 160 + i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18160,51 +14206,43 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 146 + i32.const 160 + i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out call $~lib/array/Array#pop drop - block $~lib/array/Array#get:length|inlined.10 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 149 + i32.const 160 + i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 0 call $~lib/array/Array#concat global.set $std/array/out - block $~lib/array/Array#get:length|inlined.11 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 152 + i32.const 160 + i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/out @@ -18215,338 +14253,394 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 153 + i32.const 160 + i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.12 (result i32) - global.get $std/array/source - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/source + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 156 + i32.const 160 + i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/source global.get $std/array/arr call $~lib/array/Array#concat global.set $std/array/out - block $~lib/array/Array#get:length|inlined.13 (result i32) - global.get $std/array/out - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/out + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 158 + i32.const 160 + i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.14 (result i32) - global.get $std/array/source - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/source + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 159 + i32.const 160 + i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 664 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 760 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 0 - i32.const 3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline - end - i32.const 704 + global.get $std/array/cwArr + i32.const 0 + i32.const 3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 800 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 165 + i32.const 160 + i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 744 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 840 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 1 - i32.const 3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline - end - i32.const 784 + global.get $std/array/cwArr + i32.const 1 + i32.const 3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 880 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 167 + i32.const 160 + i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 824 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 920 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 1 - i32.const 2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline - end - i32.const 864 + global.get $std/array/cwArr + i32.const 1 + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 960 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 169 + i32.const 160 + i32.const 171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 904 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1000 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 2 - i32.const 2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline - end - i32.const 944 + global.get $std/array/cwArr + i32.const 2 + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1040 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 171 + i32.const 160 + i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 984 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1080 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1024 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1120 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 173 + i32.const 160 + i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1064 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1160 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1104 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1200 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 175 + i32.const 160 + i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1144 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1240 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 1 i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - i32.const 1184 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1280 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 177 + i32.const 160 + i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1224 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1320 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const 0 - i32.const -2 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline - end - i32.const 1264 + global.get $std/array/cwArr + i32.const 0 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1360 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 179 + i32.const 160 + i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1304 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1400 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const 0 i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1344 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1440 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 181 + i32.const 160 + i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1384 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1480 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - i32.const 1424 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1520 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 183 + i32.const 160 + i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1464 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1560 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr global.get $std/array/cwArr i32.const -4 i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - i32.const 1504 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1600 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 185 + i32.const 160 + i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1544 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1640 + call $~lib/util/runtime/makeArray global.set $std/array/cwArr - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/array/cwArr - i32.const -4 - i32.const -3 - i32.const 0 - call $~lib/array/Array#copyWithin|trampoline - end - i32.const 1584 + global.get $std/array/cwArr + i32.const -4 + i32.const -3 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#copyWithin + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1680 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 187 + i32.const 160 + i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 42 call $~lib/array/Array#unshift drop - block $~lib/array/Array#get:length|inlined.18 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 193 + i32.const 160 + i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18556,10 +14650,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 194 + i32.const 160 + i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18570,10 +14664,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 195 + i32.const 160 + i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18584,10 +14678,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 196 + i32.const 160 + i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18598,10 +14692,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 197 + i32.const 160 + i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18612,31 +14706,27 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 198 + i32.const 160 + i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr i32.const 41 call $~lib/array/Array#unshift drop - block $~lib/array/Array#get:length|inlined.19 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 5 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 202 + i32.const 160 + i32.const 204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18646,10 +14736,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 203 + i32.const 160 + i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18660,10 +14750,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 204 + i32.const 160 + i32.const 206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18674,10 +14764,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 205 + i32.const 160 + i32.const 207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18688,10 +14778,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 206 + i32.const 160 + i32.const 208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18702,10 +14792,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 207 + i32.const 160 + i32.const 209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18716,10 +14806,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 208 + i32.const 160 + i32.const 210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18731,27 +14821,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 214 + i32.const 160 + i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.20 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 215 + i32.const 160 + i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18761,10 +14847,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 216 + i32.const 160 + i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18775,10 +14861,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 217 + i32.const 160 + i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18789,10 +14875,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 218 + i32.const 160 + i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18803,10 +14889,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 219 + i32.const 160 + i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18817,10 +14903,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 220 + i32.const 160 + i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18832,27 +14918,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 224 + i32.const 160 + i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.21 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 225 + i32.const 160 + i32.const 227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18862,10 +14944,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 226 + i32.const 160 + i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18876,10 +14958,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 227 + i32.const 160 + i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18890,10 +14972,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 228 + i32.const 160 + i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18904,30 +14986,26 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 229 + i32.const 160 + i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr call $~lib/array/Array#reverse drop - block $~lib/array/Array#get:length|inlined.22 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 235 + i32.const 160 + i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18937,10 +15015,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 236 + i32.const 160 + i32.const 238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18951,10 +15029,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 237 + i32.const 160 + i32.const 239 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18965,10 +15043,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 238 + i32.const 160 + i32.const 240 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -18979,10 +15057,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 239 + i32.const 160 + i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19004,10 +15082,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 248 + i32.const 160 + i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19021,10 +15099,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 252 + i32.const 160 + i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19038,10 +15116,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 256 + i32.const 160 + i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19055,10 +15133,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 260 + i32.const 160 + i32.const 262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19072,10 +15150,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 264 + i32.const 160 + i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19089,10 +15167,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 268 + i32.const 160 + i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19106,10 +15184,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 272 + i32.const 160 + i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19123,10 +15201,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 276 + i32.const 160 + i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19140,10 +15218,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 280 + i32.const 160 + i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19157,28 +15235,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 284 + i32.const 160 + i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.0 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 44 - local.set $1 - i32.const 0 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 44 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19186,28 +15252,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 290 + i32.const 160 + i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.1 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 42 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 42 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19215,28 +15269,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 294 + i32.const 160 + i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.2 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 45 - local.set $1 - i32.const 0 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 45 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 0 @@ -19244,28 +15286,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 298 + i32.const 160 + i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.3 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 100 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 100 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 0 @@ -19273,28 +15303,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 302 + i32.const 160 + i32.const 304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.4 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const -100 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -100 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19302,28 +15320,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 306 + i32.const 160 + i32.const 308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.5 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const -2 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -2 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19331,28 +15337,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 310 + i32.const 160 + i32.const 312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.6 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const -4 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const -4 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19360,28 +15354,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 314 + i32.const 160 + i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.7 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 0 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end + global.get $std/array/arr + i32.const 43 i32.const 0 - i32.ne + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19389,28 +15371,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 318 + i32.const 160 + i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.8 (result i32) - global.get $std/array/arr - local.set $0 - i32.const 43 - local.set $1 - i32.const 1 - local.set $2 - local.get $0 - local.get $1 - local.get $2 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 1 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19418,28 +15388,16 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 322 + i32.const 160 + i32.const 324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#includes|inlined.9 (result i32) - global.get $std/array/arr - local.set $2 - i32.const 43 - local.set $1 - i32.const 2 - local.set $0 - local.get $2 - local.get $1 - local.get $0 - call $~lib/array/Array#indexOf - i32.const 0 - i32.ge_s - end - i32.const 0 - i32.ne + global.get $std/array/arr + i32.const 43 + i32.const 2 + call $~lib/array/Array#includes global.set $std/array/includes global.get $std/array/includes i32.const 1 @@ -19447,10 +15405,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 326 + i32.const 160 + i32.const 328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19458,21 +15416,17 @@ i32.const 1 call $~lib/array/Array#splice drop - block $~lib/array/Array#get:length|inlined.23 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 330 + i32.const 160 + i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19482,10 +15436,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 331 + i32.const 160 + i32.const 333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19496,10 +15450,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 332 + i32.const 160 + i32.const 334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19510,427 +15464,563 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 333 + i32.const 160 + i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const 0 - i32.const 0 - call $~lib/array/Array#splice|trampoline - end - i32.const 1664 + global.get $std/array/sarr + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1792 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 338 + i32.const 160 + i32.const 340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 1680 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 1832 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 339 + i32.const 160 + i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1720 - global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const 2 - i32.const 0 - call $~lib/array/Array#splice|trampoline - end - i32.const 1760 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1848 + call $~lib/util/runtime/makeArray + global.set $std/array/sarr + global.get $std/array/sarr + i32.const 2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + i32.const 3 + i32.const 2 + i32.const 17 + i32.const 1888 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 342 + i32.const 160 + i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 1784 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 1920 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 343 + i32.const 160 + i32.const 345 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1824 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 1944 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 2 i32.const 2 call $~lib/array/Array#splice - i32.const 1848 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 1984 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 346 + i32.const 160 + i32.const 348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 1888 + i32.const 3 + i32.const 2 + i32.const 17 + i32.const 2008 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 347 + i32.const 160 + i32.const 349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1928 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2040 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 0 i32.const 1 call $~lib/array/Array#splice - i32.const 1952 + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 2080 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 350 + i32.const 160 + i32.const 352 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 1992 + i32.const 4 + i32.const 2 + i32.const 17 + i32.const 2104 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 351 + i32.const 160 + i32.const 353 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2032 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2136 + call $~lib/util/runtime/makeArray global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const -1 - i32.const 0 - call $~lib/array/Array#splice|trampoline - end - i32.const 2056 + global.get $std/array/sarr + i32.const -1 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 2176 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 354 + i32.const 160 + i32.const 356 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2096 + i32.const 4 + i32.const 2 + i32.const 17 + i32.const 2200 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 355 + i32.const 160 + i32.const 357 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2136 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2232 + call $~lib/util/runtime/makeArray global.set $std/array/sarr - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/array/sarr - i32.const -2 - i32.const 0 - call $~lib/array/Array#splice|trampoline - end - i32.const 2160 + global.get $std/array/sarr + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/array/Array#splice + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 2272 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 358 + i32.const 160 + i32.const 360 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2200 + i32.const 3 + i32.const 2 + i32.const 17 + i32.const 2296 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 359 + i32.const 160 + i32.const 361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2240 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2328 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const 1 call $~lib/array/Array#splice - i32.const 2264 + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 2368 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 362 + i32.const 160 + i32.const 364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2304 + i32.const 4 + i32.const 2 + i32.const 17 + i32.const 2392 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 363 + i32.const 160 + i32.const 365 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2344 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2424 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -7 i32.const 1 call $~lib/array/Array#splice - i32.const 2368 + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 2464 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 366 + i32.const 160 + i32.const 368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2408 + i32.const 4 + i32.const 2 + i32.const 17 + i32.const 2488 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 367 + i32.const 160 + i32.const 369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2448 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2520 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const -2 i32.const -1 call $~lib/array/Array#splice - i32.const 2464 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2560 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 370 + i32.const 160 + i32.const 372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2504 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2576 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 371 + i32.const 160 + i32.const 373 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2544 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2616 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 1 i32.const -2 call $~lib/array/Array#splice - i32.const 2560 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2656 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 374 + i32.const 160 + i32.const 376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2600 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2672 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 375 + i32.const 160 + i32.const 377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2640 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2712 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 4 i32.const 0 call $~lib/array/Array#splice - i32.const 2656 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2752 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 378 + i32.const 160 + i32.const 380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2696 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2768 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 379 + i32.const 160 + i32.const 381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2736 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2808 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 0 call $~lib/array/Array#splice - i32.const 2752 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2848 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 382 + i32.const 160 + i32.const 384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2792 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2864 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 383 + i32.const 160 + i32.const 385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2832 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2904 + call $~lib/util/runtime/makeArray global.set $std/array/sarr global.get $std/array/sarr i32.const 7 i32.const 5 call $~lib/array/Array#splice - i32.const 2848 + i32.const 0 + i32.const 2 + i32.const 17 + i32.const 2944 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 386 + i32.const 160 + i32.const 388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/sarr - i32.const 2888 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 2960 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 387 + i32.const 160 + i32.const 389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19959,10 +16049,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 397 + i32.const 160 + i32.const 399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19975,10 +16065,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 400 + i32.const 160 + i32.const 402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -19991,10 +16081,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 403 + i32.const 160 + i32.const 405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20007,27 +16097,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 411 + i32.const 160 + i32.const 413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.24 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 412 + i32.const 160 + i32.const 414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20040,10 +16126,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 414 + i32.const 160 + i32.const 416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20068,27 +16154,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 427 + i32.const 160 + i32.const 429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.25 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 428 + i32.const 160 + i32.const 430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20109,10 +16191,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 436 + i32.const 160 + i32.const 438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20125,10 +16207,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 439 + i32.const 160 + i32.const 441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20141,27 +16223,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 447 + i32.const 160 + i32.const 449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.26 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 448 + i32.const 160 + i32.const 450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20174,10 +16252,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 450 + i32.const 160 + i32.const 452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20202,27 +16280,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 463 + i32.const 160 + i32.const 465 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.27 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 464 + i32.const 160 + i32.const 466 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20243,10 +16317,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 472 + i32.const 160 + i32.const 474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20259,10 +16333,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 475 + i32.const 160 + i32.const 477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20275,27 +16349,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 483 + i32.const 160 + i32.const 485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.28 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 484 + i32.const 160 + i32.const 486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20308,10 +16378,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 486 + i32.const 160 + i32.const 488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20336,27 +16406,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 499 + i32.const 160 + i32.const 501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.29 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 500 + i32.const 160 + i32.const 502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20378,10 +16444,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 509 + i32.const 160 + i32.const 511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -20395,27 +16461,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 518 + i32.const 160 + i32.const 520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.30 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 519 + i32.const 160 + i32.const 521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -20429,10 +16491,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 522 + i32.const 160 + i32.const 524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20458,27 +16520,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 536 + i32.const 160 + i32.const 538 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.31 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 537 + i32.const 160 + i32.const 539 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20492,21 +16550,17 @@ global.get $std/array/arr i32.const 21 call $~lib/array/Array#forEach - block $~lib/array/Array#get:length|inlined.32 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 100 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 562 + i32.const 160 + i32.const 564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|0 @@ -20550,21 +16604,17 @@ i32.const 22 call $~lib/array/Array#map global.set $std/array/newArr - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/array/newArr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/newArr + call $~lib/array/Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 573 + i32.const 160 + i32.const 575 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/newArr @@ -20578,10 +16628,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 574 + i32.const 160 + i32.const 576 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -20596,27 +16646,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 583 + i32.const 160 + i32.const 585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.33 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 584 + i32.const 160 + i32.const 586 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -20631,10 +16677,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 591 + i32.const 160 + i32.const 593 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20661,27 +16707,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 606 + i32.const 160 + i32.const 608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.34 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 607 + i32.const 160 + i32.const 609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20696,21 +16738,17 @@ i32.const 26 call $~lib/array/Array#filter global.set $std/array/filteredArr - block $~lib/array/Array#get:length|inlined.35 (result i32) - global.get $std/array/filteredArr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/filteredArr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 615 + i32.const 160 + i32.const 617 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -20725,27 +16763,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 624 + i32.const 160 + i32.const 626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.36 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 625 + i32.const 160 + i32.const 627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -20760,10 +16794,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 632 + i32.const 160 + i32.const 634 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20790,27 +16824,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 647 + i32.const 160 + i32.const 649 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.37 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 648 + i32.const 160 + i32.const 650 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20832,10 +16862,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 656 + i32.const 160 + i32.const 658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20849,10 +16879,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 660 + i32.const 160 + i32.const 662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20868,10 +16898,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 663 + i32.const 160 + i32.const 665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20887,10 +16917,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 666 + i32.const 160 + i32.const 668 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20904,27 +16934,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 674 + i32.const 160 + i32.const 676 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.38 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 675 + i32.const 160 + i32.const 677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20938,10 +16964,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 677 + i32.const 160 + i32.const 679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -20967,27 +16993,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 690 + i32.const 160 + i32.const 692 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.39 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 691 + i32.const 160 + i32.const 693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -21009,10 +17031,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 699 + i32.const 160 + i32.const 701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -21026,10 +17048,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 703 + i32.const 160 + i32.const 705 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -21045,10 +17067,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 706 + i32.const 160 + i32.const 708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -21064,10 +17086,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 709 + i32.const 160 + i32.const 711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -21081,27 +17103,23 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 717 + i32.const 160 + i32.const 719 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.40 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 718 + i32.const 160 + i32.const 720 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -21115,10 +17133,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 720 + i32.const 160 + i32.const 722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -21143,28 +17161,24 @@ i32.eq i32.eqz if - i32.const 0 - i32.const 120 - i32.const 733 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/array/Array#get:length|inlined.41 (result i32) - global.get $std/array/arr - local.set $0 - local.get $0 - i32.load offset=4 + i32.const 0 + i32.const 160 + i32.const 735 + i32.const 0 + call $~lib/builtins/abort + unreachable end + global.get $std/array/arr + call $~lib/array/Array#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 734 + i32.const 160 + i32.const 736 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/arr @@ -21195,16 +17209,20 @@ end drop global.get $std/array/f32ArrayTyped - i32.const 3240 + i32.const 8 + i32.const 2 + i32.const 22 + i32.const 3312 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 821 + i32.const 160 + i32.const 824 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -21216,16 +17234,20 @@ end drop global.get $std/array/f64ArrayTyped - i32.const 3512 + i32.const 8 + i32.const 3 + i32.const 23 + i32.const 3472 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 825 + i32.const 160 + i32.const 828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -21237,16 +17259,20 @@ end drop global.get $std/array/i32ArrayTyped - i32.const 3592 + i32.const 5 + i32.const 2 + i32.const 17 + i32.const 3624 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 829 + i32.const 160 + i32.const 832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -21258,16 +17284,20 @@ end drop global.get $std/array/u32ArrayTyped - i32.const 3672 + i32.const 5 + i32.const 2 + i32.const 21 + i32.const 3736 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 833 + i32.const 160 + i32.const 836 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 64 @@ -21290,31 +17320,39 @@ global.get $std/array/reversed1 call $std/array/assertSortedDefault global.get $std/array/reversed1 - i32.const 3840 + i32.const 1 + i32.const 2 + i32.const 17 + i32.const 4064 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 853 + i32.const 160 + i32.const 856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed2 call $std/array/assertSortedDefault global.get $std/array/reversed2 - i32.const 3864 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 4088 + call $~lib/util/runtime/makeArray i32.const 0 call $std/array/isArraysEqual i32.eqz if i32.const 0 - i32.const 120 - i32.const 856 + i32.const 160 + i32.const 859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed4 @@ -21326,10 +17364,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 859 + i32.const 160 + i32.const 862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed64 @@ -21341,10 +17379,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 862 + i32.const 160 + i32.const 865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed128 @@ -21356,10 +17394,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 865 + i32.const 160 + i32.const 868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed1024 @@ -21371,10 +17409,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 868 + i32.const 160 + i32.const 871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/reversed10000 @@ -21386,10 +17424,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 871 + i32.const 160 + i32.const 874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/array/randomized512 @@ -21429,19 +17467,19 @@ global.set $~lib/argc global.get $std/array/randomStringsActual i32.const 0 - call $std/array/assertSorted<~lib/string/String>|trampoline + call $std/array/assertSorted<~lib/string/String | null>|trampoline end global.get $std/array/randomStringsActual global.get $std/array/randomStringsExpected i32.const 0 - call $std/array/isArraysEqual<~lib/string/String> + call $std/array/isArraysEqual<~lib/string/String | null> i32.eqz if i32.const 0 - i32.const 120 - i32.const 901 + i32.const 160 + i32.const 904 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 400 @@ -21454,364 +17492,736 @@ i32.const 0 call $std/array/assertSorted<~lib/string/String>|trampoline end - i32.const 4240 - i32.const 4216 + i32.const 2 + i32.const 0 + i32.const 29 + i32.const 4560 + call $~lib/util/runtime/makeArray + i32.const 4536 call $~lib/array/Array#join - i32.const 4248 + i32.const 4584 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 910 + i32.const 160 + i32.const 913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 4872 - i32.const 3904 + i32.const 3 + i32.const 2 + i32.const 17 + i32.const 5128 + call $~lib/util/runtime/makeArray + i32.const 4208 call $~lib/array/Array#join - i32.const 4880 + i32.const 5160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 911 + i32.const 160 + i32.const 914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 4976 - i32.const 4936 + i32.const 3 + i32.const 2 + i32.const 21 + i32.const 5248 + call $~lib/util/runtime/makeArray + i32.const 5224 call $~lib/array/Array#join - i32.const 4880 + i32.const 5160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 912 + i32.const 160 + i32.const 915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 5032 - i32.const 5008 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 5328 + call $~lib/util/runtime/makeArray + i32.const 5304 call $~lib/array/Array#join - i32.const 5040 + i32.const 5352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 913 + i32.const 160 + i32.const 916 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 6688 - i32.const 5168 + i32.const 6 + i32.const 3 + i32.const 23 + i32.const 6680 + call $~lib/util/runtime/makeArray + i32.const 5480 call $~lib/array/Array#join - i32.const 6696 + i32.const 6744 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 914 + i32.const 160 + i32.const 917 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 6864 - i32.const 3904 + i32.const 3 + i32.const 2 + i32.const 28 + i32.const 6896 + call $~lib/util/runtime/makeArray + i32.const 4208 call $~lib/array/Array<~lib/string/String>#join - i32.const 6784 + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 915 + i32.const 160 + i32.const 918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) - i32.const 0 i32.const 3 - call $~lib/array/Array#constructor - local.set $3 - local.get $3 - i32.const 0 - i32.const 0 - call $std/array/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 - i32.const 1 - i32.const 0 - call $~lib/array/Array#__unchecked_set - local.get $3 i32.const 2 + i32.const 33 i32.const 0 - call $std/array/Ref#constructor - call $~lib/array/Array#__unchecked_set - local.get $3 + call $~lib/util/runtime/makeArray + local.set $0 + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + block (result i32) + i32.const 0 + call $std/array/Ref#constructor + local.set $2 + local.get $2 + if + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + end + local.get $2 + end + i32.store + local.get $1 + block (result i32) + i32.const 0 + local.set $2 + local.get $2 + if + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + end + local.get $2 + end + i32.store offset=4 + local.get $1 + block (result i32) + i32.const 0 + call $std/array/Ref#constructor + local.set $2 + local.get $2 + if + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + end + local.get $2 + end + i32.store offset=8 + local.get $0 end global.set $std/array/refArr global.get $std/array/refArr - i32.const 4216 - call $~lib/array/Array#join - i32.const 6912 + i32.const 4536 + call $~lib/array/Array#join + i32.const 6976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 917 + i32.const 160 + i32.const 920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - global.get $std/array/reversed0 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + global.get $std/array/reversed0 + call $~lib/array/Array#toString + i32.const 4208 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 924 + i32.const 0 + call $~lib/builtins/abort + unreachable end - i32.const 3904 + global.get $std/array/reversed1 + call $~lib/array/Array#toString + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 921 + i32.const 160 + i32.const 925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#toString|inlined.3 (result i32) - global.get $std/array/reversed1 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + global.get $std/array/reversed2 + call $~lib/array/Array#toString + i32.const 7056 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 926 + i32.const 0 + call $~lib/builtins/abort + unreachable end - i32.const 6784 + global.get $std/array/reversed4 + call $~lib/array/Array#toString + i32.const 7080 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 922 + i32.const 160 + i32.const 927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#toString|inlined.5 (result i32) - global.get $std/array/reversed2 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + i32.const 3 + i32.const 0 + i32.const 34 + i32.const 7136 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#toString + i32.const 7160 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 929 + i32.const 0 + call $~lib/builtins/abort + unreachable end - i32.const 6984 + i32.const 3 + i32.const 1 + i32.const 35 + i32.const 7216 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#toString + i32.const 7240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 923 + i32.const 160 + i32.const 930 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#toString|inlined.7 (result i32) - global.get $std/array/reversed4 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + i32.const 3 + i32.const 3 + i32.const 30 + i32.const 7320 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#toString + i32.const 7360 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 931 + i32.const 0 + call $~lib/builtins/abort + unreachable end - i32.const 7000 + i32.const 4 + i32.const 3 + i32.const 36 + i32.const 7472 + call $~lib/util/runtime/makeArray + call $~lib/array/Array#toString + i32.const 7520 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 924 + i32.const 160 + i32.const 932 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7064 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + global.get $std/array/randomStringsExpected + call $~lib/array/Array<~lib/string/String | null>#toString + i32.const 7624 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 933 + i32.const 0 + call $~lib/builtins/abort + unreachable end - i32.const 7072 + i32.const 4 + i32.const 2 + i32.const 28 + i32.const 7752 + call $~lib/util/runtime/makeArray + call $~lib/array/Array<~lib/string/String>#toString + i32.const 7784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 926 + i32.const 160 + i32.const 934 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7128 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block (result i32) + i32.const 2 + i32.const 2 + i32.const 24 + i32.const 0 + call $~lib/util/runtime/makeArray + local.set $1 + local.get $1 + i32.load offset=4 + local.set $0 + local.get $0 + block (result i32) + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 7840 + call $~lib/util/runtime/makeArray + local.set $2 + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store + local.get $0 + block (result i32) + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 7864 + call $~lib/util/runtime/makeArray + local.set $2 + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store offset=4 + local.get $1 + end + global.set $std/array/subarr32 + global.get $std/array/subarr32 + call $~lib/array/Array<~lib/array/Array>#toString + i32.const 7888 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 160 + i32.const 937 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + block (result i32) + i32.const 2 + i32.const 2 + i32.const 37 + i32.const 0 + call $~lib/util/runtime/makeArray + local.set $0 + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + block (result i32) + i32.const 2 + i32.const 0 + i32.const 20 + i32.const 7944 + call $~lib/util/runtime/makeArray + local.set $2 + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store + local.get $1 + block (result i32) + i32.const 2 + i32.const 0 + i32.const 20 + i32.const 7968 + call $~lib/util/runtime/makeArray + local.set $2 + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $2 + end + i32.store offset=4 + local.get $0 end - i32.const 7136 + global.set $std/array/subarr8 + global.get $std/array/subarr8 + call $~lib/array/Array<~lib/array/Array>#toString + i32.const 7888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 927 + i32.const 160 + i32.const 940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7232 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join + block (result i32) + i32.const 1 + i32.const 2 + i32.const 39 + i32.const 0 + call $~lib/util/runtime/makeArray + local.set $0 + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + block (result i32) + block (result i32) + i32.const 1 + i32.const 2 + i32.const 38 + i32.const 0 + call $~lib/util/runtime/makeArray + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + block (result i32) + i32.const 1 + i32.const 2 + i32.const 21 + i32.const 8064 + call $~lib/util/runtime/makeArray + local.set $4 + local.get $4 + local.get $2 + call $~lib/collector/dummy/__ref_link + local.get $4 + end + i32.store + local.get $2 + end + local.set $3 + local.get $3 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $3 + end + i32.store + local.get $0 end - i32.const 7240 + global.set $std/array/subarrU32 + global.get $std/array/subarrU32 + call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString + i32.const 6840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 928 + i32.const 160 + i32.const 943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#toString|inlined.1 (result i32) - i32.const 7432 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array#join - end - i32.const 7440 - call $~lib/string/String.__eq + ) + (func $std/array/main (; 287 ;) (type $FUNCSIG$v) + global.get $~lib/started i32.eqz if - i32.const 0 - i32.const 120 - i32.const 929 - i32.const 0 - call $~lib/env/abort - unreachable + call $start + i32.const 1 + global.set $~lib/started end - block $~lib/array/Array<~lib/string/String>#toString|inlined.1 (result i32) - global.get $std/array/randomStringsExpected - local.set $3 + ) + (func $~lib/runtime/runtime.instanceof (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 local.get $3 - i32.const 4216 - call $~lib/array/Array<~lib/string/String>#join - end - i32.const 7528 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 930 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort - unreachable end - block $~lib/array/Array<~lib/string/String>#toString|inlined.3 (result i32) - i32.const 7648 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array<~lib/string/String>#join + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end end - i32.const 7656 - call $~lib/string/String.__eq + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 289 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 931 - i32.const 0 - call $~lib/env/abort - unreachable + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u end - block $~lib/array/Array<~lib/array/Array>#toString|inlined.1 (result i32) - global.get $std/array/subarr32 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array<~lib/array/Array>#join + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load end - i32.const 7744 - call $~lib/string/String.__eq + ) + (func $~lib/runtime/runtime.newObject (; 290 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 291 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 292 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 293 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 i32.eqz if i32.const 0 - i32.const 120 - i32.const 934 - i32.const 0 - call $~lib/env/abort - unreachable + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 end - block $~lib/array/Array<~lib/array/Array>#toString|inlined.1 (result i32) - global.get $std/array/subarr8 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array<~lib/array/Array>#join + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 end - i32.const 7744 - call $~lib/string/String.__eq - i32.eqz + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and if - i32.const 0 - i32.const 120 - i32.const 937 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#toString|inlined.1 (result i32) - global.get $std/array/subarrU32 - local.set $3 - local.get $3 - i32.const 4216 - call $~lib/array/Array<~lib/array/Array<~lib/array/Array>>#join + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end - i32.const 6784 - call $~lib/string/String.__eq + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 294 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 i32.eqz if i32.const 0 - i32.const 120 - i32.const 940 - i32.const 0 - call $~lib/env/abort - unreachable + call $~lib/util/runtime/allocate + i32.const 40 + call $~lib/util/runtime/register + local.set $0 end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 295 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link ) - (func $start (; 227 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.release (; 296 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 297 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 298 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 299 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 300 ;) (type $FUNCSIG$v) call $start:std/array + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 228 ;) (type $FUNCSIG$v) + (func $null (; 301 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/arraybuffer.json b/tests/compiler/std/arraybuffer.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 b0ec760789..4373eeb8ca 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,32 +1,46 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\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") - (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 160) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 224) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 240) "\e0\00\00\00\02") - (data (i32.const 248) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00&") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00(") + (data (i32.const 80) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00$") + (data (i32.const 136) "s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 176) "\0f\00\00\00\08") + (data (i32.const 192) "\01\00\00\00\02") + (data (i32.const 200) "\10\00\00\00 ") + (data (i32.const 216) "~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 248) "\10\00\00\00\1e") + (data (i32.const 264) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 296) "\1d\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) - (global $~lib/argc (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -88,1157 +102,370 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (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 56 - 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.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 3 ;) (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 + i32.store offset=4 local.get $1 + i32.const 16 i32.add - i32.const 1 - i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 2 - i32.le_u - if - return + ) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 end + ) + (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) 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.const 536 i32.le_u if - return + i32.const 0 + i32.const 80 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable 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.const 16 i32.sub - i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 80 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable 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/memory/memcpy (; 4 ;) (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 (; 5 ;) (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 + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u if - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return + i32.const 0 + i32.const 24 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable end local.get $0 + call $~lib/util/runtime/allocate + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/memory/memory.copy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 local.get $0 - i32.const 7 - i32.and + local.get $1 i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + 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 - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 1 - i32.sub - local.set $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 @@ -1253,100 +480,71 @@ 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.const 1 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 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq 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 + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 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 + 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|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -1354,35 +552,20 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 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/arraybuffer/ArrayBuffer#slice (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 local.set $3 local.get $1 i32.const 0 @@ -1436,55 +619,45 @@ i32.gt_s select local.tee $2 - call $~lib/internal/arraybuffer/allocateUnsafe + call $~lib/util/runtime/allocate local.tee $3 - i32.const 8 - i32.add local.get $0 - i32.const 8 - i32.add local.get $1 i32.add local.get $2 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $3 + i32.const 15 + call $~lib/util/runtime/register ) - (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 1073741816 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#slice - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) i32.const 1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $1 - i32.const 8 - i32.add + i32.const 1073741808 + local.get $1 + i32.shr_u + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 12 + i32.const 57 + call $~lib/builtins/abort + unreachable + end i32.const 1 - call $~lib/internal/memory/memset + local.get $1 + i32.shl + local.tee $2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1500,152 +673,147 @@ local.get $1 i32.store local.get $0 - i32.const 0 + local.get $1 i32.store offset=4 local.get $0 - i32.const 1 + local.get $2 i32.store offset=8 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 9 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) (local $1 i32) - i32.const 4 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $1 + i32.const 16 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.tee $0 i32.const 8 - i32.add - i32.const 4 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - i32.const 0 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.tee $1 i32.store local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 local.get $1 - i32.store - local.get $0 - i32.const 0 i32.store offset=4 local.get $0 - i32.const 4 - i32.store offset=8 - local.get $0 - ) - (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block (result i32) - local.get $1 - i32.const -2147483648 - i32.eq - if - local.get $0 - i32.load - local.set $1 - end - local.get $1 - i32.const 1073741816 - i32.gt_u - end - if - i32.const 0 - i32.const 248 - i32.const 15 - i32.const 44 - call $~lib/env/abort - unreachable - end + i32.const 8 + i32.store offset=8 + local.get $0 + i32.const 2 + i32.store offset=12 local.get $1 + i32.const 192 + i32.const 8 + call $~lib/memory/memory.copy local.get $0 - i32.load - i32.gt_s + ) + (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + i32.const 1073741808 + i32.gt_u + local.get $1 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.gt_u + i32.or if i32.const 0 - i32.const 248 - i32.const 16 - i32.const 53 - call $~lib/env/abort + i32.const 216 + i32.const 21 + i32.const 6 + call $~lib/builtins/abort unreachable end i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 29 + call $~lib/util/runtime/register local.tee $2 - local.get $0 + i32.const 0 i32.store local.get $2 i32.const 0 i32.store offset=4 local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $2 local.get $1 i32.store offset=8 local.get $2 ) - (func $start:std/arraybuffer (; 11 ;) (type $FUNCSIG$v) - (local $0 i32) + (func $~lib/dataview/DataView#constructor|trampoline (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - i32.const 288 + block $2of2 + block $1of2 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $1of2 $1of2 $2of2 $outOfRange + end + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + local.set $1 + end + local.get $0 + local.get $1 + call $~lib/dataview/DataView#constructor + ) + (func $start:std/arraybuffer (; 12 ;) (type $FUNCSIG$v) + i32.const 536 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 8 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $0 - i32.const 8 - i32.add - i32.const 8 - call $~lib/internal/memory/memset - local.get $0 + call $~lib/arraybuffer/ArrayBuffer#constructor global.set $std/arraybuffer/buffer global.get $std/arraybuffer/buffer - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 5 + i32.const 136 + i32.const 3 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741808 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 8 i32.ne if i32.const 0 - i32.const 120 - i32.const 9 - i32.const 0 - call $~lib/env/abort - unreachable - end - global.get $std/arraybuffer/sliced - global.get $std/arraybuffer/buffer - i32.eq - if - i32.const 0 - i32.const 120 - i32.const 10 + i32.const 136 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/sliced @@ -1653,46 +821,48 @@ i32.eq if i32.const 0 - i32.const 120 - i32.const 11 + i32.const 136 + i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 1 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741808 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 7 i32.ne if i32.const 0 - i32.const 120 - i32.const 15 + i32.const 136 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const -1 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741808 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 1 i32.ne if i32.const 0 - i32.const 120 - i32.const 19 + i32.const 136 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1701,15 +871,17 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 23 + i32.const 136 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1718,15 +890,17 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 6 i32.ne if i32.const 0 - i32.const 120 - i32.const 27 + i32.const 136 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1735,15 +909,17 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 2 i32.ne if i32.const 0 - i32.const 120 - i32.const 31 + i32.const 136 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -1752,123 +928,293 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 16 + i32.sub + i32.load offset=4 i32.const 4 i32.ne if i32.const 0 - i32.const 120 - i32.const 35 + i32.const 136 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/arraybuffer/buffer i32.const 42 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline + i32.const 1073741808 + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + i32.const 16 + i32.sub + i32.load offset=4 if i32.const 0 - i32.const 120 - i32.const 39 + i32.const 136 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/sliced i32.eqz if i32.const 0 - i32.const 120 - i32.const 40 + i32.const 136 + i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor - global.set $std/arraybuffer/arr8 - i32.const 1 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + global.set $std/arraybuffer/arr8 + call $~lib/util/runtime/makeArray + drop global.get $std/arraybuffer/arr8 - select + if (result i32) + i32.const 1 + else + i32.const 0 + end i32.eqz if i32.const 0 - i32.const 120 - i32.const 50 + i32.const 136 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>5 (result i32) - i32.const 0 + block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>11 (result i32) + i32.const 1 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor - i32.eqz - br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>5 + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>11 drop - i32.const 1 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 120 - i32.const 51 + i32.const 136 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 global.set $~lib/argc - block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>6 (result i32) + block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView>12 (result i32) + i32.const 1 global.get $std/arraybuffer/arr8 i32.load - local.set $1 + call $~lib/dataview/DataView#constructor|trampoline + br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView>12 + drop i32.const 0 - local.set $0 - block $2of2 - block $1of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $1of2 $1of2 $2of2 $outOfRange - end - unreachable + end + i32.eqz + if + i32.const 0 + i32.const 136 + i32.const 49 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 296 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return end - i32.const -2147483648 - local.set $0 + local.get $0 + i32.const 3 + i32.shl + i32.const 296 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 end - i32.const 0 - local.get $1 + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) local.get $0 - call $~lib/dataview/DataView#constructor - i32.eqz - br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>6 - drop + i32.const 296 + i32.load + i32.gt_u + else i32.const 1 end - i32.eqz - if + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 296 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 296 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 296 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else i32.const 0 - i32.const 120 - i32.const 52 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 i32.const 0 - call $~lib/env/abort - unreachable end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 264 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 20 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 264 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 21 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 22 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/arraybuffer.ts b/tests/compiler/std/arraybuffer.ts index db69fe138e..77b5b8b833 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); @@ -7,7 +5,6 @@ assert(buffer.byteLength == 8); var sliced = buffer.slice(); assert(sliced.byteLength == 8); -assert(sliced.data != buffer.data); assert(sliced !== buffer); sliced = buffer.slice(1); diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index f15cf68451..40fb69f7d0 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -1,50 +1,51 @@ (module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\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") - (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 160) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 224) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 240) "\e0\00\00\00\02\00\00\00") - (data (i32.const 248) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 176) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 200) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 248) "\10\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 296) "\1d\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/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/util/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 $~lib/argc (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $std/arraybuffer/arr8 (mut i32) (i32.const 0)) - (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 284)) + (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 296)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 536)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (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/internal/arraybuffer/computeSize (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -52,7 +53,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -131,1972 +132,1242 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 5 ;) (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 + i32.store offset=4 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 + global.get $~lib/util/runtime/HEADER_SIZE 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/arraybuffer/ArrayBuffer#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.fill (; 5 ;) (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.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - local.get $2 - i32.const 0 - i32.ne - i32.eqz - if - local.get $3 - i32.const 8 + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 i32.add - local.set $4 - i32.const 0 - local.set $5 + i32.const 1 + i32.sub local.get $1 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $3 - ) - (func $~lib/internal/memory/memcpy (; 7 ;) (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 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 end - end - local.get $0 - i32.const 3 - i32.and - i32.const 0 - i32.eq - if - block $break|1 - loop $continue|1 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 local.get $2 - i32.const 16 + i32.const 32 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 $6 + i64.store local.get $0 i32.const 8 i32.add - local.get $1 - i32.const 8 - i32.add - i32.load - i32.store + local.get $6 + i64.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 $6 + i64.store local.get $0 - i32.const 16 + i32.const 24 i32.add - local.set $0 + local.get $6 + i64.store local.get $2 - i32.const 16 + i32.const 32 i32.sub local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 end - br $continue|1 + br $continue|0 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 + end + ) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 129 i32.const 4 - i32.and + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 24 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/util/runtime/allocate + local.set $2 + local.get $2 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $2 + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/memory/memory.copy (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq 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 + br $~lib/util/memory/memmove|inlined.0 end - local.get $2 - i32.const 2 - i32.and + local.get $0 + local.get $1 + i32.lt_u if - local.get $0 local.get $1 - i32.load16_u - i32.store16 + i32.const 7 + i32.and 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 + i32.const 7 + i32.and + i32.eq + if + block $break|0 + loop $continue|0 local.get $0 - i32.const 3 + i32.const 7 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 + if + block local.get $2 - i32.const 17 - i32.ge_u + i32.eqz 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 + br $~lib/util/memory/memmove|inlined.0 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 $2 + i32.const 1 + i32.sub + local.set $2 + block (result i32) local.get $0 - i32.const 12 + local.tee $5 + i32.const 1 i32.add - local.get $4 - i32.const 16 - i32.shr_u - local.get $3 - i32.const 16 - i32.shl - i32.or - i32.store + local.set $0 + local.get $5 + end + block (result i32) local.get $1 - i32.const 16 + local.tee $5 + i32.const 1 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 + local.get $5 end - br $continue|4 + i32.load8_u + i32.store8 end + br $continue|0 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 + block $break|1 + loop $continue|1 local.get $2 - i32.const 19 + i32.const 8 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 + i64.load + i64.store + local.get $2 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 + i32.sub + local.set $2 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.set $0 local.get $1 - i32.const 15 + i32.const 8 i32.add - i32.load - local.set $3 + 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 - i32.const 12 + local.tee $5 + i32.const 1 i32.add - local.get $4 - i32.const 8 - i32.shr_u - local.get $3 - i32.const 24 - i32.shl - i32.or - i32.store + local.set $0 + local.get $5 + end + block (result i32) local.get $1 - i32.const 16 + 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|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 + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 - i32.const 16 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 i32.add - local.set $0 + 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 16 + 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|5 + br $continue|4 end end end - br $break|2 - unreachable end - unreachable + 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 end - local.get $2 - i32.const 16 - i32.and + ) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 10 ;) (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.get $0 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $1 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $3 + local.get $2 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $2 + local.get $2 + local.get $1 + i32.sub + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $6 + local.get $6 + call $~lib/util/runtime/allocate + local.set $7 + local.get $7 + local.get $0 + local.get $1 + i32.add + local.get $6 + call $~lib/memory/memory.copy + local.get $7 + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 if block (result i32) local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end + end + i32.const 0 + ) + (func $~lib/arraybuffer/ArrayBuffer.isView (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end + end + i32.const 0 + ) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop i32.const 1 - i32.add - local.set $0 - local.get $5 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 end - local.get $2 - i32.const 4 - i32.and + i32.const 0 + ) + (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 if block (result i32) local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return end - i32.load8_u - i32.store8 block (result i32) local.get $0 - local.tee $5 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 + local.get $0 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop i32.const 1 - i32.add - local.set $0 - local.get $5 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 end - block (result i32) - local.get $1 - local.tee $5 + if i32.const 1 - i32.add - local.set $1 - local.get $5 + return 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 + drop + i32.const 0 + end + if i32.const 1 - i32.add - local.set $0 - local.get $5 + return end block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 + local.get $0 + drop + i32.const 0 end - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 8 ;) (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 + i32.const 1 + return 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 + block (result i32) + local.get $0 + drop + i32.const 0 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 + i32.const 1 + return end - end - ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 9 ;) (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.get $0 - i32.load - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $3 - local.get $1 - i32.add - local.tee $4 - i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - else - local.get $1 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select - end - local.set $1 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $3 - local.get $2 - i32.add - local.tee $4 - i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - else - local.get $2 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select - end - local.set $2 - local.get $2 - local.get $1 - i32.sub - local.tee $4 - i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - local.set $3 - local.get $3 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $6 - block $~lib/memory/memory.copy|inlined.0 - local.get $6 - i32.const 8 - i32.add - local.set $4 - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.add - local.set $5 - local.get $3 - local.set $7 - local.get $4 - local.get $5 - local.get $7 - call $~lib/internal/memory/memmove - end - local.get $6 - ) - (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end + block (result i32) + local.get $0 + drop i32.const 0 - local.set $1 end - i32.const 1073741816 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/arraybuffer/ArrayBuffer#slice - ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.eq - if - i32.const 0 - return - end - i32.const 0 - ) - (func $~lib/arraybuffer/ArrayBuffer.isView (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.eq - if - i32.const 0 - return - end - i32.const 0 - ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 0 - i32.eq - if - i32.const 0 - return + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end end - i32.const 1 - return - ) - (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array> (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 i32.const 0 - i32.eq - if - i32.const 0 - return - end - i32.const 1 - return ) (func $~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView> (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.const 0 - i32.eq if - i32.const 0 - return + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 0 + end + if + i32.const 1 + return + end + block (result i32) + local.get $0 + drop + i32.const 1 + end + if + i32.const 1 + return + end end - i32.const 1 - return - ) - (func $~lib/memory/memory.allocate (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + i32.const 0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 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.get $1 - i32.const 1073741816 + global.get $~lib/util/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 160 - i32.const 23 - i32.const 34 - call $~lib/env/abort + i32.const 24 + i32.const 12 + i32.const 57 + call $~lib/builtins/abort unreachable end - local.get $1 i32.const 0 - i32.shl - local.set $2 + local.get $1 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 - block $~lib/memory/memory.fill|inlined.1 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end block (result i32) local.get $0 i32.eqz if i32.const 12 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -2113,173 +1384,143 @@ local.get $3 i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/util/runtime/makeArray (; 18 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) + i32.const 16 + call $~lib/util/runtime/allocate + local.get $2 + call $~lib/util/runtime/register + local.set $4 + local.get $0 local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 160 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.2 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.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 - i32.const 0 - i32.store offset=8 - local.get $0 - end - local.get $3 + local.set $5 + local.get $5 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.set $6 + local.get $4 + local.get $6 i32.store - local.get $0 - i32.const 0 + local.get $4 + local.get $6 i32.store offset=4 - local.get $0 - local.get $2 + local.get $4 + local.get $5 i32.store offset=8 + local.get $4 local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end + local.get $4 ) - (func $~lib/typedarray/Int32Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/dataview/DataView#constructor (; 21 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 20 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) local.get $3 - global.get $~lib/builtins/i32.MIN_VALUE - i32.eq - if - local.get $1 - i32.load - local.get $2 - i32.sub - local.set $3 - end - local.get $2 - i32.const 1073741816 + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u - if - i32.const 0 - i32.const 248 - i32.const 14 - i32.const 44 - call $~lib/env/abort - unreachable - end + local.get $2 local.get $3 - i32.const 1073741816 + i32.add + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.gt_u + i32.or if i32.const 0 - i32.const 248 - i32.const 15 - i32.const 44 - call $~lib/env/abort + i32.const 216 + i32.const 21 + i32.const 6 + call $~lib/builtins/abort unreachable end - local.get $2 - local.get $3 - i32.add - local.get $1 - i32.load - i32.gt_s - if + block (result i32) + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 29 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 i32.const 0 - i32.const 248 - i32.const 16 - i32.const 53 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 end - local.get $0 local.get $1 i32.store - local.get $0 + local.get $1 local.get $2 + i32.add + local.set $4 + local.get $0 + local.get $4 i32.store offset=4 local.get $0 local.get $3 i32.store offset=8 local.get $0 ) + (func $~lib/typedarray/Uint8Array#get:buffer (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + ) (func $~lib/dataview/DataView#constructor|trampoline (; 22 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $2of2 block $1of2 @@ -2295,7 +1536,8 @@ i32.const 0 local.set $2 end - global.get $~lib/builtins/i32.MIN_VALUE + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength local.set $3 end local.get $0 @@ -2305,70 +1547,49 @@ call $~lib/dataview/DataView#constructor ) (func $start:std/arraybuffer (; 23 ;) (type $FUNCSIG$v) - (local $0 i32) - call $start:~lib/allocator/arena + 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 i32.const 0 i32.const 8 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor global.set $std/arraybuffer/buffer global.get $std/arraybuffer/buffer - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 5 + i32.const 136 + i32.const 3 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 0 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 0 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 0 + global.get $~lib/util/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 8 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 9 - i32.const 0 - call $~lib/env/abort - unreachable - end - block $~lib/arraybuffer/ArrayBuffer#get:data|inlined.0 (result i32) - global.get $std/arraybuffer/sliced - local.set $0 - local.get $0 - i32.const 8 - i32.add - end - block $~lib/arraybuffer/ArrayBuffer#get:data|inlined.1 (result i32) - global.get $std/arraybuffer/buffer - local.set $0 - local.get $0 - i32.const 8 - i32.add - end - i32.ne - i32.eqz - if - i32.const 0 - i32.const 120 - i32.const 10 + i32.const 136 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/sliced @@ -2377,54 +1598,46 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 11 + i32.const 136 + i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 1 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 7 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 15 + i32.const 136 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const -1 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const -1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 19 + i32.const 136 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -2433,16 +1646,16 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 23 + i32.const 136 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -2451,16 +1664,16 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 6 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 27 + i32.const 136 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -2469,16 +1682,16 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 31 + i32.const 136 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/buffer @@ -2487,38 +1700,34 @@ call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 35 + i32.const 136 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/arraybuffer/buffer - i32.const 42 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#slice|trampoline - end + global.get $std/arraybuffer/buffer + i32.const 42 + global.get $~lib/util/runtime/MAX_BYTELENGTH + call $~lib/arraybuffer/ArrayBuffer#slice global.set $std/arraybuffer/sliced global.get $std/arraybuffer/sliced - i32.load + call $~lib/arraybuffer/ArrayBuffer#get:byteLength i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 120 - i32.const 39 + i32.const 136 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/sliced @@ -2527,10 +1736,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 40 + i32.const 136 + i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2539,10 +1748,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 42 + i32.const 136 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2551,10 +1760,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 43 + i32.const 136 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2563,10 +1772,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 44 + i32.const 136 + i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2575,10 +1784,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 45 + i32.const 136 + i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2587,26 +1796,30 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 46 + i32.const 136 + i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1 call $~lib/typedarray/Uint8Array#constructor global.set $std/arraybuffer/arr8 - i32.const 240 + i32.const 2 + i32.const 2 + i32.const 17 + i32.const 192 + call $~lib/util/runtime/makeArray call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array> i32.eqz i32.eqz if i32.const 0 - i32.const 120 - i32.const 49 + i32.const 136 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/arraybuffer/arr8 @@ -2614,10 +1827,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 50 + i32.const 136 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2627,10 +1840,10 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 51 + i32.const 136 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -2638,7 +1851,7 @@ global.set $~lib/argc i32.const 0 global.get $std/arraybuffer/arr8 - i32.load + call $~lib/typedarray/Uint8Array#get:buffer i32.const 0 i32.const 0 call $~lib/dataview/DataView#constructor|trampoline @@ -2647,16 +1860,208 @@ i32.eqz if i32.const 0 - i32.const 120 - i32.const 52 + i32.const 136 + i32.const 49 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 29 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 264 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 32 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 264 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable ) - (func $start (; 24 ;) (type $FUNCSIG$v) + (func $start (; 34 ;) (type $FUNCSIG$v) call $start:std/arraybuffer ) - (func $null (; 25 ;) (type $FUNCSIG$v) + (func $null (; 35 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/dataview.json b/tests/compiler/std/dataview.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 9727ff2dde..6533820060 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,35 +1,50 @@ (module - (type $FUNCSIG$v (func)) (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$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$jj (func (param i64) (result i64))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$vifi (func (param i32 f32 i32))) (type $FUNCSIG$vidi (func (param i32 f64 i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 72) "\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") - (data (i32.const 136) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (data (i32.const 176) "\0f\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00&") + (data (i32.const 24) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00(") + (data (i32.const 80) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00$") + (data (i32.const 136) "~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 176) "\10\00\00\00 ") + (data (i32.const 192) "~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 224) "\10\00\00\00\1e") + (data (i32.const 240) "s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s") + (data (i32.const 272) "\10\00\00\00\1e") + (data (i32.const 288) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 320) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/dataview/array (mut i32) (i32.const 0)) (global $std/dataview/view (mut i32) (i32.const 0)) + (global $~lib/argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -91,7 +106,28 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/memory/memset (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 0 @@ -135,22 +171,56 @@ i32.const 0 i32.store8 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 480 + i32.le_u + if + i32.const 0 + i32.const 80 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 i32.const 16 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - i32.const 8 - i32.store + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 80 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 local.get $1 + i32.store + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) i32.const 8 - i32.add - call $~lib/internal/memory/memset + call $~lib/util/runtime/allocate + local.tee $1 + call $~lib/memory/memory.fill + local.get $1 + i32.const 15 + call $~lib/util/runtime/register + local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -166,144 +236,113 @@ local.get $1 i32.store local.get $0 - i32.const 0 + local.get $1 i32.store offset=4 local.get $0 i32.const 8 i32.store offset=8 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8Array#__set (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 8 - i32.const 50 - i32.const 63 - call $~lib/env/abort + i32.const 136 + i32.const 116 + i32.const 44 + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 local.get $1 - local.get $0 - i32.load - i32.add i32.add local.get $2 - i32.store8 offset=8 + i32.store8 ) - (func $~lib/dataview/DataView#constructor (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $2 - i32.const -2147483648 - i32.eq - if - local.get $0 - i32.load - local.get $1 - i32.sub - local.set $2 - end - local.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 14 - i32.const 44 - call $~lib/env/abort - unreachable - end - local.get $2 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 15 - i32.const 44 - call $~lib/env/abort - unreachable - end local.get $1 local.get $2 i32.add local.get $0 - i32.load - i32.gt_s + i32.const 16 + i32.sub + i32.load offset=4 + i32.gt_u + i32.or if i32.const 0 - i32.const 136 - i32.const 16 - i32.const 53 - call $~lib/env/abort + i32.const 192 + i32.const 21 + i32.const 6 + call $~lib/builtins/abort unreachable end i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.tee $3 + i32.const 0 + i32.store + local.get $3 + i32.const 0 + i32.store offset=4 + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 local.get $0 i32.store local.get $3 + local.get $0 local.get $1 + i32.add i32.store offset=4 local.get $3 local.get $2 i32.store offset=8 local.get $3 ) - (func $~lib/dataview/DataView#getFloat32 (; 6 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getFloat32 (; 8 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 4 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 44 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $2 if (result f32) - local.get $0 - i32.load local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - f32.load offset=8 + f32.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load offset=8 + i32.load local.tee $0 i32.const -16711936 i32.and @@ -318,7 +357,7 @@ f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 7 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 9 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) local.get $0 i64.const 8 i64.shr_u @@ -344,112 +383,75 @@ i64.const 32 i64.rotr ) - (func $~lib/dataview/DataView#getFloat64 (; 8 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/dataview/DataView#getFloat64 (; 10 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 58 + i32.const 7 + call $~lib/builtins/abort unreachable end local.get $1 if (result f64) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add - f64.load offset=8 + f64.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add - i64.load offset=8 + i64.load call $~lib/polyfills/bswap f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/dataview/DataView#getInt8 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - local.set $3 - local.get $1 - local.tee $2 - i32.const 1073741816 - i32.gt_u - local.tee $1 - i32.eqz - if - local.get $2 - i32.const 1 - i32.add - local.get $3 - i32.gt_s - local.set $1 - end - local.get $1 + i32.ge_u if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 69 + i32.const 49 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $2 - i32.add - i32.load8_s offset=8 + i32.load8_s ) - (func $~lib/dataview/DataView#getInt16 (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getInt16 (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 2 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 77 + i32.const 7 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load16_s offset=8 + i32.load16_s local.set $0 local.get $2 if (result i32) @@ -468,42 +470,30 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt32 (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) + (func $~lib/dataview/DataView#getInt32 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 - if (result i32) - local.get $1 - else - local.get $3 - i32.const 4 - i32.add - local.get $4 - i32.gt_s - end + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 86 + i32.const 7 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load offset=8 + i32.load local.set $0 local.get $2 if (result i32) @@ -522,7 +512,7 @@ i32.or end ) - (func $~lib/dataview/DataView#getInt64 (; 12 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/dataview/DataView#getInt64 (; 14 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i64) i32.const 8 local.get $0 @@ -530,18 +520,15 @@ i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 180 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add - i64.load offset=8 + i64.load local.set $2 local.get $1 if (result i64) @@ -551,124 +538,155 @@ call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) + (func $~lib/dataview/DataView#getUint8 (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 i32.load offset=8 - local.set $3 - local.get $1 - local.tee $2 - i32.const 1073741816 - i32.gt_u - local.tee $1 - i32.eqz + i32.ge_u if - local.get $2 - i32.const 1 - i32.add - local.get $3 - i32.gt_s - local.set $1 + i32.const 0 + i32.const 192 + i32.const 92 + i32.const 49 + call $~lib/builtins/abort + unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u + ) + (func $~lib/dataview/DataView#getUint16 (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 100 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add + i32.load16_u + local.set $0 local.get $2 - i32.add - i32.load8_u offset=8 - ) - (func $~lib/dataview/DataView#getUint16 (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=8 - local.set $4 - local.get $1 - local.tee $3 - i32.const 1073741816 - i32.gt_u - local.tee $1 if (result i32) - local.get $1 + local.get $0 else - local.get $3 - i32.const 2 - i32.add - local.get $4 - i32.gt_s + local.get $0 + i32.const 8 + i32.shl + local.get $0 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.or end + ) + (func $~lib/dataview/DataView#getUint32 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 109 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 + local.get $1 i32.add - local.get $3 - i32.add - i32.load16_u offset=8 + i32.load local.set $0 local.get $2 if (result i32) local.get $0 else local.get $0 + i32.const -16711936 + i32.and i32.const 8 - i32.shl + i32.rotl local.get $0 - i32.const 65535 + i32.const 16711935 i32.and i32.const 8 - i32.shr_u + i32.rotr i32.or end ) - (func $~lib/dataview/DataView#setFloat32 (; 15 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/dataview/DataView#getUint64 (; 18 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (local $2 i64) + i32.const 8 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 192 + i32.const 189 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i64.load + local.set $2 + local.get $1 + if (result i64) + local.get $2 + else + local.get $2 + call $~lib/polyfills/bswap + end + ) + (func $~lib/dataview/DataView#setFloat32 (; 19 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 118 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $2 if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 - f32.store offset=8 + f32.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.reinterpret_f32 local.tee $0 @@ -682,82 +700,70 @@ i32.const 8 i32.rotr i32.or - i32.store offset=8 + i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 16 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/dataview/DataView#setFloat64 (; 20 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 127 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $2 if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 - f64.store offset=8 + f64.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i64.reinterpret_f64 call $~lib/polyfills/bswap - i64.store offset=8 + i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - i32.const 1 + (func $~lib/dataview/DataView#setInt8 (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 local.get $0 i32.load offset=8 - i32.gt_s + i32.ge_u if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 133 + i32.const 49 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add - local.get $1 - i32.store8 offset=8 + i32.const 108 + i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt16 (; 22 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 141 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -777,26 +783,23 @@ end local.get $0 local.get $1 - i32.store16 offset=8 + i32.store16 ) - (func $~lib/dataview/DataView#setInt32 (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setInt32 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 4 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 149 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -816,26 +819,23 @@ end local.get $0 local.get $1 - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 20 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/dataview/DataView#setInt64 (; 24 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) i32.const 8 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 198 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $2 if (result i64) local.get $1 @@ -843,26 +843,41 @@ local.get $1 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store + ) + (func $~lib/dataview/DataView#setUint8 (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + i32.const 0 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 154 + i32.const 49 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 238 + i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/dataview/DataView#setUint16 (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) i32.const 2 local.get $0 i32.load offset=8 i32.gt_s if i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort + i32.const 192 + i32.const 162 + i32.const 6 + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.set $0 local.get $2 i32.eqz @@ -880,56 +895,144 @@ end local.get $0 local.get $1 - i32.store16 offset=8 + i32.store16 + ) + (func $~lib/dataview/DataView#setUint32 (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + i32.const 4 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 192 + i32.const 170 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.set $0 + local.get $2 + i32.eqz + if + local.get $1 + i32.const -16711936 + i32.and + i32.const 8 + i32.rotl + local.get $1 + i32.const 16711935 + i32.and + i32.const 8 + i32.rotr + i32.or + local.set $1 + end + local.get $0 + local.get $1 + i32.store + ) + (func $~lib/dataview/DataView#setUint64 (; 28 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + i32.const 8 + local.get $0 + i32.load offset=8 + i32.gt_s + if + i32.const 0 + i32.const 192 + i32.const 206 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $2 + if (result i64) + local.get $1 + else + local.get $1 + call $~lib/polyfills/bswap + end + i64.store + ) + (func $~lib/dataview/DataView#constructor|trampoline (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + block $2of2 + block $1of2 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $1of2 $1of2 $2of2 $outOfRange + end + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + local.set $1 + end + local.get $0 + i32.const 0 + local.get $1 + call $~lib/dataview/DataView#constructor ) - (func $start:std/dataview (; 22 ;) (type $FUNCSIG$v) + (func $start:std/dataview (; 30 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 216 + i32.const 480 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset i32.const 12 - call $~lib/allocator/arena/__memory_allocate - call $~lib/internal/typedarray/TypedArray#constructor + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + call $~lib/arraybuffer/ArrayBufferView#constructor global.set $std/dataview/array global.get $std/dataview/array i32.const 0 i32.const 246 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 1 i32.const 224 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 2 i32.const 88 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 3 i32.const 159 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 4 i32.const 130 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 5 i32.const 101 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 6 i32.const 67 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 7 i32.const 95 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array - local.tee $0 i32.load - local.get $0 + global.get $std/dataview/array + local.tee $0 i32.load offset=4 local.get $0 + i32.load + i32.sub + global.get $std/dataview/array i32.load offset=8 call $~lib/dataview/DataView#constructor global.set $std/dataview/view @@ -941,10 +1044,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 16 + i32.const 240 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -955,10 +1058,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 17 + i32.const 240 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -969,10 +1072,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 18 + i32.const 240 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -983,10 +1086,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 19 + i32.const 240 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -997,10 +1100,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 20 + i32.const 240 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1011,10 +1114,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 22 + i32.const 240 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1025,10 +1128,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 23 + i32.const 240 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1039,10 +1142,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 24 + i32.const 240 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1053,10 +1156,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 25 + i32.const 240 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1067,10 +1170,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 26 + i32.const 240 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1080,10 +1183,10 @@ f64.ne if i32.const 0 - i32.const 176 - i32.const 28 + i32.const 240 + i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1093,10 +1196,10 @@ f64.ne if i32.const 0 - i32.const 176 - i32.const 29 + i32.const 240 + i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1106,10 +1209,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 31 + i32.const 240 + i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1119,10 +1222,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 32 + i32.const 240 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1132,10 +1235,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 33 + i32.const 240 + i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1145,10 +1248,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 34 + i32.const 240 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1158,10 +1261,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 35 + i32.const 240 + i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1171,10 +1274,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 36 + i32.const 240 + i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1184,10 +1287,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 37 + i32.const 240 + i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1197,10 +1300,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 38 + i32.const 240 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1213,10 +1316,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 40 + i32.const 240 + i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1229,10 +1332,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 41 + i32.const 240 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1245,10 +1348,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 42 + i32.const 240 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1261,10 +1364,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 43 + i32.const 240 + i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1277,10 +1380,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 44 + i32.const 240 + i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1293,10 +1396,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 45 + i32.const 240 + i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1309,10 +1412,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 46 + i32.const 240 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1325,10 +1428,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 48 + i32.const 240 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1341,10 +1444,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 49 + i32.const 240 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1357,10 +1460,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 50 + i32.const 240 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1373,10 +1476,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 51 + i32.const 240 + i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1389,10 +1492,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 52 + i32.const 240 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1405,10 +1508,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 53 + i32.const 240 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1421,10 +1524,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 54 + i32.const 240 + i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1435,10 +1538,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 56 + i32.const 240 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1449,10 +1552,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 57 + i32.const 240 + i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1463,10 +1566,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 58 + i32.const 240 + i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1477,10 +1580,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 59 + i32.const 240 + i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1491,10 +1594,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 60 + i32.const 240 + i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1505,10 +1608,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 62 + i32.const 240 + i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1519,10 +1622,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 63 + i32.const 240 + i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1533,10 +1636,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 64 + i32.const 240 + i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1547,10 +1650,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 65 + i32.const 240 + i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1561,10 +1664,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 66 + i32.const 240 + i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1574,10 +1677,10 @@ i64.ne if i32.const 0 - i32.const 176 - i32.const 68 + i32.const 240 + i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1587,10 +1690,10 @@ i64.ne if i32.const 0 - i32.const 176 - i32.const 69 + i32.const 240 + i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1600,10 +1703,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 71 + i32.const 240 + i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1613,10 +1716,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 72 + i32.const 240 + i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1626,10 +1729,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 73 + i32.const 240 + i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1639,10 +1742,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 74 + i32.const 240 + i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1652,10 +1755,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 75 + i32.const 240 + i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1665,10 +1768,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 76 + i32.const 240 + i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1678,10 +1781,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 77 + i32.const 240 + i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1691,10 +1794,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 78 + i32.const 240 + i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1707,10 +1810,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 80 + i32.const 240 + i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1723,10 +1826,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 81 + i32.const 240 + i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1739,10 +1842,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 82 + i32.const 240 + i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1755,10 +1858,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 83 + i32.const 240 + i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1771,10 +1874,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 84 + i32.const 240 + i32.const 82 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1787,10 +1890,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 85 + i32.const 240 + i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1803,10 +1906,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 86 + i32.const 240 + i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1819,10 +1922,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 88 + i32.const 240 + i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1835,10 +1938,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 89 + i32.const 240 + i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1851,10 +1954,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 90 + i32.const 240 + i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1867,10 +1970,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 91 + i32.const 240 + i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1883,10 +1986,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 92 + i32.const 240 + i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1899,10 +2002,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 93 + i32.const 240 + i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1915,176 +2018,176 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 94 + i32.const 240 + i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 0 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1621565194 i32.ne if i32.const 0 - i32.const 176 - i32.const 96 + i32.const 240 + i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 1 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -2103486240 i32.ne if i32.const 0 - i32.const 176 - i32.const 97 + i32.const 240 + i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 2 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1703059288 i32.ne if i32.const 0 - i32.const 176 - i32.const 98 + i32.const 240 + i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 3 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1130726047 i32.ne if i32.const 0 - i32.const 176 - i32.const 99 + i32.const 240 + i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 4 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1598252418 i32.ne if i32.const 0 - i32.const 176 - i32.const 100 + i32.const 240 + i32.const 98 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 0 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -153069409 i32.ne if i32.const 0 - i32.const 176 - i32.const 102 + i32.const 240 + i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 1 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -531062910 i32.ne if i32.const 0 - i32.const 176 - i32.const 103 + i32.const 240 + i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 2 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const 1486848613 i32.ne if i32.const 0 - i32.const 176 - i32.const 104 + i32.const 240 + i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 3 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1618844349 i32.ne if i32.const 0 - i32.const 176 - i32.const 105 + i32.const 240 + i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 4 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -2107292833 i32.ne if i32.const 0 - i32.const 176 - i32.const 106 + i32.const 240 + i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 1 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const 6864441868736323830 i64.ne if i32.const 0 - i32.const 176 - i32.const 108 + i32.const 240 + i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const 0 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const -657428103485373601 i64.ne if i32.const 0 - i32.const 176 - i32.const 109 + i32.const 240 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2099,10 +2202,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 112 + i32.const 240 + i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2117,10 +2220,10 @@ f32.ne if i32.const 0 - i32.const 176 - i32.const 115 + i32.const 240 + i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2134,10 +2237,10 @@ f64.ne if i32.const 0 - i32.const 176 - i32.const 118 + i32.const 240 + i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2151,14 +2254,13 @@ f64.ne if i32.const 0 - i32.const 176 - i32.const 121 + i32.const 240 + i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view - i32.const 108 call $~lib/dataview/DataView#setInt8 global.get $std/dataview/view i32.const 0 @@ -2167,10 +2269,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 124 + i32.const 240 + i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2187,10 +2289,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 127 + i32.const 240 + i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2207,10 +2309,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 130 + i32.const 240 + i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2225,10 +2327,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 133 + i32.const 240 + i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2243,10 +2345,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 136 + i32.const 240 + i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2260,10 +2362,10 @@ i64.ne if i32.const 0 - i32.const 176 - i32.const 139 + i32.const 240 + i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2277,15 +2379,14 @@ i64.ne if i32.const 0 - i32.const 176 - i32.const 142 + i32.const 240 + i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view - i32.const 238 - call $~lib/dataview/DataView#setInt8 + call $~lib/dataview/DataView#setUint8 global.get $std/dataview/view i32.const 0 call $~lib/dataview/DataView#getUint8 @@ -2293,10 +2394,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 145 + i32.const 240 + i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2313,10 +2414,10 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 148 + i32.const 240 + i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2333,87 +2434,296 @@ i32.ne if i32.const 0 - i32.const 176 - i32.const 151 + i32.const 240 + i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const -846805744 i32.const 1 - call $~lib/dataview/DataView#setInt32 + call $~lib/dataview/DataView#setUint32 global.get $std/dataview/view i32.const 0 i32.const 1 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -846805744 i32.ne if i32.const 0 - i32.const 176 - i32.const 154 + i32.const 240 + i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i32.const -1510791631 i32.const 0 - call $~lib/dataview/DataView#setInt32 + call $~lib/dataview/DataView#setUint32 global.get $std/dataview/view i32.const 0 i32.const 0 - call $~lib/dataview/DataView#getInt32 + call $~lib/dataview/DataView#getUint32 i32.const -1510791631 i32.ne if i32.const 0 - i32.const 176 - i32.const 157 + i32.const 240 + i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i64.const 2334704782995986958 i32.const 1 - call $~lib/dataview/DataView#setInt64 + call $~lib/dataview/DataView#setUint64 global.get $std/dataview/view i32.const 1 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const 2334704782995986958 i64.ne if i32.const 0 - i32.const 176 - i32.const 160 + i32.const 240 + i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view i64.const -7123186897289856329 i32.const 0 - call $~lib/dataview/DataView#setInt64 + call $~lib/dataview/DataView#setUint64 global.get $std/dataview/view i32.const 0 - call $~lib/dataview/DataView#getInt64 + call $~lib/dataview/DataView#getUint64 i64.const -7123186897289856329 i64.ne if i32.const 0 - i32.const 176 - i32.const 163 + i32.const 240 + i32.const 161 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $~lib/argc + global.get $std/dataview/array + i32.load + call $~lib/dataview/DataView#constructor|trampoline + global.set $std/dataview/view + global.get $std/dataview/view + local.tee $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + if + i32.const 0 + i32.const 240 + i32.const 164 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/dataview/view + i32.load offset=8 + i32.const 8 + i32.ne + if + i32.const 0 + i32.const 240 + i32.const 165 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 320 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 320 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 320 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 320 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 320 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 320 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 288 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 38 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 288 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 23 ;) (type $FUNCSIG$v) + (func $start (; 39 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 24 ;) (type $FUNCSIG$v) + (func $null (; 40 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/dataview.ts b/tests/compiler/std/dataview.ts index 68e12f34a6..95eb576739 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; @@ -161,3 +159,7 @@ assert(view.getUint64(0, true) === 2334704782995986958); view.setUint64(0, 11323557176419695287, false); assert(view.getUint64(0, false) === 11323557176419695287); + +view = new DataView(array.buffer); +assert(view.byteOffset == 0); +assert(view.byteLength == 8); diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 4d7b3a3266..55cad3ba47 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -1,6 +1,6 @@ (module - (type $FUNCSIG$v (func)) (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$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) @@ -8,45 +8,50 @@ (type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32))) (type $FUNCSIG$diii (func (param i32 i32 i32) (result f64))) (type $FUNCSIG$jj (func (param i64) (result i64))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$jiii (func (param i32 i32 i32) (result i64))) (type $FUNCSIG$viifi (func (param i32 i32 f32 i32))) (type $FUNCSIG$viidi (func (param i32 i32 f64 i32))) (type $FUNCSIG$viiji (func (param i32 i32 i64 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 72) "\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") - (data (i32.const 136) "\10\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") - (data (i32.const 176) "\0f\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 176) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 224) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00d\00a\00t\00a\00v\00i\00e\00w\00.\00t\00s\00") + (data (i32.const 272) "\10\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 320) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/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/util/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)) (global $std/dataview/view (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 212)) + (global $~lib/argc (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 320)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 480)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (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/internal/arraybuffer/computeSize (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -54,7 +59,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -133,338 +138,374 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 72 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add ) - (func $~lib/internal/memory/memset (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - local.get $2 + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 + end + ) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u i32.eqz if - return + i32.const 0 + i32.const 80 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 + global.get $~lib/util/runtime/HEADER_SIZE i32.sub - local.get $1 - i32.store8 + local.set $2 local.get $2 - i32.const 2 - i32.le_u + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 80 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable end - local.get $0 - i32.const 1 - i32.add + local.get $2 local.get $1 - i32.store8 + i32.store 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 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.gt_u if - return + i32.const 0 + i32.const 24 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable 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 + call $~lib/util/runtime/allocate local.set $2 local.get $2 - i32.const -4 - i32.and - local.set $2 - i32.const -1 - i32.const 255 - i32.div_u + i32.const 0 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 + call $~lib/memory/memory.fill 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/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return + i32.const 15 + call $~lib/util/runtime/register ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 8 ;) (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.get $1 - i32.const 1073741816 + global.get $~lib/util/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 8 - i32.const 23 - i32.const 34 - call $~lib/env/abort + i32.const 24 + i32.const 12 + i32.const 57 + call $~lib/builtins/abort unreachable end - local.get $1 i32.const 0 - i32.shl - local.set $2 + local.get $1 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end block (result i32) local.get $0 i32.eqz if i32.const 12 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -481,134 +522,126 @@ local.get $3 i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint8Array#__set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 - i32.const 0 - i32.shr_u i32.ge_u - if - i32.const 0 - i32.const 8 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable - end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store8 offset=8 - end - ) - (func $~lib/dataview/DataView#constructor (; 10 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - local.get $3 - global.get $~lib/builtins/i32.MIN_VALUE - i32.eq - if - local.get $1 - i32.load - local.get $2 - i32.sub - local.set $3 - end - local.get $2 - i32.const 1073741816 - i32.gt_u if i32.const 0 i32.const 136 - i32.const 14 + i32.const 116 i32.const 44 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/dataview/DataView#constructor (; 12 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) local.get $3 - i32.const 1073741816 + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u - if - i32.const 0 - i32.const 136 - i32.const 15 - i32.const 44 - call $~lib/env/abort - unreachable - end local.get $2 local.get $3 i32.add local.get $1 - i32.load - i32.gt_s + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.gt_u + i32.or if i32.const 0 - i32.const 136 - i32.const 16 - i32.const 53 - call $~lib/env/abort + i32.const 192 + i32.const 21 + i32.const 6 + call $~lib/builtins/abort unreachable end - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + block (result i32) + local.get $0 + i32.eqz + if + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 end - local.get $0 local.get $1 i32.store - local.get $0 + local.get $1 local.get $2 + i32.add + local.set $4 + local.get $0 + local.get $4 i32.store offset=4 local.get $0 local.get $3 i32.store offset=8 local.get $0 ) - (func $~lib/polyfills/bswap (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#get:buffer (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load + ) + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) + (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + ) + (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -622,67 +655,43 @@ i32.or return ) - (func $~lib/dataview/DataView#getFloat32 (; 12 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.0 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getFloat32 (; 17 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 44 + i32.const 6 + call $~lib/builtins/abort + unreachable end local.get $2 - i32.const 0 - i32.ne if (result f32) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - f32.load offset=8 + f32.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 + i32.load call $~lib/polyfills/bswap f32.reinterpret_i32 end ) - (func $~lib/polyfills/bswap (; 13 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -721,111 +730,62 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getFloat64 (; 14 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.1 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#getFloat64 (; 19 ;) (type $FUNCSIG$diii) (param $0 i32) (param $1 i32) (param $2 i32) (result f64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 58 + i32.const 7 + call $~lib/builtins/abort + unreachable end local.get $2 - i32.const 0 - i32.ne if (result f64) - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - f64.load offset=8 + f64.load else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 + i64.load call $~lib/polyfills/bswap f64.reinterpret_i64 end ) - (func $~lib/dataview/DataView#getInt8 (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/dataview/checkOffset|inlined.2 - local.get $1 - local.set $2 - i32.const 1 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - local.get $2 - i32.const 1073741816 - i32.gt_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#getInt8 (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 69 + i32.const 49 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load8_s offset=8 + i32.load8_s ) - (func $~lib/polyfills/bswap (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -841,62 +801,41 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt16 (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt16 (; 22 ;) (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) - block $~lib/dataview/checkOffset|inlined.3 - local.get $1 - local.set $3 - i32.const 2 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 77 + i32.const 7 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load16_s offset=8 - local.set $7 + i32.load16_s + local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const -16711936 i32.and @@ -910,62 +849,41 @@ i32.or return ) - (func $~lib/dataview/DataView#getInt32 (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getInt32 (; 24 ;) (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) - block $~lib/dataview/checkOffset|inlined.4 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 86 + i32.const 7 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 - local.set $7 + i32.load + local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/polyfills/bswap (; 20 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) + (func $~lib/polyfills/bswap (; 25 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64) (local $1 i64) (local $2 i64) (local $3 i64) @@ -1004,106 +922,60 @@ i64.rotr return ) - (func $~lib/dataview/DataView#getInt64 (; 21 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - block $~lib/dataview/checkOffset|inlined.5 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#getInt64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (local $3 i64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 180 + i32.const 6 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 - local.set $7 + i64.load + local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i64) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint8 (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - block $~lib/dataview/checkOffset|inlined.6 - local.get $1 - local.set $2 - i32.const 1 - local.set $3 - local.get $0 - i32.load offset=8 - local.set $4 - local.get $2 - i32.const 1073741816 - i32.gt_u - local.tee $5 - if (result i32) - local.get $5 - else - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#getUint8 (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 92 + i32.const 49 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load8_u offset=8 + i32.load8_u ) - (func $~lib/polyfills/bswap (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/polyfills/bswap (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 8 i32.shl @@ -1117,705 +989,463 @@ i32.or return ) - (func $~lib/dataview/DataView#getUint16 (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint16 (; 29 ;) (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) - block $~lib/dataview/checkOffset|inlined.7 - local.get $1 - local.set $3 - i32.const 2 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 100 + i32.const 6 + call $~lib/builtins/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load16_u offset=8 - local.set $7 + i32.load16_u + local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint32 (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/dataview/DataView#getUint32 (; 30 ;) (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) - block $~lib/dataview/checkOffset|inlined.8 - local.get $1 - local.set $3 - i32.const 4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 109 + i32.const 6 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i32.load offset=8 - local.set $7 + i32.load + local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i32) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#getUint64 (; 26 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - block $~lib/dataview/checkOffset|inlined.9 - local.get $1 - local.set $3 - i32.const 8 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#getUint64 (; 31 ;) (type $FUNCSIG$jiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i64) + (local $3 i64) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 189 + i32.const 6 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add - i64.load offset=8 - local.set $7 + i64.load + local.set $3 local.get $2 - i32.const 0 - i32.ne if (result i64) - local.get $7 + local.get $3 else - local.get $7 + local.get $3 call $~lib/polyfills/bswap end ) - (func $~lib/dataview/DataView#setFloat32 (; 27 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.10 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setFloat32 (; 32 ;) (type $FUNCSIG$viifi) (param $0 i32) (param $1 i32) (param $2 f32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 118 + i32.const 6 + call $~lib/builtins/abort + unreachable end local.get $3 - i32.const 0 - i32.ne if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - f32.store offset=8 + f32.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 i32.reinterpret_f32 call $~lib/polyfills/bswap - i32.store offset=8 + i32.store end ) - (func $~lib/dataview/DataView#setFloat64 (; 28 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.11 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + (func $~lib/dataview/DataView#setFloat64 (; 33 ;) (type $FUNCSIG$viidi) (param $0 i32) (param $1 i32) (param $2 f64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 127 + i32.const 6 + call $~lib/builtins/abort + unreachable end local.get $3 - i32.const 0 - i32.ne if - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - f64.store offset=8 + f64.store else - local.get $0 - i32.load local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 i64.reinterpret_f64 call $~lib/polyfills/bswap - i64.store offset=8 + i64.store end ) - (func $~lib/dataview/DataView#setInt8 (; 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) - block $~lib/dataview/checkOffset|inlined.12 - local.get $1 - local.set $3 - i32.const 1 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setInt8 (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 local.get $0 - i32.load + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 133 + i32.const 49 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - i32.store8 offset=8 + i32.store8 ) - (func $~lib/dataview/DataView#setInt16 (; 30 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.13 - local.get $1 - local.set $4 - i32.const 2 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end - local.get $0 - i32.load - local.get $0 - i32.load offset=4 - i32.add + (func $~lib/dataview/DataView#setInt16 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) local.get $1 - i32.add - local.get $3 i32.const 0 - i32.ne - if (result i32) - local.get $2 - else - local.get $2 - call $~lib/polyfills/bswap - end - i32.store16 offset=8 - ) - (func $~lib/dataview/DataView#setInt32 (; 31 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.14 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end + i32.lt_s + local.get $1 + i32.const 2 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 141 + i32.const 6 + call $~lib/builtins/abort + unreachable end local.get $0 - i32.load - local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 + if (result i32) + local.get $2 + else + local.get $2 + call $~lib/polyfills/bswap + end + i32.store16 + ) + (func $~lib/dataview/DataView#setInt32 (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 i32.const 0 - i32.ne + i32.lt_s + local.get $1 + i32.const 4 + i32.add + local.get $0 + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 149 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $3 if (result i32) local.get $2 else local.get $2 call $~lib/polyfills/bswap end - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setInt64 (; 32 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.15 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setInt64 (; 37 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 198 + i32.const 6 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i64) local.get $2 else local.get $2 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store ) - (func $~lib/dataview/DataView#setUint8 (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - block $~lib/dataview/checkOffset|inlined.16 - local.get $1 - local.set $3 - i32.const 1 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - local.get $3 - i32.const 1073741816 - i32.gt_u - local.tee $6 - if (result i32) - local.get $6 - else - local.get $3 - local.get $4 - i32.add - local.get $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setUint8 (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 local.get $0 - i32.load + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 154 + i32.const 49 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $2 - i32.store8 offset=8 + i32.store8 ) - (func $~lib/dataview/DataView#setUint16 (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.17 - local.get $1 - local.set $4 - i32.const 2 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setUint16 (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 2 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 162 + i32.const 6 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i32) local.get $2 else local.get $2 call $~lib/polyfills/bswap end - i32.store16 offset=8 + i32.store16 ) - (func $~lib/dataview/DataView#setUint32 (; 35 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.18 - local.get $1 - local.set $4 - i32.const 4 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setUint32 (; 40 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 4 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 170 + i32.const 6 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i32) local.get $2 else local.get $2 call $~lib/polyfills/bswap end - i32.store offset=8 + i32.store ) - (func $~lib/dataview/DataView#setUint64 (; 36 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - block $~lib/dataview/checkOffset|inlined.19 - local.get $1 - local.set $4 - i32.const 8 - local.set $5 - local.get $0 - i32.load offset=8 - local.set $6 - local.get $4 - i32.const 1073741816 - i32.gt_u - local.tee $7 - if (result i32) - local.get $7 - else - local.get $4 - local.get $5 - i32.add - local.get $6 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 188 - i32.const 73 - call $~lib/env/abort - unreachable - end - end + (func $~lib/dataview/DataView#setUint64 (; 41 ;) (type $FUNCSIG$viiji) (param $0 i32) (param $1 i32) (param $2 i64) (param $3 i32) + local.get $1 + i32.const 0 + i32.lt_s + local.get $1 + i32.const 8 + i32.add local.get $0 - i32.load + i32.load offset=8 + i32.gt_s + i32.or + if + i32.const 0 + i32.const 192 + i32.const 206 + i32.const 6 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=4 - i32.add local.get $1 i32.add local.get $3 - i32.const 0 - i32.ne if (result i64) local.get $2 else local.get $2 call $~lib/polyfills/bswap end - i64.store offset=8 + i64.store + ) + (func $~lib/dataview/DataView#constructor|trampoline (; 42 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~lib/argc + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $2 + end + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $3 + end + local.get $0 + local.get $1 + local.get $2 + local.get $3 + call $~lib/dataview/DataView#constructor + ) + (func $~lib/dataview/DataView#get:byteOffset (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) + (func $~lib/dataview/DataView#get:byteLength (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 ) - (func $start:std/dataview (; 37 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $start:std/dataview (; 45 ;) (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 i32.const 0 i32.const 8 call $~lib/typedarray/Uint8Array#constructor @@ -1823,42 +1453,42 @@ global.get $std/dataview/array i32.const 0 i32.const 246 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 1 i32.const 224 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 2 i32.const 88 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 3 i32.const 159 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 4 i32.const 130 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 5 i32.const 101 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 6 i32.const 67 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set global.get $std/dataview/array i32.const 7 i32.const 95 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set i32.const 0 global.get $std/dataview/array - i32.load + call $~lib/typedarray/Uint8Array#get:buffer global.get $std/dataview/array - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset global.get $std/dataview/array - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength call $~lib/dataview/DataView#constructor global.set $std/dataview/view global.get $std/dataview/view @@ -1870,10 +1500,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 16 + i32.const 240 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1885,10 +1515,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 17 + i32.const 240 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1900,10 +1530,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 18 + i32.const 240 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1915,10 +1545,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 19 + i32.const 240 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1930,10 +1560,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 20 + i32.const 240 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1945,10 +1575,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 22 + i32.const 240 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1960,10 +1590,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 23 + i32.const 240 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1975,10 +1605,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 24 + i32.const 240 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -1990,10 +1620,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 25 + i32.const 240 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2005,10 +1635,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 26 + i32.const 240 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2020,10 +1650,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 28 + i32.const 240 + i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2035,10 +1665,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 29 + i32.const 240 + i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2049,10 +1679,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 31 + i32.const 240 + i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2063,10 +1693,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 32 + i32.const 240 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2077,10 +1707,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 33 + i32.const 240 + i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2091,10 +1721,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 34 + i32.const 240 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2105,10 +1735,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 35 + i32.const 240 + i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2119,10 +1749,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 36 + i32.const 240 + i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2133,10 +1763,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 37 + i32.const 240 + i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2147,10 +1777,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 38 + i32.const 240 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2166,10 +1796,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 40 + i32.const 240 + i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2185,10 +1815,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 41 + i32.const 240 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2204,10 +1834,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 42 + i32.const 240 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2223,10 +1853,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 43 + i32.const 240 + i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2242,10 +1872,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 44 + i32.const 240 + i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2261,10 +1891,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 45 + i32.const 240 + i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2280,10 +1910,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 46 + i32.const 240 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2299,10 +1929,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 48 + i32.const 240 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2318,10 +1948,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 49 + i32.const 240 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2337,10 +1967,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 50 + i32.const 240 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2356,10 +1986,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 51 + i32.const 240 + i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2375,10 +2005,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 52 + i32.const 240 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2394,10 +2024,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 53 + i32.const 240 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2413,10 +2043,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 54 + i32.const 240 + i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2428,10 +2058,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 56 + i32.const 240 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2443,10 +2073,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 57 + i32.const 240 + i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2458,10 +2088,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 58 + i32.const 240 + i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2473,10 +2103,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 59 + i32.const 240 + i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2488,10 +2118,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 60 + i32.const 240 + i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2503,10 +2133,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 62 + i32.const 240 + i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2518,10 +2148,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 63 + i32.const 240 + i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2533,10 +2163,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 64 + i32.const 240 + i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2548,10 +2178,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 65 + i32.const 240 + i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2563,10 +2193,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 66 + i32.const 240 + i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2578,10 +2208,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 68 + i32.const 240 + i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2593,10 +2223,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 69 + i32.const 240 + i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2607,10 +2237,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 71 + i32.const 240 + i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2621,10 +2251,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 72 + i32.const 240 + i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2635,10 +2265,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 73 + i32.const 240 + i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2649,10 +2279,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 74 + i32.const 240 + i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2663,10 +2293,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 75 + i32.const 240 + i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2677,10 +2307,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 76 + i32.const 240 + i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2691,10 +2321,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 77 + i32.const 240 + i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2705,10 +2335,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 78 + i32.const 240 + i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2722,10 +2352,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 80 + i32.const 240 + i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2739,10 +2369,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 81 + i32.const 240 + i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2756,10 +2386,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 82 + i32.const 240 + i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2773,10 +2403,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 83 + i32.const 240 + i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2790,10 +2420,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 84 + i32.const 240 + i32.const 82 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2807,10 +2437,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 85 + i32.const 240 + i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2824,10 +2454,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 86 + i32.const 240 + i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2841,10 +2471,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 88 + i32.const 240 + i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2858,10 +2488,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 89 + i32.const 240 + i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2875,10 +2505,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 90 + i32.const 240 + i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2892,10 +2522,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 91 + i32.const 240 + i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2909,10 +2539,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 92 + i32.const 240 + i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2926,10 +2556,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 93 + i32.const 240 + i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2943,10 +2573,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 94 + i32.const 240 + i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2958,10 +2588,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 96 + i32.const 240 + i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2973,10 +2603,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 97 + i32.const 240 + i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -2988,10 +2618,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 98 + i32.const 240 + i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3003,10 +2633,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 99 + i32.const 240 + i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3018,10 +2648,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 100 + i32.const 240 + i32.const 98 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3033,10 +2663,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 102 + i32.const 240 + i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3048,10 +2678,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 103 + i32.const 240 + i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3063,10 +2693,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 104 + i32.const 240 + i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3078,10 +2708,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 105 + i32.const 240 + i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3093,10 +2723,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 106 + i32.const 240 + i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3108,10 +2738,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 108 + i32.const 240 + i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3123,10 +2753,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 109 + i32.const 240 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3143,10 +2773,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 112 + i32.const 240 + i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3163,10 +2793,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 115 + i32.const 240 + i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3183,10 +2813,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 118 + i32.const 240 + i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3203,10 +2833,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 121 + i32.const 240 + i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3221,10 +2851,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 124 + i32.const 240 + i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3245,10 +2875,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 127 + i32.const 240 + i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3269,10 +2899,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 130 + i32.const 240 + i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3289,10 +2919,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 133 + i32.const 240 + i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3309,10 +2939,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 136 + i32.const 240 + i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3329,10 +2959,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 139 + i32.const 240 + i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3349,10 +2979,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 142 + i32.const 240 + i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3367,10 +2997,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 145 + i32.const 240 + i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3389,10 +3019,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 148 + i32.const 240 + i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3411,10 +3041,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 151 + i32.const 240 + i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3431,10 +3061,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 154 + i32.const 240 + i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3451,10 +3081,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 157 + i32.const 240 + i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3471,10 +3101,10 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 160 + i32.const 240 + i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/dataview/view @@ -3491,16 +3121,245 @@ i32.eqz if i32.const 0 - i32.const 176 - i32.const 163 + i32.const 240 + i32.const 161 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + block (result i32) + i32.const 1 + global.set $~lib/argc + i32.const 0 + global.get $std/dataview/array + call $~lib/typedarray/Uint8Array#get:buffer + i32.const 0 + i32.const 0 + call $~lib/dataview/DataView#constructor|trampoline + end + global.set $std/dataview/view + global.get $std/dataview/view + call $~lib/dataview/DataView#get:byteOffset + i32.const 0 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 164 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/dataview/view + call $~lib/dataview/DataView#get:byteLength + i32.const 8 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 240 + i32.const 165 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 49 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 51 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 288 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 52 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 54 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 288 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable ) - (func $start (; 38 ;) (type $FUNCSIG$v) + (func $start (; 56 ;) (type $FUNCSIG$v) call $start:std/dataview ) - (func $null (; 39 ;) (type $FUNCSIG$v) + (func $null (; 57 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/date.json b/tests/compiler/std/date.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 1d2777c37e..e5f42c2fc0 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -1,35 +1,61 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$diiiiiid (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) - (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s") + (data (i32.const 48) "\10\00\00\00(") + (data (i32.const 64) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\10\00\00\00\1e") + (data (i32.const 120) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 152) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (global $std/date/creationTime (mut i64) (i64.const 0)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/date/creationTime (mut i64) (i64.const 0)) (global $std/date/date (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$i) (result i32) - (local $0 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) + local.get $0 + i32.const 1073741824 + i32.gt_u + if + unreachable + end global.get $~lib/allocator/arena/offset - local.tee $0 - i32.const 15 + 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 $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -37,8 +63,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -64,17 +90,67 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 304 + i32.le_u + if + i32.const 0 + i32.const 64 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store local.get $0 ) - (func $start:std/date (; 4 ;) (type $FUNCSIG$v) + (func $start:std/date (; 6 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) - i32.const 40 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset i32.const 1970 i32.const 0 i32.const 1 @@ -88,10 +164,10 @@ i64.ne if i32.const 0 - i32.const 8 - i32.const 3 + i32.const 24 + i32.const 1 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1970 @@ -107,10 +183,10 @@ i64.ne if i32.const 0 - i32.const 8 - i32.const 4 + i32.const 24 + i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2018 @@ -128,10 +204,10 @@ i64.ne if i32.const 0 - i32.const 8 - i32.const 7 + i32.const 24 + i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/bindings/Date/now @@ -140,15 +216,22 @@ i64.le_s if i32.const 0 - i32.const 8 - i32.const 9 + i32.const 24 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 304 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset global.get $std/date/creationTime local.set $1 - call $~lib/allocator/arena/__memory_allocate + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.tee $0 i64.const 0 i64.store @@ -163,36 +246,213 @@ i64.ne if i32.const 0 - i32.const 8 - i32.const 12 + i32.const 24 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/date/date - local.tee $0 global.get $std/date/creationTime i64.const 1 i64.add - local.tee $1 i64.store - local.get $0 + global.get $std/date/date i64.load - local.get $1 + global.get $std/date/creationTime + i64.const 1 + i64.add i64.ne if i32.const 0 - i32.const 8 - i32.const 14 + i32.const 24 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 152 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 152 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 152 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 152 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 152 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 152 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 120 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 14 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 120 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $start (; 15 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 16 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/date.ts b/tests/compiler/std/date.ts index c118d4d40b..87ba3a474d 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 01a72ad928..7819724ecc 100644 --- a/tests/compiler/std/date.untouched.wat +++ b/tests/compiler/std/date.untouched.wat @@ -1,40 +1,57 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$diiiiiid (func (param i32 i32 i32 i32 i32 i32 f64) (result f64))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ji (func (param i32) (result i64))) (type $FUNCSIG$jij (func (param i32 i64) (result i64))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) (import "Date" "UTC" (func $~lib/bindings/Date/UTC (param i32 i32 i32 i32 i32 i32 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Date" "now" (func $~lib/bindings/Date/now (result f64))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00d\00a\00t\00e\00.\00t\00s\00") + (data (i32.const 48) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\10\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 152) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/date/creationTime (mut i64) (i64.const 0)) + (global $~lib/util/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 $std/date/creationTime (mut i64) (i64.const 0)) + (global $~lib/util/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 36)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 152)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 304)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $start:~lib/allocator/arena (; 3 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -115,16 +132,70 @@ ) (func $~lib/memory/memory.allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/date/Date#constructor (; 6 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/util/runtime/allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/date/Date#constructor (; 8 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -136,17 +207,17 @@ i64.store local.get $0 ) - (func $~lib/date/Date#getTime (; 7 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + (func $~lib/date/Date#getTime (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) local.get $0 i64.load ) - (func $~lib/date/Date#setTime (; 8 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) + (func $~lib/date/Date#setTime (; 10 ;) (type $FUNCSIG$jij) (param $0 i32) (param $1 i64) (result i64) local.get $0 local.get $1 i64.store local.get $1 ) - (func $start:std/date (; 9 ;) (type $FUNCSIG$v) + (func $start:std/date (; 11 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -154,28 +225,27 @@ (local $4 i32) (local $5 i32) (local $6 i64) - call $start:~lib/allocator/arena block $~lib/date/Date.UTC|inlined.0 (result i64) i32.const 1970 - local.set $0 + local.set $5 i32.const 0 - local.set $1 + local.set $4 i32.const 1 - local.set $2 - i32.const 0 local.set $3 i32.const 0 - local.set $4 + local.set $2 i32.const 0 - local.set $5 + local.set $1 + i32.const 0 + local.set $0 i64.const 0 local.set $6 - local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 local.get $5 + local.get $4 + local.get $3 + local.get $2 + local.get $1 + local.get $0 local.get $6 f64.convert_i64_s call $~lib/bindings/Date/UTC @@ -186,10 +256,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 3 + i32.const 24 + i32.const 1 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/date/Date.UTC|inlined.1 (result i64) @@ -223,33 +293,33 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 4 + i32.const 24 + i32.const 2 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/date/Date.UTC|inlined.2 (result i64) i32.const 2018 - local.set $0 + local.set $5 i32.const 10 - local.set $1 + local.set $4 i32.const 10 - local.set $2 - i32.const 11 local.set $3 + i32.const 11 + local.set $2 i32.const 0 - local.set $4 + local.set $1 i32.const 0 - local.set $5 + local.set $0 i64.const 1 local.set $6 - local.get $0 - local.get $1 - local.get $2 - local.get $3 - local.get $4 local.get $5 + local.get $4 + local.get $3 + local.get $2 + local.get $1 + local.get $0 local.get $6 f64.convert_i64_s call $~lib/bindings/Date/UTC @@ -262,10 +332,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 7 + i32.const 24 + i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/date/Date.now|inlined.0 (result i64) @@ -277,12 +347,22 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 9 + i32.const 24 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + 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 i32.const 0 global.get $std/date/creationTime call $~lib/date/Date#constructor @@ -294,10 +374,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 12 + i32.const 24 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/date/date @@ -315,16 +395,214 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 14 + i32.const 24 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load end ) - (func $start (; 10 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.newObject (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 18 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 21 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 120 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 23 ;) (type $FUNCSIG$v) call $start:std/date ) - (func $null (; 11 ;) (type $FUNCSIG$v) + (func $null (; 24 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/gc-array.optimized.wat b/tests/compiler/std/gc-array.optimized.wat deleted file mode 100644 index 1bc556e60f..0000000000 --- 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.ts b/tests/compiler/std/gc-array.ts deleted file mode 100644 index f42c59d20c..0000000000 --- a/tests/compiler/std/gc-array.ts +++ /dev/null @@ -1,24 +0,0 @@ -import "allocator/arena"; -import "collector/itcm"; - -class Foo { -} - -var arr: Foo[] = []; - -gc.collect(); // should do nothing - -arr[0] = {}; - -gc.collect(); // should do nothing - -arr[1] = {}; - -gc.collect(); // should do nothing - -arr[0] = {}; - -gc.collect(); // should collect the old one - -@start -export function main(): i32 { return 0; } diff --git a/tests/compiler/std/gc-array.untouched.wat b/tests/compiler/std/gc-array.untouched.wat deleted file mode 100644 index ecf4d806e6..0000000000 --- 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 15b106955e..0000000000 --- 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-basics.ts b/tests/compiler/std/gc-basics.ts deleted file mode 100644 index fc79941f51..0000000000 --- a/tests/compiler/std/gc-basics.ts +++ /dev/null @@ -1,35 +0,0 @@ -import "allocator/arena"; -import "collector/itcm"; - -// a class to test with -class MyObject { - a: u32; -} -function MyObject_visit(ref: usize): void {} // function table index == classId ? - -// allocate a managed instance -var obj: MyObject | null = changetype(__gc_allocate(offsetof(), MyObject_visit)); -obj.a = 123; - -// check header -{ - let head = changetype(obj) - 16; - let next = load(head, 0) & ~3; - let prev = load(head, 4); - assert(next != 0 && prev != 0 && next == prev); - let visitFn = load(head, 8); - assert(visitFn == changetype(MyObject_visit)); - let unused = load(head, 12); - assert(unused == 0); - let a = load(head, 16); - assert(a == 123); -} - -gc.collect(); // should keep 'obj' because it's a referenced root (see trace output) -obj = null; -gc.collect(); // should free 'obj' because it isn't referenced anymore (see trace output) - -var obj2: MyObject; // should also iterate globals defined late - -@start -export function main(): i32 { return 0; } diff --git a/tests/compiler/std/gc-basics.untouched.wat b/tests/compiler/std/gc-basics.untouched.wat deleted file mode 100644 index e24be9c925..0000000000 --- a/tests/compiler/std/gc-basics.untouched.wat +++ /dev/null @@ -1,629 +0,0 @@ -(module - (type $FUNCSIG$v (func)) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result 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 8) "\00\00\00\00\00\00\00\00\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\00") - (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)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 60)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-basics/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 $std/gc-basics/MyObject_visit (; 2 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (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 (; 4 ;) (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#get:color (; 5 ;) (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 (; 6 ;) (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 (; 7 ;) (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 (; 8 ;) (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 (; 9 ;) (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 (; 10 ;) (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 (; 11 ;) (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/collector/itcm/ManagedObject#set:color (; 12 ;) (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 (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 14 ;) (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 2 - 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 2 - 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_allocate (; 15 ;) (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 $~lib/string/String~gc (; 16 ;) (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 (; 17 ;) (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 (; 18 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__gc_collect - return - ) - (func $start:std/gc-basics (; 19 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - call $start:~lib/allocator/arena - i32.const 4 - i32.const 1 - call $~lib/collector/itcm/__gc_allocate - global.set $std/gc-basics/obj - global.get $std/gc-basics/obj - i32.const 123 - i32.store - block - global.get $std/gc-basics/obj - i32.const 16 - i32.sub - local.set $0 - local.get $0 - i32.load - i32.const 3 - i32.const -1 - i32.xor - i32.and - local.set $1 - local.get $0 - i32.load offset=4 - local.set $2 - local.get $1 - i32.const 0 - i32.ne - local.tee $3 - if (result i32) - local.get $2 - i32.const 0 - i32.ne - else - local.get $3 - end - local.tee $3 - if (result i32) - local.get $1 - local.get $2 - i32.eq - else - local.get $3 - 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 - local.set $3 - local.get $3 - i32.const 1 - i32.eq - i32.eqz - 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 - local.set $4 - local.get $4 - i32.const 0 - i32.eq - i32.eqz - 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 - local.set $5 - local.get $5 - i32.const 123 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 24 - i32.const 25 - i32.const 2 - call $~lib/env/abort - unreachable - end - end - call $~lib/gc/gc.collect - i32.const 0 - global.set $std/gc-basics/obj - call $~lib/gc/gc.collect - ) - (func $std/gc-basics/main (; 20 ;) (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 (; 21 ;) (type $FUNCSIG$v) - call $start:std/gc-basics - ) - (func $null (; 22 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-basics/obj - local.get $0 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-basics/obj2 - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/gc-integration.optimized.wat b/tests/compiler/std/gc-integration.optimized.wat deleted file mode 100644 index c26e47ddde..0000000000 --- a/tests/compiler/std/gc-integration.optimized.wat +++ /dev/null @@ -1,67 +0,0 @@ -(module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s") - (table $0 2 funcref) - (elem (i32.const 0) $null $start:std/gc-integration~anonymous|0) - (global $std/gc-integration/B.d (mut i32) (i32.const 16)) - (global $std/gc-integration/a_ref (mut i32) (i32.const 24)) - (global $std/gc-integration/b_ref (mut i32) (i32.const 32)) - (global $std/gc-integration/i (mut i32) (i32.const 0)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) - (func $start:std/gc-integration~anonymous|0 (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-integration/i - i32.const 1 - i32.add - global.set $std/gc-integration/i - local.get $0 - global.get $std/gc-integration/i - i32.const 3 - i32.shl - i32.ne - if - i32.const 0 - i32.const 8 - i32.const 18 - i32.const 37 - call $~lib/env/abort - unreachable - end - ) - (func $start:std/gc-integration (; 2 ;) (type $FUNCSIG$v) - i32.const 8 - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/B.d - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/a_ref - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/b_ref - i32.const 1 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/i - i32.const 4 - i32.ne - if - i32.const 0 - i32.const 8 - i32.const 19 - i32.const 0 - call $~lib/env/abort - unreachable - end - ) - (func $start (; 3 ;) (type $FUNCSIG$v) - call $start:std/gc-integration - ) - (func $null (; 4 ;) (type $FUNCSIG$v) - nop - ) -) diff --git a/tests/compiler/std/gc-integration.ts b/tests/compiler/std/gc-integration.ts deleted file mode 100644 index bbb92c7076..0000000000 --- a/tests/compiler/std/gc-integration.ts +++ /dev/null @@ -1,19 +0,0 @@ -// declare classes to test with -class A {} -class B { - static readonly c: B = changetype(8); // static root, readonly - static d: A = changetype(16); // static root, writable -} - -// make sure static properties are compiled -B.c; -B.d; - -// declare roots -var no_ref: usize = 64; // NOT a root, basic value -var a_ref: A | null = changetype(24); // global root, nullable -var b_ref: B = changetype(32); // global root, non-nullable - -var i: i32 = 0; -iterateRoots((ref: usize): void => { assert(ref == ++i << 3); }); -assert(i == 4); diff --git a/tests/compiler/std/gc-integration.untouched.wat b/tests/compiler/std/gc-integration.untouched.wat deleted file mode 100644 index af4c2a2503..0000000000 --- a/tests/compiler/std/gc-integration.untouched.wat +++ /dev/null @@ -1,81 +0,0 @@ -(module - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (memory $0 1) - (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s\00") - (table $0 2 funcref) - (elem (i32.const 0) $null $start:std/gc-integration~anonymous|0) - (global $std/gc-integration/B.c i32 (i32.const 8)) - (global $std/gc-integration/B.d (mut i32) (i32.const 16)) - (global $std/gc-integration/no_ref (mut i32) (i32.const 64)) - (global $std/gc-integration/a_ref (mut i32) (i32.const 24)) - (global $std/gc-integration/b_ref (mut i32) (i32.const 32)) - (global $std/gc-integration/i (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 56)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (start $start) - (func $start:std/gc-integration~anonymous|0 (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - block (result i32) - global.get $std/gc-integration/i - i32.const 1 - i32.add - global.set $std/gc-integration/i - global.get $std/gc-integration/i - end - i32.const 3 - i32.shl - i32.eq - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 18 - i32.const 37 - call $~lib/env/abort - unreachable - end - ) - (func $start:std/gc-integration (; 2 ;) (type $FUNCSIG$v) - global.get $std/gc-integration/B.c - drop - global.get $std/gc-integration/B.d - drop - i32.const 1 - call $~iterateRoots - global.get $std/gc-integration/i - i32.const 4 - i32.eq - i32.eqz - if - i32.const 0 - i32.const 8 - i32.const 19 - i32.const 0 - call $~lib/env/abort - unreachable - end - ) - (func $start (; 3 ;) (type $FUNCSIG$v) - call $start:std/gc-integration - ) - (func $null (; 4 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-integration/B.c - local.get $0 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/B.d - local.get $0 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/a_ref - local.get $0 - call_indirect (type $FUNCSIG$vi) - global.get $std/gc-integration/b_ref - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/gc-object.optimized.wat b/tests/compiler/std/gc-object.optimized.wat deleted file mode 100644 index dff104f0fb..0000000000 --- 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/gc-object.ts b/tests/compiler/std/gc-object.ts deleted file mode 100644 index 9a96a6a1c7..0000000000 --- a/tests/compiler/std/gc-object.ts +++ /dev/null @@ -1,25 +0,0 @@ -import "allocator/arena"; -import "collector/itcm"; - -class Base { -} - -class Custom extends Base { - a: Custom; - b: Base; -} - -var obj: Custom | null = new Custom(); - -gc.collect(); - -obj.a = obj; - -gc.collect(); - -obj = null; - -gc.collect(); - -@start -export function main(): void {} diff --git a/tests/compiler/std/gc-object.untouched.wat b/tests/compiler/std/gc-object.untouched.wat deleted file mode 100644 index afb65dc886..0000000000 --- a/tests/compiler/std/gc-object.untouched.wat +++ /dev/null @@ -1,569 +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))) - (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)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) - (export "memory" (memory $0)) - (export "table" (table $0)) - (export "main" (func $std/gc-object/main)) - (func $start:~lib/allocator/arena (; 0 ;) (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/allocator/arena/__memory_allocate (; 1 ;) (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 (; 2 ;) (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#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/collector/itcm/ManagedObject#set:color (; 10 ;) (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 (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/collector/itcm/step (; 12 ;) (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 1 - 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 1 - 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_allocate (; 13 ;) (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-object/Base~gc (; 14 ;) (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/Base#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 2 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - end - local.get $0 - ) - (func $std/gc-object/Custom~gc (; 16 ;) (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 (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 8 - i32.const 3 - call $~lib/collector/itcm/__gc_allocate - local.set $0 - end - local.get $0 - call $std/gc-object/Base#constructor - local.set $0 - 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 (; 18 ;) (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 (; 19 ;) (type $FUNCSIG$v) - call $~lib/collector/itcm/__gc_collect - return - ) - (func $start:std/gc-object (; 20 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - i32.const 0 - call $std/gc-object/Custom#constructor - global.set $std/gc-object/obj - call $~lib/gc/gc.collect - global.get $std/gc-object/obj - global.get $std/gc-object/obj - i32.store - call $~lib/gc/gc.collect - i32.const 0 - global.set $std/gc-object/obj - call $~lib/gc/gc.collect - ) - (func $std/gc-object/main (; 21 ;) (type $FUNCSIG$v) - global.get $~lib/started - i32.eqz - if - call $start - i32.const 1 - global.set $~lib/started - end - ) - (func $start (; 22 ;) (type $FUNCSIG$v) - call $start:std/gc-object - ) - (func $null (; 23 ;) (type $FUNCSIG$v) - ) - (func $~iterateRoots (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) - global.get $std/gc-object/obj - local.get $0 - call_indirect (type $FUNCSIG$vi) - ) -) diff --git a/tests/compiler/std/hash.json b/tests/compiler/std/hash.json new file mode 100644 index 0000000000..b1da366ff4 --- /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.optimized.wat b/tests/compiler/std/hash.optimized.wat index 9e769d4232..040e21ee98 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -3,50 +3,60 @@ (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 16) "\01\00\00\00a") - (data (i32.const 24) "\02\00\00\00a\00b") - (data (i32.const 32) "\03\00\00\00a\00b\00c") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10") + (data (i32.const 24) "\10\00\00\00\02") + (data (i32.const 40) "a") + (data (i32.const 48) "\10\00\00\00\04") + (data (i32.const 64) "a\00b") + (data (i32.const 72) "\10\00\00\00\06") + (data (i32.const 88) "a\00b\00c") (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $~lib/internal/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const -2128831035 - local.set $2 + local.set $1 local.get $0 - i32.load - i32.const 1 - i32.shl - local.set $3 - loop $repeat|0 + if block $break|0 - local.get $1 - local.get $3 - i32.ge_u - br_if $break|0 local.get $0 - local.get $1 - i32.add - i32.load8_u offset=4 - local.get $2 - i32.xor - i32.const 16777619 - i32.mul - local.set $2 - local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 i32.const 1 - i32.add - local.set $1 - br $repeat|0 + i32.shr_u + i32.const 1 + i32.shl + local.set $3 + loop $repeat|0 + local.get $2 + local.get $3 + i32.ge_u + br_if $break|0 + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end + unreachable end end - local.get $2 + local.get $1 ) - (func $~lib/internal/hash/hash32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -77,7 +87,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/internal/hash/hash64 (; 2 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 2 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -145,55 +155,55 @@ ) (func $start:std/hash (; 3 ;) (type $FUNCSIG$v) i32.const 0 - call $~lib/internal/hash/hashStr + call $~lib/util/hash/hashStr drop - i32.const 8 - call $~lib/internal/hash/hashStr + i32.const 24 + call $~lib/util/hash/hashStr drop - i32.const 16 - call $~lib/internal/hash/hashStr + i32.const 40 + call $~lib/util/hash/hashStr drop - i32.const 24 - call $~lib/internal/hash/hashStr + i32.const 64 + call $~lib/util/hash/hashStr drop - i32.const 32 - call $~lib/internal/hash/hashStr + i32.const 88 + call $~lib/util/hash/hashStr drop i32.const 0 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 1065353216 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 1066192077 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 0 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 2139095040 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i32.const 2143289344 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 drop i64.const 0 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 4607182418800017408 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 4607632778762754458 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 0 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 9218868437227405312 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop i64.const 9221120237041090560 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 drop ) (func $start (; 4 ;) (type $FUNCSIG$v) diff --git a/tests/compiler/std/hash.ts b/tests/compiler/std/hash.ts index 731ab6d4c0..d700db6de8 100644 --- a/tests/compiler/std/hash.ts +++ b/tests/compiler/std/hash.ts @@ -1,4 +1,4 @@ -import { HASH } from "internal/hash"; +import { HASH } from "util/hash"; function check(hash: u32): bool { return true; diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 777e8f631a..885ce43db4 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -3,62 +3,74 @@ (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\00\00\00\00") - (data (i32.const 16) "\01\00\00\00a\00") - (data (i32.const 24) "\02\00\00\00a\00b\00") - (data (i32.const 32) "\03\00\00\00a\00b\00c\00") + (data (i32.const 8) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 24) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00a\00") + (data (i32.const 48) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00a\00b\00") + (data (i32.const 72) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\00a\00b\00c\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $~lib/internal/hash/hashStr (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/hash/hashStr (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const -2128831035 local.set $1 - block $break|0 - block - i32.const 0 - local.set $2 - local.get $0 - i32.load - i32.const 1 - i32.shl - local.set $3 - end - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_u - i32.eqz - br_if $break|0 - local.get $1 - local.get $0 - local.get $2 - i32.add - i32.load8_u offset=4 - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 + local.get $0 + i32.const 0 + i32.ne + if + block $break|0 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_u + i32.eqz + br_if $break|0 + local.get $1 + local.get $0 + local.get $2 + i32.add + i32.load8_u + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end unreachable end - unreachable end local.get $1 ) - (func $std/hash/check (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/hash/check (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 ) - (func $~lib/internal/hash/hash32 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -100,7 +112,7 @@ local.set $1 local.get $1 ) - (func $~lib/internal/hash/hash64 (; 3 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 4 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -188,179 +200,179 @@ local.set $3 local.get $3 ) - (func $start:std/hash (; 4 ;) (type $FUNCSIG$v) + (func $start:std/hash (; 5 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) (local $2 f64) - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.0 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) i32.const 0 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.0 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 end call $std/hash/check drop - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.1 (result i32) - i32.const 8 + block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) + i32.const 24 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.1 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 end call $std/hash/check drop - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.2 (result i32) - i32.const 16 + block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) + i32.const 40 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.2 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 end call $std/hash/check drop - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.3 (result i32) - i32.const 24 + block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) + i32.const 64 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.3 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 end call $std/hash/check drop - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.4 (result i32) - i32.const 32 + block $~lib/util/hash/HASH<~lib/string/String>|inlined.4 (result i32) + i32.const 88 local.set $0 local.get $0 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.4 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.4 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) f32.const 0 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) f32.const 1 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) f32.const 1.100000023841858 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) f32.const 0 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) f32.const inf local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i32) f32.const nan:0x400000 local.set $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.5 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.5 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) f64.const 0 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) f64.const 1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) f64.const 1.1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) f64.const 0 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) f64.const inf local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 end call $std/hash/check drop - block $~lib/internal/hash/HASH|inlined.5 (result i32) + block $~lib/util/hash/HASH|inlined.5 (result i32) f64.const nan:0x8000000000000 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.5 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.5 end call $std/hash/check drop ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 6 ;) (type $FUNCSIG$v) call $start:std/hash ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 7 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/libm.json b/tests/compiler/std/libm.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index f9c83f5c55..67dda68010 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -5,8 +5,6 @@ (type $FUNCSIG$fd (func (param f64) (result f32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $std/libm/E f64 (f64.const 2.718281828459045)) (global $std/libm/LN10 f64 (f64.const 2.302585092994046)) (global $std/libm/LN2 f64 (f64.const 0.6931471805599453)) @@ -16,7 +14,6 @@ (global $std/libm/SQRT1_2 f64 (f64.const 0.7071067811865476)) (global $std/libm/SQRT2 f64 (f64.const 1.4142135623730951)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "E" (global $std/libm/E)) (export "LN10" (global $std/libm/LN10)) (export "LN2" (global $std/libm/LN2)) @@ -238,32 +235,29 @@ (local $1 f64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i64) - (local $8 f64) + (local $6 i64) + (local $7 f64) i32.const 1 - local.set $2 + local.set $3 local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1071284858 i32.lt_u - local.tee $4 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $4 end - local.get $4 if - local.get $3 + local.get $2 i32.const -1074790400 i32.ge_u if @@ -283,7 +277,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const 2034237440 @@ -292,17 +286,17 @@ local.get $0 return end - local.get $3 + local.get $2 i32.const -1076707644 i32.le_u if i32.const 0 - local.set $2 + local.set $3 local.get $0 local.set $1 end else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -310,28 +304,28 @@ return end end - local.get $2 + local.get $3 if f64.const 1 local.get $0 f64.add i64.reinterpret_f64 - local.tee $7 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 614242 i32.add - local.tee $4 + local.tee $2 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.tee $2 + local.tee $3 i32.const 54 i32.lt_s if (result f64) - local.get $7 + local.get $6 f64.reinterpret_i64 local.set $1 f64.const 1 @@ -344,7 +338,7 @@ f64.const 1 f64.sub f64.sub - local.get $2 + local.get $3 i32.const 2 i32.ge_s select @@ -353,11 +347,11 @@ else f64.const 0 end - local.set $6 - local.get $7 + local.set $5 + local.get $6 i64.const 4294967295 i64.and - local.get $4 + local.get $2 i32.const 1048575 i32.and i32.const 1072079006 @@ -376,21 +370,21 @@ local.get $1 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul - local.tee $8 - local.get $8 + local.tee $7 + local.get $7 f64.mul local.set $0 - local.get $5 + local.get $4 f64.const 0.5 local.get $1 f64.mul local.get $1 f64.mul - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -419,15 +413,15 @@ f64.add f64.add f64.mul - local.get $2 + local.get $3 f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul - local.get $6 + local.get $5 f64.add f64.add - local.get $5 + local.get $4 f64.sub local.get $1 f64.add @@ -438,32 +432,29 @@ ) (func $~lib/math/NativeMath.log (; 5 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 f64) (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) + (local $5 i32) + (local $6 f64) local.get $0 i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $1 i32.const 1048576 i32.lt_u - local.tee $1 - i32.eqz - if - local.get $2 + if (result i32) + i32.const 1 + else + local.get $1 i32.const 31 i32.shr_u - local.set $1 end - local.get $1 if - local.get $3 + local.get $2 i64.const 1 i64.shl i64.const 0 @@ -476,7 +467,7 @@ f64.div return end - local.get $2 + local.get $1 i32.const 31 i32.shr_u if @@ -488,18 +479,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $3 + local.tee $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $2 + local.set $1 else - local.get $2 + local.get $1 i32.const 2146435072 i32.ge_u if @@ -507,28 +498,25 @@ return else local.get $2 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $1 i32.const 1072693248 i32.eq - local.tee $1 - if - local.get $3 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $1 - end - local.get $1 + select if f64.const 0 return end end end - local.get $3 + local.get $2 i64.const 4294967295 i64.and - local.get $2 + local.get $1 i32.const 614242 i32.add local.tee $1 @@ -543,26 +531,26 @@ f64.reinterpret_i64 f64.const 1 f64.sub - local.tee $4 + local.tee $3 f64.const 2 - local.get $4 + local.get $3 f64.add f64.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f64.mul - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 f64.mul local.set $0 - local.get $5 - f64.const 0.5 local.get $4 + f64.const 0.5 + local.get $3 f64.mul - local.get $4 + local.get $3 f64.mul - local.tee $5 - local.get $7 + local.tee $4 + local.get $6 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -596,16 +584,16 @@ i32.shr_s i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $5 - f64.sub local.get $4 + f64.sub + local.get $3 f64.add local.get $0 f64.const 0.6931471803691238 @@ -673,14 +661,14 @@ (func $~lib/math/NativeMath.asin (; 8 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 f64) + (local $3 f64) + (local $4 i32) local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $4 i32.const 2147483647 i32.and local.tee $2 @@ -714,17 +702,14 @@ i32.const 1071644672 i32.lt_u if + local.get $2 + i32.const 1048576 + i32.ge_u + i32.const 0 local.get $2 i32.const 1045430272 i32.lt_u - local.tee $3 - if - local.get $2 - i32.const 1048576 - i32.ge_u - local.set $3 - end - local.get $3 + select if local.get $0 return @@ -750,7 +735,7 @@ local.set $0 local.get $1 call $~lib/math/R - local.set $4 + local.set $3 local.get $2 i32.const 1072640819 i32.ge_u @@ -759,7 +744,7 @@ f64.const 2 local.get $0 local.get $0 - local.get $4 + local.get $3 f64.mul f64.add f64.mul @@ -771,7 +756,7 @@ f64.const 2 local.get $0 f64.mul - local.get $4 + local.get $3 f64.mul f64.const 6.123233995736766e-17 f64.const 2 @@ -801,7 +786,7 @@ f64.sub end local.set $0 - local.get $3 + local.get $4 i32.const 31 i32.shr_u if @@ -1181,19 +1166,16 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i64) + (local $5 i64) + (local $6 i32) (local $7 i32) - local.get $1 - local.get $1 - f64.ne - local.tee $3 - local.set $2 - local.get $2 + i32.const 1 local.get $0 local.get $0 f64.ne - local.get $3 + local.get $1 + local.get $1 + f64.ne select if local.get $1 @@ -1203,20 +1185,20 @@ end local.get $0 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 local.set $3 - local.get $6 + local.get $5 i32.wrap_i64 - local.set $5 + local.set $6 local.get $1 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i32.wrap_i64 local.tee $7 - local.get $6 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 @@ -1244,11 +1226,11 @@ i32.const 2147483647 i32.and local.set $4 - local.get $5 local.get $3 i32.const 2147483647 i32.and - local.tee $5 + local.tee $3 + local.get $6 i32.or i32.eqz if @@ -1287,7 +1269,7 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $3 i32.const 2146435072 i32.eq if @@ -1340,33 +1322,27 @@ end end end + i32.const 1 + local.get $3 + i32.const 2146435072 + i32.eq local.get $4 i32.const 67108864 i32.add - local.get $5 + local.get $3 i32.lt_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $5 - i32.const 2146435072 - i32.eq - end + select br_if $folding-inner0 + local.get $3 + i32.const 67108864 + i32.add + local.get $4 + i32.lt_u + i32.const 0 local.get $2 i32.const 2 i32.and - local.tee $3 - if (result i32) - local.get $5 - i32.const 67108864 - i32.add - local.get $4 - i32.lt_u - else - local.get $3 - end + select if (result f64) f64.const 0 else @@ -1598,14 +1574,14 @@ i64.const 63 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $6 local.get $8 i64.const 32 i64.shr_u i64.const 2147483647 i64.and i32.wrap_i64 - local.tee $6 + local.tee $5 i32.const 1078159482 i32.ge_u if @@ -1616,7 +1592,7 @@ local.get $0 return end - local.get $5 + local.get $6 if f64.const -1 return @@ -1631,13 +1607,13 @@ return end end - local.get $6 + local.get $5 i32.const 1071001154 i32.gt_u if local.get $0 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.sub @@ -1649,7 +1625,7 @@ f64.copysign f64.add i32.trunc_f64_s - local.get $6 + local.get $5 i32.const 1072734898 i32.lt_u select @@ -1672,7 +1648,7 @@ f64.sub local.set $7 else - local.get $6 + local.get $5 i32.const 1016070144 i32.lt_u if @@ -1798,17 +1774,14 @@ i64.shl f64.reinterpret_i64 local.set $1 + i32.const 1 + local.get $3 + i32.const 56 + i32.gt_s local.get $3 i32.const 0 i32.lt_s - local.tee $5 - if (result i32) - local.get $5 - else - local.get $3 - i32.const 56 - i32.gt_s - end + select if local.get $0 local.get $2 @@ -2182,9 +2155,8 @@ (local $7 f64) (local $8 f64) (local $9 i32) - (local $10 i32) - (local $11 f64) - (local $12 i64) + (local $10 f64) + (local $11 i64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 @@ -2198,10 +2170,10 @@ i64.lt_u if local.get $4 - local.set $12 + local.set $11 local.get $2 local.set $4 - local.get $12 + local.get $11 local.set $2 end local.get $4 @@ -2226,18 +2198,14 @@ local.get $4 f64.reinterpret_i64 local.set $0 + i32.const 1 + local.get $2 + i64.const 0 + i64.eq local.get $5 i32.const 2047 i32.eq - local.tee $10 - i32.eqz - if - local.get $2 - i64.const 0 - i64.eq - local.set $10 - end - local.get $10 + select if local.get $0 return @@ -2297,7 +2265,7 @@ f64.add local.tee $7 f64.sub - local.set $11 + local.set $10 local.get $1 local.get $1 local.get $1 @@ -2338,9 +2306,9 @@ f64.const 2 local.get $7 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add f64.add @@ -2405,33 +2373,30 @@ (func $~lib/math/NativeMath.log10 (; 38 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 f64) - (local $6 i32) + (local $3 i64) + (local $4 f64) + (local $5 i32) + (local $6 f64) (local $7 f64) (local $8 f64) - (local $9 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -2444,7 +2409,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -2456,18 +2421,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -2475,28 +2440,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -2516,26 +2478,26 @@ local.get $1 f64.add f64.div + local.tee $6 + local.get $6 + f64.mul local.tee $7 local.get $7 f64.mul - local.tee $8 - local.get $8 - f64.mul local.set $0 local.get $2 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s - local.tee $5 + local.tee $4 f64.const 0.30102999566361177 f64.mul - local.set $9 - local.get $5 + local.set $8 + local.get $4 f64.const 3.694239077158931e-13 f64.mul local.get $1 @@ -2551,13 +2513,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $5 + local.tee $4 f64.sub local.get $1 f64.sub - local.get $7 + local.get $6 local.get $1 - local.get $8 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -2588,7 +2550,7 @@ f64.mul f64.add local.tee $0 - local.get $5 + local.get $4 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -2597,9 +2559,9 @@ f64.const 0.4342944818781689 f64.mul f64.add - local.get $9 - local.get $9 - local.get $5 + local.get $8 + local.get $8 + local.get $4 f64.const 0.4342944818781689 f64.mul local.tee $0 @@ -2623,32 +2585,29 @@ (func $~lib/math/NativeMath.log2 (; 41 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 f64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -2661,7 +2620,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -2673,18 +2632,18 @@ return end i32.const -54 - local.set $7 + local.set $6 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -2692,28 +2651,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -2733,12 +2689,12 @@ local.get $1 f64.add f64.div + local.tee $4 + local.get $4 + f64.mul local.tee $5 local.get $5 f64.mul - local.tee $6 - local.get $6 - f64.mul local.set $0 local.get $1 local.get $1 @@ -2753,13 +2709,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $7 f64.sub local.get $1 f64.sub - local.get $5 + local.get $4 local.get $1 - local.get $6 + local.get $5 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -2795,18 +2751,18 @@ i32.shr_u i32.const 1023 i32.sub - local.get $7 + local.get $6 i32.add f64.convert_i32_s - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 1.4426950407214463 f64.mul - local.tee $6 + local.tee $5 f64.add local.set $1 local.get $0 - local.get $8 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -2814,10 +2770,10 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $5 + local.get $4 local.get $1 f64.sub - local.get $6 + local.get $5 f64.add f64.add local.get $1 @@ -2838,9 +2794,9 @@ f64.min ) (func $~lib/math/NativeMath.pow (; 45 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 f64) @@ -2869,7 +2825,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $16 @@ -2890,46 +2846,38 @@ f64.const 1 return end - local.get $5 + i32.const 1 + local.get $8 i32.const 2146435072 i32.gt_s - local.tee $2 - i32.eqz - if - local.get $5 + local.get $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else + local.get $19 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $19 - i32.const 0 - i32.ne - local.set $2 - end - end - local.get $2 - i32.eqz - if - local.get $8 - i32.const 2146435072 - i32.gt_s - local.set $2 + select end - local.get $2 - i32.eqz - if + select + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 0 + i32.ne + i32.const 0 local.get $8 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $6 - i32.const 0 - i32.ne - local.set $2 - end + select end - local.get $2 if local.get $0 local.get $1 @@ -2962,8 +2910,8 @@ i32.gt_s local.tee $13 select - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 i32.const 52 i32.const 20 local.get $13 @@ -2972,13 +2920,13 @@ i32.sub local.tee $13 i32.shr_s - local.tee $2 + local.tee $5 local.get $13 i32.shl i32.eq if (result i32) i32.const 2 - local.get $2 + local.get $5 i32.const 1 i32.and i32.sub @@ -2998,13 +2946,13 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $19 i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -3075,66 +3023,58 @@ end local.get $0 f64.abs - local.set $4 + local.set $3 local.get $19 i32.eqz if - local.get $5 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $5 - i32.const 2146435072 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz - if - local.get $5 - i32.const 1072693248 - i32.eq - local.set $2 - end - local.get $2 + i32.const 1 + local.get $4 + i32.const 1072693248 + i32.eq + local.get $4 + i32.const 2146435072 + i32.eq + i32.const 1 + local.get $4 + select + select if f64.const 1 - local.get $4 + local.get $3 f64.div - local.get $4 + local.get $3 local.get $9 i32.const 0 i32.lt_s select - local.set $4 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $11 i32.or if (result f64) - local.get $4 + local.get $3 f64.neg - local.get $4 + local.get $3 local.get $11 i32.const 1 i32.eq select else - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $4 + local.get $3 end return end @@ -3172,7 +3112,7 @@ i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if @@ -3184,7 +3124,7 @@ select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -3197,7 +3137,7 @@ return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if @@ -3219,7 +3159,7 @@ end return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if @@ -3241,16 +3181,16 @@ end return end - local.get $4 + local.get $3 f64.const 1 f64.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul f64.const 0.5 - local.get $3 + local.get $2 f64.const 0.3333333333333333 - local.get $3 + local.get $2 f64.const 0.25 f64.mul f64.sub @@ -3259,10 +3199,10 @@ f64.mul local.set $0 f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 f64.const 1.9259629911266175e-08 f64.mul local.get $0 @@ -3278,50 +3218,50 @@ local.set $10 local.get $0 local.get $10 - local.get $4 + local.get $3 f64.sub f64.sub else i32.const 0 local.set $6 - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $4 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $4 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -3331,38 +3271,38 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $4 + local.set $5 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl i64.or f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select local.tee $0 f64.sub local.tee $10 f64.const 1 - local.get $4 + local.get $3 local.get $0 f64.add f64.div - local.tee $3 + local.tee $2 f64.mul local.tee $18 i64.reinterpret_f64 @@ -3370,15 +3310,15 @@ i64.and f64.reinterpret_i64 local.set $14 + local.get $3 local.get $4 - local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -3386,7 +3326,7 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $4 + local.tee $3 local.get $0 f64.sub f64.sub @@ -3427,10 +3367,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $2 local.get $10 local.get $14 - local.get $4 + local.get $3 f64.mul f64.sub local.get $14 @@ -3438,7 +3378,7 @@ f64.mul f64.sub f64.mul - local.tee $3 + local.tee $2 local.get $14 local.get $18 f64.add @@ -3452,8 +3392,8 @@ f64.reinterpret_i64 local.tee $10 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 local.get $10 f64.mul local.get $0 @@ -3472,15 +3412,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $2 f64.mul local.tee $20 f64.const -7.028461650952758e-09 - local.get $3 + local.get $2 f64.mul local.get $0 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub f64.const 0.9617966939259756 @@ -3488,16 +3428,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $3 + local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $4 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -3508,17 +3448,17 @@ i64.and f64.reinterpret_i64 local.set $10 - local.get $3 + local.get $2 local.get $10 local.get $0 f64.sub - local.get $4 + local.get $3 f64.sub local.get $20 f64.sub f64.sub end - local.set $4 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -3530,20 +3470,20 @@ local.get $10 f64.mul local.get $1 - local.get $4 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $10 f64.mul - local.tee $3 + local.tee $2 f64.add local.tee $0 i64.reinterpret_f64 local.tee $16 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $16 @@ -3557,14 +3497,14 @@ local.get $12 i32.const 1083179008 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner0 local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $2 f64.sub f64.gt br_if $folding-inner0 @@ -3578,12 +3518,12 @@ local.get $12 i32.const -1064252416 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner1 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.le br_if $folding-inner1 @@ -3597,7 +3537,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $13 @@ -3605,7 +3545,7 @@ i32.gt_s if i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -3618,9 +3558,9 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 1048575 - local.get $2 + local.get $5 i32.shr_s i32.const -1 i32.xor @@ -3637,7 +3577,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.set $6 @@ -3650,13 +3590,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $2 local.get $0 f64.sub - local.set $3 + local.set $2 end local.get $1 - local.get $3 + local.get $2 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -3665,10 +3605,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $4 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.6931471805599453 @@ -3679,14 +3619,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul local.set $0 local.get $7 f64.const 1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -3714,17 +3654,17 @@ f64.sub f64.div local.get $1 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $2 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 @@ -3736,7 +3676,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -3750,7 +3690,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl diff --git a/tests/compiler/std/libm.untouched.wat b/tests/compiler/std/libm.untouched.wat index 1c951af01a..f1cdd6658d 100644 --- a/tests/compiler/std/libm.untouched.wat +++ b/tests/compiler/std/libm.untouched.wat @@ -25,9 +25,7 @@ (global $~lib/math/NativeMath.SQRT2 f64 (f64.const 1.4142135623730951)) (global $std/libm/SQRT2 f64 (f64.const 1.4142135623730951)) (global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "E" (global $std/libm/E)) (export "LN10" (global $std/libm/LN10)) (export "LN2" (global $std/libm/LN2)) @@ -315,9 +313,8 @@ local.get $2 i32.const 1071284858 i32.lt_u - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $2 i32.const 31 @@ -531,7 +528,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -539,8 +536,7 @@ (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) - (local $13 i32) + (local $12 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -554,9 +550,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -614,7 +609,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -622,7 +616,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -665,46 +659,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -713,28 +707,28 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 local.get $3 - local.set $13 - local.get $7 + local.set $12 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul - local.get $13 + local.get $12 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $6 - f64.sub local.get $5 + f64.sub + local.get $4 f64.add - local.get $13 + local.get $12 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul @@ -865,13 +859,12 @@ local.get $2 i32.const 1045430272 i32.lt_u - local.tee $3 if (result i32) local.get $2 i32.const 1048576 i32.ge_u else - local.get $3 + i32.const 0 end if local.get $0 @@ -1417,8 +1410,8 @@ call $~lib/math/NativeMath.atanh ) (func $~lib/math/NativeMath.atan2 (; 17 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -1427,9 +1420,8 @@ (local $9 f64) local.get $1 call $~lib/builtins/isNaN - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 call $~lib/builtins/isNaN @@ -1442,30 +1434,30 @@ end local.get $1 i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.wrap_i64 - local.set $5 + local.set $4 local.get $0 i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 + local.set $5 + local.get $2 + i32.wrap_i64 local.set $6 local.get $3 - i32.wrap_i64 - local.set $7 - local.get $4 i32.const 1072693248 i32.sub - local.get $5 + local.get $4 i32.or i32.const 0 i32.eq @@ -1474,28 +1466,28 @@ call $~lib/math/NativeMath.atan return end - local.get $6 + local.get $5 i32.const 31 i32.shr_u i32.const 1 i32.and - local.get $4 + local.get $3 i32.const 30 i32.shr_u i32.const 2 i32.and i32.or - local.set $8 - local.get $4 + local.set $7 + local.get $3 i32.const 2147483647 i32.and - local.set $4 - local.get $6 + local.set $3 + local.get $5 i32.const 2147483647 i32.and - local.set $6 + local.set $5 + local.get $5 local.get $6 - local.get $7 i32.or i32.const 0 i32.eq @@ -1505,21 +1497,21 @@ block $case2|0 block $case1|0 block $case0|0 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|0 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|0 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|0 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|0 @@ -1537,13 +1529,13 @@ return end end + local.get $3 local.get $4 - local.get $5 i32.or i32.const 0 i32.eq if - local.get $8 + local.get $7 i32.const 1 i32.and if (result f64) @@ -1558,11 +1550,11 @@ end return end - local.get $4 + local.get $3 i32.const 2146435072 i32.eq if - local.get $6 + local.get $5 i32.const 2146435072 i32.eq if @@ -1571,21 +1563,21 @@ block $case2|1 block $case1|1 block $case0|1 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|1 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|1 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|1 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|1 @@ -1622,21 +1614,21 @@ block $case2|2 block $case1|2 block $case0|2 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|2 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|2 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|2 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|2 @@ -1657,23 +1649,22 @@ end end end - local.get $4 + local.get $3 i32.const 64 i32.const 20 i32.shl i32.add - local.get $6 + local.get $5 i32.lt_u - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else - local.get $6 + local.get $5 i32.const 2146435072 i32.eq end if - local.get $8 + local.get $7 i32.const 1 i32.and if (result f64) @@ -1688,20 +1679,19 @@ end return end - local.get $8 + local.get $7 i32.const 2 i32.and - local.tee $2 if (result i32) - local.get $6 + local.get $5 i32.const 64 i32.const 20 i32.shl i32.add - local.get $4 + local.get $3 i32.lt_u else - local.get $2 + i32.const 0 end if f64.const 0 @@ -1719,21 +1709,21 @@ block $case2|3 block $case1|3 block $case0|3 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|3 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|3 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|3 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|3 @@ -1981,7 +1971,6 @@ (local $13 f64) (local $14 f64) (local $15 f64) - (local $16 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -2209,9 +2198,8 @@ local.get $3 i32.const 0 i32.lt_s - local.tee $16 if (result i32) - local.get $16 + i32.const 1 else local.get $3 i32.const 56 @@ -2662,7 +2650,7 @@ (local $4 i64) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) @@ -2670,7 +2658,6 @@ (local $12 f64) (local $13 f64) (local $14 f64) - (local $15 f64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -2722,9 +2709,8 @@ local.get $5 i32.const 2047 i32.eq - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $3 i64.const 0 @@ -2746,7 +2732,7 @@ return end f64.const 1 - local.set $8 + local.set $7 local.get $5 i32.const 1023 i32.const 510 @@ -2754,7 +2740,7 @@ i32.gt_s if f64.const 5260135901548373507240989e186 - local.set $8 + local.set $7 local.get $0 f64.const 1.90109156629516e-211 f64.mul @@ -2771,7 +2757,7 @@ i32.lt_s if f64.const 1.90109156629516e-211 - local.set $8 + local.set $7 local.get $0 f64.const 5260135901548373507240989e186 f64.mul @@ -2785,75 +2771,75 @@ local.get $0 f64.const 134217729 f64.mul - local.set $9 + local.set $8 local.get $0 - local.get $9 + local.get $8 f64.sub - local.get $9 + local.get $8 f64.add - local.set $10 + local.set $9 local.get $0 - local.get $10 + local.get $9 f64.sub - local.set $11 + local.set $10 local.get $0 local.get $0 f64.mul - local.set $12 - local.get $10 - local.get $10 + local.set $11 + local.get $9 + local.get $9 f64.mul - local.get $12 + local.get $11 f64.sub f64.const 2 - local.get $10 + local.get $9 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add - local.set $13 + local.set $12 local.get $1 f64.const 134217729 f64.mul - local.set $9 + local.set $8 local.get $1 - local.get $9 + local.get $8 f64.sub - local.get $9 + local.get $8 f64.add - local.set $10 + local.set $9 local.get $1 - local.get $10 + local.get $9 f64.sub - local.set $11 + local.set $10 local.get $1 local.get $1 f64.mul - local.set $14 - local.get $10 - local.get $10 + local.set $13 + local.get $9 + local.get $9 f64.mul - local.get $14 + local.get $13 f64.sub f64.const 2 - local.get $10 + local.get $9 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add - local.set $15 - local.get $8 - local.get $15 - local.get $13 - f64.add + local.set $14 + local.get $7 local.get $14 - f64.add local.get $12 f64.add + local.get $13 + f64.add + local.get $11 + f64.add f64.sqrt f64.mul ) @@ -2908,7 +2894,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -2922,7 +2908,6 @@ (local $15 f64) (local $16 f64) (local $17 f64) - (local $18 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -2936,9 +2921,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -2996,7 +2980,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -3004,7 +2987,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -3047,46 +3030,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -3095,16 +3078,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -3113,58 +3096,58 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 0.4342944818781689 f64.mul - local.set $15 + local.set $14 local.get $3 f64.convert_i32_s - local.set $16 - local.get $16 + local.set $15 + local.get $15 f64.const 0.30102999566361177 f64.mul - local.set $17 - local.get $16 + local.set $16 + local.get $15 f64.const 3.694239077158931e-13 f64.mul - local.get $14 local.get $13 + local.get $12 f64.add f64.const 2.5082946711645275e-11 f64.mul f64.add - local.get $14 + local.get $13 f64.const 0.4342944818781689 f64.mul f64.add - local.set $18 - local.get $17 - local.get $15 + local.set $17 + local.get $16 + local.get $14 f64.add - local.set $9 - local.get $18 + local.set $8 local.get $17 - local.get $9 + local.get $16 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $18 - local.get $18 - local.get $9 + local.set $17 + local.get $17 + local.get $8 f64.add ) (func $std/libm/log10 (; 42 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) @@ -3179,7 +3162,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -3192,7 +3175,6 @@ (local $14 f64) (local $15 f64) (local $16 f64) - (local $17 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -3206,9 +3188,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -3266,7 +3247,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -3274,7 +3254,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -3317,46 +3297,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -3365,16 +3345,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -3383,52 +3363,52 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 1.4426950407214463 f64.mul - local.set $15 - local.get $14 + local.set $14 local.get $13 + local.get $12 f64.add f64.const 1.6751713164886512e-10 f64.mul - local.get $14 + local.get $13 f64.const 1.4426950407214463 f64.mul f64.add - local.set $16 + local.set $15 local.get $3 f64.convert_i32_s - local.set $17 - local.get $17 - local.get $15 + local.set $16 + local.get $16 + local.get $14 f64.add - local.set $9 + local.set $8 + local.get $15 local.get $16 - local.get $17 - local.get $9 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $16 - local.get $9 local.set $15 - local.get $16 + local.get $8 + local.set $14 local.get $15 + local.get $14 f64.add ) (func $std/libm/log2 (; 45 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) @@ -3439,22 +3419,22 @@ (local $2 f64) (local $3 f64) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 local.get $3 + local.get $2 f64.max ) (func $std/libm/min (; 47 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 + local.get $1 + local.set $2 local.get $3 + local.get $2 f64.min ) (func $~lib/math/NativeMath.pow (; 48 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) @@ -3540,44 +3520,39 @@ local.get $7 i32.const 2146435072 i32.gt_s - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $4 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.gt_s end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $6 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end if @@ -3587,7 +3562,7 @@ return end i32.const 0 - local.set $10 + local.set $9 local.get $3 i32.const 0 i32.lt_s @@ -3597,7 +3572,7 @@ i32.ge_s if i32.const 2 - local.set $10 + local.set $9 else local.get $8 i32.const 1072693248 @@ -3608,21 +3583,21 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 - local.get $11 + local.set $10 + local.get $10 i32.const 20 i32.gt_s - local.set $9 + local.set $11 i32.const 52 i32.const 20 - local.get $9 - select local.get $11 + select + local.get $10 i32.sub local.set $12 local.get $6 local.get $8 - local.get $9 + local.get $11 select local.set $13 local.get $13 @@ -3640,7 +3615,7 @@ i32.const 1 i32.and i32.sub - local.set $10 + local.set $9 end end end @@ -3743,17 +3718,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq end - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 1072693248 @@ -3778,7 +3751,7 @@ local.get $7 i32.const 1072693248 i32.sub - local.get $10 + local.get $9 i32.or i32.const 0 i32.eq @@ -3792,7 +3765,7 @@ f64.div local.set $16 else - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -3812,7 +3785,7 @@ i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 0 i32.eq if @@ -3825,7 +3798,7 @@ f64.div return end - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -4011,17 +3984,17 @@ i32.le_s if i32.const 0 - local.set $11 + local.set $10 else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 - local.set $11 + local.set $10 else i32.const 0 - local.set $11 + local.set $10 local.get $29 i32.const 1 i32.add @@ -4045,7 +4018,7 @@ local.set $15 f64.const 1.5 f64.const 1 - local.get $11 + local.get $10 select local.set $35 local.get $15 @@ -4077,7 +4050,7 @@ i32.or i32.const 524288 i32.add - local.get $11 + local.get $10 i32.const 18 i32.shl i32.add @@ -4200,7 +4173,7 @@ local.set $36 f64.const 1.350039202129749e-08 f64.const 0 - local.get $11 + local.get $10 select local.set $37 f64.const -7.028461650952758e-09 @@ -4218,7 +4191,7 @@ local.set $24 f64.const 0.5849624872207642 f64.const 0 - local.get $11 + local.get $10 select local.set $39 local.get $36 @@ -4363,7 +4336,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 i32.const 0 local.set $29 local.get $41 @@ -4372,7 +4345,7 @@ if local.get $28 i32.const 1048576 - local.get $11 + local.get $10 i32.const 1 i32.add i32.shr_s @@ -4385,12 +4358,12 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 f64.const 0 local.set $24 local.get $29 i32.const 1048575 - local.get $11 + local.get $10 i32.shr_s i32.const -1 i32.xor @@ -4406,7 +4379,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $11 + local.get $10 i32.sub i32.shr_s local.set $29 diff --git a/tests/compiler/std/map.json b/tests/compiler/std/map.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 1f151e8e2b..66a50a9c30 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,12 +1,12 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result 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$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) @@ -21,19 +21,30 @@ (type $FUNCSIG$vij (func (param i32 i64))) (type $FUNCSIG$vif (func (param i32 f32))) (type $FUNCSIG$vid (func (param i32 f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\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") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00&") + (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00\14") + (data (i32.const 136) "s\00t\00d\00/\00m\00a\00p\00.\00t\00s") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L\08\00\00\00\00\00\00L\08\00\00\00\00\00\00L\10\00\00\00\00\00\00L\10\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00L@\00\00\00\00\00\00L@\00\00\00\00\00\00L \00\00\00\00\00\00L@\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -95,292 +106,323 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (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 56 - 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.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 3 ;) (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 + i32.store offset=4 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 + i32.store offset=8 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 + i32.store offset=12 local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 + i32.const 16 i32.add - i32.const 0 - i32.store8 + ) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) 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.const 392 i32.le_u if - return + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end - i32.const 0 local.get $0 + i32.const 16 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 + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + ) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.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 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 + 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 end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 - call $~lib/env/abort + i32.const 80 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 + call $~lib/util/runtime/allocate + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill local.get $1 - i32.eqz - if - local.get $2 - i32.const 8 - i32.add - local.get $0 - call $~lib/internal/memory/memset - end - local.get $2 + i32.const 15 + call $~lib/util/runtime/register ) - (func $~lib/map/Map#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load + i32.ne + drop + local.get $0 + local.get $1 i32.store local.get $0 i32.const 3 i32.store offset=4 - local.get $0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load offset=8 + i32.ne + drop + local.get $0 + local.get $1 i32.store offset=8 local.get $0 i32.const 4 @@ -392,10 +434,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -418,7 +462,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -428,42 +472,40 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load8_u local.get $1 i32.const 255 i32.and i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -479,7 +521,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -490,13 +532,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -504,13 +545,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -518,9 +556,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -552,14 +588,14 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -573,13 +609,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -589,7 +631,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 10 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -653,12 +695,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $5 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -683,14 +723,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -711,7 +751,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -758,8 +798,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -769,16 +808,16 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 call $~lib/map/Map#rehash end ) - (func $std/map/test (; 13 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 14 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/map/Map#constructor @@ -793,10 +832,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -815,10 +854,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -834,10 +873,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -855,10 +894,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -874,10 +913,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -893,10 +932,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -915,10 +954,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -934,10 +973,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -955,10 +994,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -974,10 +1013,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -993,10 +1032,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1007,10 +1046,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1028,10 +1067,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1046,10 +1085,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1068,10 +1107,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1082,10 +1121,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1103,26 +1142,54 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 call $~lib/map/Map#clear - local.get $1 - i32.load offset=20 - if - i32.const 0 - i32.const 120 - i32.const 46 - i32.const 2 - call $~lib/env/abort - unreachable - end + local.get $1 + i32.load offset=20 + if + i32.const 0 + i32.const 136 + i32.const 46 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/map/Map#constructor (; 15 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 ) - (func $~lib/map/Map#has (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1136,7 +1203,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1147,13 +1214,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1161,13 +1227,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -1175,9 +1238,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -1209,14 +1270,14 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -1230,13 +1291,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -1246,7 +1313,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1308,12 +1375,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $5 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -1338,14 +1403,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1364,7 +1429,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1409,8 +1474,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -1420,19 +1484,19 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 call $~lib/map/Map#rehash end ) - (func $std/map/test (; 19 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -1444,10 +1508,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1464,10 +1528,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1481,10 +1545,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1502,10 +1566,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1521,10 +1585,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1538,10 +1602,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1558,10 +1622,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1575,10 +1639,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1596,10 +1660,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1615,10 +1679,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1632,10 +1696,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1646,10 +1710,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1667,10 +1731,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1685,10 +1749,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1705,10 +1769,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1719,10 +1783,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1740,10 +1804,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1752,14 +1816,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#find (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#constructor (; 22 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1769,42 +1861,40 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load16_u local.get $1 i32.const 65535 i32.and i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1829,7 +1919,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1840,13 +1930,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $2 + local.set $6 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1854,13 +1943,10 @@ local.tee $7 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -1868,9 +1954,7 @@ i32.mul i32.add local.set $8 - local.get $6 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -1894,14 +1978,14 @@ local.get $3 local.get $2 i32.load16_s - local.tee $4 + local.tee $5 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $4 + local.get $5 i32.const 8 i32.shr_u i32.xor @@ -1911,14 +1995,14 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $6 i32.add - local.tee $4 - i32.load offset=8 + local.tee $5 + i32.load i32.store offset=8 - local.get $4 + local.get $5 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -1932,13 +2016,19 @@ end end local.get $0 - local.get $5 + i32.load + drop + local.get $0 + local.get $6 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $6 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $7 @@ -1948,7 +2038,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 26 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2021,12 +2111,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $5 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -2051,14 +2139,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2088,7 +2176,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2144,8 +2232,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -2155,19 +2242,19 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 call $~lib/map/Map#rehash end ) - (func $std/map/test (; 26 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -2179,10 +2266,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2201,10 +2288,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2220,10 +2307,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2241,10 +2328,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2260,10 +2347,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2279,10 +2366,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2301,10 +2388,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2320,10 +2407,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2341,10 +2428,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2360,10 +2447,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2379,10 +2466,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2393,10 +2480,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2414,10 +2501,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2432,10 +2519,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2454,10 +2541,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2468,10 +2555,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2489,10 +2576,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2501,14 +2588,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#has (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2531,7 +2646,7 @@ i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2542,13 +2657,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $2 + local.set $6 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -2556,13 +2670,10 @@ local.tee $7 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -2570,9 +2681,7 @@ i32.mul i32.add local.set $8 - local.get $6 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -2596,14 +2705,14 @@ local.get $3 local.get $2 i32.load16_u - local.tee $4 + local.tee $5 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $4 + local.get $5 i32.const 8 i32.shr_u i32.xor @@ -2613,14 +2722,14 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $6 i32.add - local.tee $4 - i32.load offset=8 + local.tee $5 + i32.load i32.store offset=8 - local.get $4 + local.get $5 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -2634,13 +2743,19 @@ end end local.get $0 - local.get $5 + i32.load + drop + local.get $0 + local.get $6 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $6 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $7 @@ -2650,7 +2765,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2721,12 +2836,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $5 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -2751,14 +2864,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2786,7 +2899,7 @@ unreachable end ) - (func $~lib/map/Map#delete (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2840,8 +2953,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -2851,19 +2963,19 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 call $~lib/map/Map#rehash end ) - (func $std/map/test (; 32 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 36 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -2875,10 +2987,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2895,10 +3007,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2912,10 +3024,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2933,10 +3045,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2952,10 +3064,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2969,10 +3081,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2989,10 +3101,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3006,10 +3118,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3027,10 +3139,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3046,10 +3158,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3063,10 +3175,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3077,10 +3189,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3098,10 +3210,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3116,10 +3228,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3136,10 +3248,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3150,10 +3262,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3171,26 +3283,54 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 call $~lib/map/Map#clear - local.get $1 - i32.load offset=20 - if - i32.const 0 - i32.const 120 - i32.const 46 - i32.const 2 - call $~lib/env/abort - unreachable - end + local.get $1 + i32.load offset=20 + if + i32.const 0 + i32.const 136 + i32.const 46 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/map/Map#constructor (; 37 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 ) - (func $~lib/internal/hash/hash32 (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -3221,7 +3361,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 39 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3231,49 +3371,47 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load local.get $1 i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 41 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3284,13 +3422,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -3298,13 +3435,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -3312,9 +3446,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -3338,19 +3470,19 @@ local.get $3 local.get $2 i32.load - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -3364,13 +3496,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -3380,14 +3518,14 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.tee $4 call $~lib/map/Map#find local.tee $3 @@ -3435,12 +3573,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $5 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -3465,18 +3601,18 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -3486,12 +3622,12 @@ unreachable end ) - (func $~lib/map/Map#delete (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#delete (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $1 i32.eqz @@ -3526,7 +3662,6 @@ i32.gt_u select i32.ge_u - local.tee $1 if (result i32) local.get $0 i32.load offset=20 @@ -3538,7 +3673,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $1 + i32.const 0 end if local.get $0 @@ -3546,10 +3681,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 40 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 45 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -3561,10 +3696,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3579,10 +3714,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3594,10 +3729,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3615,10 +3750,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3634,10 +3769,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3649,10 +3784,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3667,10 +3802,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3682,10 +3817,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3703,10 +3838,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3722,10 +3857,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3737,10 +3872,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3751,10 +3886,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3772,10 +3907,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3790,10 +3925,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3808,10 +3943,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3822,10 +3957,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3843,10 +3978,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3855,17 +3990,45 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/map/test (; 41 ;) (type $FUNCSIG$v) + (func $~lib/map/Map#constructor (; 46 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $std/map/testNumeric (; 47 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -3877,10 +4040,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3895,10 +4058,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3910,10 +4073,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3931,10 +4094,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3950,10 +4113,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3965,10 +4128,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3983,10 +4146,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3998,10 +4161,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4019,10 +4182,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -4038,10 +4201,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4053,10 +4216,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4067,10 +4230,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4088,10 +4251,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -4106,10 +4269,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4124,10 +4287,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4138,10 +4301,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4159,10 +4322,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4171,26 +4334,37 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 + (func $~lib/map/Map#clear (; 48 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load + i32.ne + drop + local.get $0 + local.get $1 i32.store local.get $0 i32.const 3 i32.store offset=4 - local.get $0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load offset=8 + i32.ne + drop + local.get $0 + local.get $1 i32.store offset=8 local.get $0 i32.const 4 @@ -4202,10 +4376,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 43 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 49 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -4228,7 +4404,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 50 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -4294,7 +4470,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 45 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 51 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4304,49 +4480,47 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=12 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i64.load local.get $1 i64.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=12 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (; 46 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 52 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 53 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4357,13 +4531,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -4371,13 +4544,10 @@ local.tee $6 i32.const 4 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -4385,9 +4555,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -4411,19 +4579,19 @@ local.get $3 local.get $2 i64.load - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=12 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 16 i32.add @@ -4437,13 +4605,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -4453,14 +4627,14 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 48 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 54 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.tee $4 call $~lib/map/Map#find local.tee $3 @@ -4508,12 +4682,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $5 i32.const 4 i32.shl + local.get $3 i32.add local.tee $3 local.get $1 @@ -4538,18 +4710,18 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=12 local.get $0 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 49 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 55 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -4559,13 +4731,13 @@ unreachable end ) - (func $~lib/map/Map#delete (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/map/Map#delete (; 56 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $2 i32.eqz @@ -4600,7 +4772,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4612,7 +4783,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -4620,7 +4791,7 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 51 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 57 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/map/Map#constructor @@ -4635,10 +4806,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4654,10 +4825,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4670,10 +4841,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4691,10 +4862,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4710,10 +4881,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4726,10 +4897,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4745,10 +4916,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4761,10 +4932,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4782,10 +4953,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4801,10 +4972,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4817,10 +4988,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4831,10 +5002,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4852,10 +5023,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4870,10 +5041,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4889,10 +5060,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4903,10 +5074,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4924,10 +5095,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4936,17 +5107,45 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/map/test (; 52 ;) (type $FUNCSIG$v) + (func $~lib/map/Map#constructor (; 58 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $std/map/testNumeric (; 59 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -4958,10 +5157,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4977,10 +5176,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4993,10 +5192,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5014,10 +5213,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -5033,10 +5232,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5049,10 +5248,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5068,10 +5267,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5084,10 +5283,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5105,10 +5304,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -5124,10 +5323,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5140,10 +5339,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5154,10 +5353,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5175,10 +5374,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -5193,10 +5392,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5212,10 +5411,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5226,10 +5425,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5247,10 +5446,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5259,14 +5458,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#find (; 53 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#constructor (; 60 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#find (; 61 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5276,50 +5503,48 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 f32.load local.get $1 f32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (; 54 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 62 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5330,13 +5555,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -5344,13 +5568,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -5358,9 +5579,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -5385,19 +5604,19 @@ local.get $2 f32.load i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -5411,13 +5630,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -5427,7 +5652,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 56 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 64 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5435,7 +5660,7 @@ local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.tee $4 call $~lib/map/Map#find local.tee $3 @@ -5483,12 +5708,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $5 i32.const 12 i32.mul + local.get $3 i32.add local.tee $3 local.get $1 @@ -5513,19 +5736,19 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 57 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 65 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -5535,14 +5758,14 @@ unreachable end ) - (func $~lib/map/Map#delete (; 58 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/map/Map#delete (; 66 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/map/Map#find local.tee $2 i32.eqz @@ -5577,7 +5800,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -5589,7 +5811,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -5597,10 +5819,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 59 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -5612,10 +5834,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5631,10 +5853,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5647,10 +5869,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5668,10 +5890,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -5687,10 +5909,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5703,10 +5925,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5722,10 +5944,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5738,10 +5960,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5759,10 +5981,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -5778,10 +6000,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5794,10 +6016,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5808,10 +6030,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5829,10 +6051,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -5847,10 +6069,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5866,10 +6088,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5880,10 +6102,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5901,10 +6123,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5913,14 +6135,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#find (; 60 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#constructor (; 68 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/map/Map#clear + local.get $0 + ) + (func $~lib/map/Map#find (; 69 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -5930,50 +6180,48 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=12 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 f64.load local.get $1 f64.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=12 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/map/Map#has (; 61 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 70 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 62 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 71 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5984,13 +6232,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -5998,13 +6245,10 @@ local.tee $6 i32.const 4 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -6012,9 +6256,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -6039,19 +6281,19 @@ local.get $2 f64.load i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=12 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 16 i32.add @@ -6065,13 +6307,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -6081,7 +6329,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 63 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 72 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6089,7 +6337,7 @@ local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.tee $4 call $~lib/map/Map#find local.tee $3 @@ -6137,12 +6385,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $3 - i32.const 8 - i32.add local.get $5 i32.const 4 i32.shl + local.get $3 i32.add local.tee $3 local.get $1 @@ -6167,19 +6413,19 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=12 local.get $0 local.get $3 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 64 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 73 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $0 if (result i32) @@ -6189,14 +6435,14 @@ unreachable end ) - (func $~lib/map/Map#delete (; 65 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/map/Map#delete (; 74 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/map/Map#find local.tee $2 i32.eqz @@ -6231,7 +6477,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -6243,7 +6488,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -6251,10 +6496,10 @@ call $~lib/map/Map#rehash end ) - (func $std/map/test (; 66 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 75 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) - call $~lib/map/Map#constructor + call $~lib/map/Map#constructor local.set $1 loop $repeat|0 local.get $0 @@ -6266,10 +6511,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6285,10 +6530,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6301,10 +6546,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6322,10 +6567,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -6341,10 +6586,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6357,10 +6602,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6376,10 +6621,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6392,10 +6637,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6413,10 +6658,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -6432,10 +6677,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6448,10 +6693,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6462,10 +6707,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6483,10 +6728,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -6501,10 +6746,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6520,10 +6765,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6534,10 +6779,10 @@ call $~lib/map/Map#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -6555,10 +6800,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -6567,30 +6812,201 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 76 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 160 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 160 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 78 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + if (result i32) + local.get $2 + i32.const 160 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end + local.get $2 ) - (func $start (; 67 ;) (type $FUNCSIG$v) - i32.const 144 + (func $~lib/runtime/runtime.retain (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 83 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 84 ;) (type $FUNCSIG$v) + i32.const 392 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - ) - (func $null (; 68 ;) (type $FUNCSIG$v) - nop + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 28 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT ) ) diff --git a/tests/compiler/std/map.ts b/tests/compiler/std/map.ts index 4fc1487360..fed0f6469b 100644 --- a/tests/compiler/std/map.ts +++ b/tests/compiler/std/map.ts @@ -1,6 +1,6 @@ -import "allocator/arena"; +import "collector/dummy"; -function test(): void { +function testNumeric(): void { var map = new Map(); // insert new @@ -46,13 +46,13 @@ function test(): void { assert(map.size == 0); } -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index b9cf6436ec..17e5e9516b 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -1,12 +1,12 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result 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$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) @@ -17,32 +17,47 @@ (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iidi (func (param i32 f64 i32) (result i32))) (type $FUNCSIG$vidi (func (param i32 f64 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\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") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L\08\00\00\00\00\00\00L\08\00\00\00\00\00\00L\10\00\00\00\00\00\00L\10\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00L@\00\00\00\00\00\00L@\00\00\00\00\00\00L \00\00\00\00\00\00L@\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/util/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/memory/HEAP_BASE i32 (i32.const 144)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 160)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 392)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -123,349 +138,387 @@ ) (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/internal/arraybuffer/computeSize (; 4 ;) (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/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 6 ;) (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 + i32.store offset=4 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub + i32.const 0 + i32.store offset=8 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub + i32.const 0 + i32.store offset=12 local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 + global.get $~lib/util/runtime/HEADER_SIZE i32.add - local.get $1 - i32.store8 + ) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - return + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + local.get $1 i32.store - i32.const 24 local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 + call $~lib/collector/dummy/__ref_register 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 + ) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 - br $continue|0 end end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (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) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $1 - i32.const 1073741816 + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 - call $~lib/env/abort + i32.const 80 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort unreachable end local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 + call $~lib/util/runtime/allocate + local.set $2 local.get $2 i32.const 0 - i32.ne - i32.eqz - if - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $1 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $3 + local.get $1 + call $~lib/memory/memory.fill + local.get $2 + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop ) - (func $~lib/map/Map#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/map/Map#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -473,10 +526,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -488,13 +560,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -520,16 +594,15 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash8 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 11 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -539,7 +612,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -551,7 +624,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load8_s @@ -562,7 +634,7 @@ i32.shr_s i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -582,11 +654,11 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 @@ -594,14 +666,14 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -621,7 +693,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -636,13 +707,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -654,8 +722,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -682,13 +748,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load8_s local.set $11 local.get $11 - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -701,11 +767,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -725,13 +791,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -741,12 +847,12 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 17 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 @@ -754,8 +860,8 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -802,8 +908,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -844,19 +948,19 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 @@ -864,8 +968,8 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -877,18 +981,18 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 @@ -896,8 +1000,8 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -937,7 +1041,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -949,7 +1052,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -958,7 +1061,7 @@ end i32.const 1 ) - (func $std/map/test (; 18 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 21 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -981,10 +1084,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1003,10 +1106,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1023,10 +1126,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1046,10 +1149,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -1068,10 +1171,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1088,10 +1191,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1110,10 +1213,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1130,10 +1233,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1153,10 +1256,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -1175,10 +1278,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1195,10 +1298,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1212,10 +1315,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1235,10 +1338,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -1258,10 +1361,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1280,10 +1383,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1297,10 +1400,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1320,10 +1423,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1335,19 +1438,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -1355,10 +1480,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -1370,13 +1514,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1402,9 +1548,8 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 24 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -1414,7 +1559,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -1426,7 +1571,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load8_u @@ -1435,7 +1579,7 @@ i32.and i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1455,24 +1599,24 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1492,7 +1636,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -1507,13 +1650,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -1525,8 +1665,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -1553,13 +1691,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load8_u local.set $11 local.get $11 - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -1572,11 +1710,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -1596,13 +1734,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -1612,19 +1790,19 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 27 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -1671,8 +1849,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -1713,26 +1889,26 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -1744,25 +1920,25 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -1802,7 +1978,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -1814,7 +1989,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -1823,7 +1998,7 @@ end i32.const 1 ) - (func $std/map/test (; 28 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 31 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1846,10 +2021,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1866,10 +2041,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1884,10 +2059,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1907,10 +2082,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -1929,10 +2104,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1947,10 +2122,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1967,10 +2142,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1985,10 +2160,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2008,10 +2183,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -2030,10 +2205,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2048,10 +2223,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2065,10 +2240,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2088,10 +2263,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -2111,10 +2286,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2131,10 +2306,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2148,10 +2323,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2171,10 +2346,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2186,19 +2361,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 32 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -2206,10 +2403,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -2221,13 +2437,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -2253,7 +2471,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash16 (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2275,9 +2493,8 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -2287,7 +2504,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -2299,7 +2516,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load16_s @@ -2310,7 +2526,7 @@ i32.shr_s i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -2330,11 +2546,11 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 @@ -2342,14 +2558,14 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2369,7 +2585,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -2384,13 +2599,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -2402,8 +2614,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -2430,13 +2640,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load16_s local.set $11 local.get $11 - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -2449,11 +2659,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -2473,13 +2683,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -2489,12 +2739,12 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 38 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 @@ -2502,8 +2752,8 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -2550,8 +2800,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -2592,19 +2840,19 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 @@ -2612,8 +2860,8 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -2625,18 +2873,18 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 @@ -2644,8 +2892,8 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -2685,7 +2933,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -2697,7 +2944,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -2706,7 +2953,7 @@ end i32.const 1 ) - (func $std/map/test (; 39 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2729,10 +2976,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2751,10 +2998,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2771,10 +3018,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2794,10 +3041,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -2816,10 +3063,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2836,10 +3083,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2858,10 +3105,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2878,10 +3125,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2901,10 +3148,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -2923,10 +3170,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2943,10 +3190,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2960,10 +3207,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2983,10 +3230,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -3006,10 +3253,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3028,10 +3275,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3045,10 +3292,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3068,10 +3315,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3083,19 +3330,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -3103,10 +3372,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -3118,13 +3406,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -3150,9 +3440,8 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 45 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -3162,7 +3451,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -3174,7 +3463,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load16_u @@ -3183,7 +3471,7 @@ i32.and i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -3203,24 +3491,24 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 47 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3240,7 +3528,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -3255,13 +3542,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -3273,8 +3557,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -3301,13 +3583,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load16_u local.set $11 local.get $11 - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -3320,11 +3602,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -3344,13 +3626,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -3360,19 +3682,19 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 48 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -3419,8 +3741,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -3461,26 +3781,26 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -3492,25 +3812,25 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -3550,7 +3870,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -3562,7 +3881,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -3571,7 +3890,7 @@ end i32.const 1 ) - (func $std/map/test (; 49 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 52 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3594,10 +3913,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3614,10 +3933,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3632,10 +3951,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3655,10 +3974,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -3677,10 +3996,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3695,10 +4014,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3715,10 +4034,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3733,10 +4052,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3756,10 +4075,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -3778,10 +4097,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3796,10 +4115,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3813,10 +4132,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3836,10 +4155,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -3859,10 +4178,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3879,10 +4198,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3896,10 +4215,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3919,10 +4238,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3934,19 +4253,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 53 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -3954,10 +4295,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -3969,13 +4329,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -4001,7 +4363,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 55 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -4043,9 +4405,8 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 53 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 56 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -4055,7 +4416,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -4067,14 +4428,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -4094,22 +4454,22 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 58 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4129,7 +4489,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -4144,13 +4503,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -4162,8 +4518,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -4190,13 +4544,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -4209,11 +4563,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -4233,13 +4587,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -4249,17 +4643,17 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 56 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 59 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -4306,8 +4700,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -4348,24 +4740,24 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -4377,23 +4769,23 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -4433,7 +4825,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4445,7 +4836,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -4454,7 +4845,7 @@ end i32.const 1 ) - (func $std/map/test (; 60 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 63 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4477,10 +4868,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4495,10 +4886,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4511,10 +4902,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4534,10 +4925,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -4556,10 +4947,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4572,10 +4963,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4590,10 +4981,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4606,10 +4997,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4629,10 +5020,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -4651,10 +5042,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4667,10 +5058,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4684,10 +5075,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4707,10 +5098,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -4730,10 +5121,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4748,10 +5139,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4765,10 +5156,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4788,10 +5179,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4803,19 +5194,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -4823,10 +5236,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -4838,13 +5270,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -4870,9 +5304,8 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 66 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -4882,7 +5315,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -4894,14 +5327,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -4921,22 +5353,22 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 65 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 68 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4956,7 +5388,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -4971,13 +5402,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -4989,8 +5417,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -5017,13 +5443,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -5036,11 +5462,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -5060,13 +5486,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -5076,17 +5542,17 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 66 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -5133,8 +5599,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -5175,24 +5639,24 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 67 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -5204,23 +5668,23 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 72 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -5260,7 +5724,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -5272,7 +5735,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -5281,7 +5744,7 @@ end i32.const 1 ) - (func $std/map/test (; 70 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5304,10 +5767,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5322,10 +5785,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5338,10 +5801,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5361,10 +5824,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -5383,10 +5846,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5399,10 +5862,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5417,10 +5880,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5433,10 +5896,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5456,10 +5919,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -5478,10 +5941,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5494,10 +5957,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5511,10 +5974,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5534,10 +5997,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -5557,10 +6020,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5575,10 +6038,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5592,10 +6055,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5615,10 +6078,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5630,19 +6093,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -5650,10 +6135,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -5665,13 +6169,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -5697,7 +6203,7 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hash64 (; 73 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 76 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5785,9 +6291,8 @@ local.set $3 local.get $3 ) - (func $~lib/map/Map#find (; 74 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 77 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -5797,7 +6302,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -5809,14 +6314,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i64.load local.get $1 i64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -5836,22 +6340,22 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 75 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 76 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 79 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5872,7 +6376,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -5887,13 +6390,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -5905,8 +6405,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -5933,13 +6431,13 @@ local.get $9 i32.load offset=8 i32.store offset=8 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i64.load local.set $11 local.get $11 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -5952,11 +6450,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=12 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -5976,13 +6474,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -5992,18 +6530,18 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 77 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 80 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -6050,8 +6588,6 @@ i32.load offset=8 local.set $6 local.get $6 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -6092,24 +6628,24 @@ local.set $7 local.get $5 local.get $7 - i32.load offset=8 + i32.load i32.store offset=12 local.get $7 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 78 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -6121,11 +6657,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 82 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 83 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6133,12 +6669,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -6178,7 +6714,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -6190,7 +6725,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -6199,7 +6734,7 @@ end i32.const 1 ) - (func $std/map/test (; 81 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 84 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6222,10 +6757,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6241,10 +6776,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6258,10 +6793,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6281,10 +6816,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -6303,10 +6838,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6320,10 +6855,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6339,10 +6874,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6356,10 +6891,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6379,10 +6914,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -6401,10 +6936,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6418,10 +6953,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6435,10 +6970,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6458,10 +6993,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -6481,10 +7016,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6500,10 +7035,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6517,10 +7052,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6540,10 +7075,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6555,19 +7090,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 85 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -6575,10 +7132,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -6590,13 +7166,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 86 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -6622,9 +7200,8 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 84 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 87 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -6634,7 +7211,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -6646,14 +7223,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i64.load local.get $1 i64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -6673,22 +7249,22 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 86 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6709,7 +7285,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -6724,13 +7299,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -6742,8 +7314,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -6770,13 +7340,13 @@ local.get $9 i32.load offset=8 i32.store offset=8 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i64.load local.set $11 local.get $11 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -6789,11 +7359,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=12 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -6813,13 +7383,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -6829,18 +7439,18 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 87 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 90 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -6887,8 +7497,6 @@ i32.load offset=8 local.set $6 local.get $6 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -6929,24 +7537,24 @@ local.set $7 local.get $5 local.get $7 - i32.load offset=8 + i32.load i32.store offset=12 local.get $7 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 88 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 91 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -6958,11 +7566,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 92 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 93 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6970,12 +7578,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -7015,7 +7623,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -7027,7 +7634,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -7036,7 +7643,7 @@ end i32.const 1 ) - (func $std/map/test (; 91 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 94 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -7059,10 +7666,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7078,10 +7685,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7095,10 +7702,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7118,10 +7725,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -7140,10 +7747,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7157,10 +7764,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7176,10 +7783,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7193,10 +7800,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7216,10 +7823,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -7238,10 +7845,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7255,10 +7862,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7272,10 +7879,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7295,10 +7902,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -7318,10 +7925,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7337,10 +7944,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7354,10 +7961,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7377,10 +7984,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7392,19 +7999,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 95 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -7412,10 +8041,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -7427,13 +8075,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 96 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -7459,9 +8109,8 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 94 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 97 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -7471,7 +8120,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -7483,14 +8132,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 f32.load local.get $1 f32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -7510,23 +8158,23 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 95 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 98 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 96 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 99 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7547,7 +8195,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -7562,13 +8209,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -7580,8 +8224,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -7608,14 +8250,14 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 f32.load local.set $11 local.get $11 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -7628,11 +8270,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=8 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -7652,13 +8294,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -7668,19 +8350,19 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 97 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 100 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 f32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -7727,8 +8409,6 @@ i32.load offset=8 local.set $6 local.get $6 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -7769,25 +8449,25 @@ local.set $7 local.get $5 local.get $7 - i32.load offset=8 + i32.load i32.store offset=8 local.get $7 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 98 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 101 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -7799,11 +8479,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 100 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 103 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -7811,13 +8491,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -7857,7 +8537,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -7869,7 +8548,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -7878,7 +8557,7 @@ end i32.const 1 ) - (func $std/map/test (; 101 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -7901,10 +8580,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7920,10 +8599,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7937,10 +8616,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7960,10 +8639,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -7982,10 +8661,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7999,10 +8678,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8018,10 +8697,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8035,10 +8714,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8058,10 +8737,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -8080,10 +8759,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8097,10 +8776,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8114,10 +8793,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8137,10 +8816,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -8160,10 +8839,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8179,10 +8858,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8196,10 +8875,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8219,10 +8898,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8234,19 +8913,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/map/Map#clear (; 102 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/map/Map#clear (; 105 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -8254,10 +8955,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -8269,13 +8989,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/map/Map#constructor (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -8301,9 +9023,8 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/map/Map#find (; 104 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 107 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -8313,7 +9034,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -8325,14 +9046,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 f64.load local.get $1 f64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -8352,23 +9072,23 @@ end i32.const 0 ) - (func $~lib/map/Map#has (; 105 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 108 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#rehash (; 106 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 109 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8389,7 +9109,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -8404,13 +9123,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -8422,8 +9138,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -8450,14 +9164,14 @@ local.get $9 i32.load offset=8 i32.store offset=8 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 f64.load local.set $11 local.get $11 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -8470,11 +9184,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=12 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -8494,13 +9208,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -8510,19 +9264,19 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 107 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 110 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 f64) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $1 local.set $3 local.get $3 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 end local.set $4 local.get $0 @@ -8569,8 +9323,6 @@ i32.load offset=8 local.set $6 local.get $6 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -8611,25 +9363,25 @@ local.set $7 local.get $5 local.get $7 - i32.load offset=8 + i32.load i32.store offset=12 local.get $7 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/map/Map#get (; 108 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 111 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -8641,11 +9393,11 @@ unreachable end ) - (func $~lib/map/Map#get:size (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 112 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/map/Map#delete (; 110 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 113 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -8653,13 +9405,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.4 (result i32) + block $~lib/util/hash/HASH|inlined.4 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.4 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.4 end call $~lib/map/Map#find local.set $3 @@ -8699,7 +9451,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -8711,7 +9462,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -8720,7 +9471,7 @@ end i32.const 1 ) - (func $std/map/test (; 111 ;) (type $FUNCSIG$v) + (func $std/map/testNumeric (; 114 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -8743,10 +9494,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8762,10 +9513,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8779,10 +9530,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 11 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8802,10 +9553,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 13 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -8824,10 +9575,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 17 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8841,10 +9592,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8860,10 +9611,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8877,10 +9628,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 21 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8900,10 +9651,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 23 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -8922,10 +9673,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 27 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8939,10 +9690,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8956,10 +9707,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 30 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -8979,10 +9730,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -9002,10 +9753,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9021,10 +9772,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9038,10 +9789,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 40 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -9061,10 +9812,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9076,29 +9827,266 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $start:std/map (; 115 ;) (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 + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + call $std/map/testNumeric + ) + (func $~lib/runtime/runtime.instanceof (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 117 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 118 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 119 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 120 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 121 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 122 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 123 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 28 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 ) - (func $start:std/map (; 112 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - call $std/map/test - ) - (func $start (; 113 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.retain (; 124 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 125 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 126 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 127 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 128 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 129 ;) (type $FUNCSIG$v) call $start:std/map + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 114 ;) (type $FUNCSIG$v) + (func $null (; 130 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/math.json b/tests/compiler/std/math.json new file mode 100644 index 0000000000..b1da366ff4 --- /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.optimized.wat b/tests/compiler/std/math.optimized.wat index 737bcdcc77..906f5ddc87 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -29,7 +29,7 @@ (import "Math" "PI" (global $~lib/bindings/Math/PI f64)) (import "Math" "SQRT1_2" (global $~lib/bindings/Math/SQRT1_2 f64)) (import "Math" "SQRT2" (global $~lib/bindings/Math/SQRT2 f64)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "abs" (func $~lib/bindings/Math/abs (param f64) (result f64))) (import "Math" "acos" (func $~lib/bindings/Math/acos (param f64) (result f64))) (import "Math" "acosh" (func $~lib/bindings/Math/acosh (param f64) (result f64))) @@ -60,12 +60,14 @@ (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") - (data (i32.const 40) " \00\00\00\00\00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") - (data (i32.const 104) "(\00\00\00\04") - (data (i32.const 112) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") + (data (i32.const 48) "\0f\00\00\00 ") + (data (i32.const 64) ")\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 96) "\11\00\00\00\10") + (data (i32.const 112) "@\00\00\00@\00\00\00 \00\00\00\04") + (data (i32.const 128) "\10\00\00\00\18") + (data (i32.const 144) "~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") (global $~lib/math/rempio2f_y (mut f64) (f64.const 0)) (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0_64 (mut i64) (i64.const 0)) @@ -73,7 +75,6 @@ (global $~lib/math/random_state0_32 (mut i32) (i32.const 0)) (global $~lib/math/random_state1_32 (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/math/NativeMath.scalbn (; 30 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) local.get $1 @@ -154,17 +155,13 @@ ) (func $std/math/ulperr (; 31 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) (local $3 i32) - (local $4 i32) - local.get $0 - local.get $0 - f64.ne - local.tee $4 - local.set $3 local.get $1 local.get $1 f64.ne - local.get $3 - local.get $4 + i32.const 0 + local.get $0 + local.get $0 + f64.ne select if f64.const 0 @@ -356,17 +353,13 @@ ) (func $std/math/ulperrf (; 34 ;) (type $FUNCSIG$ffff) (param $0 f32) (param $1 f32) (param $2 f32) (result f32) (local $3 i32) - (local $4 i32) - local.get $0 - local.get $0 - f32.ne - local.tee $4 - local.set $3 local.get $1 local.get $1 f32.ne - local.get $3 - local.get $4 + i32.const 0 + local.get $0 + local.get $0 + f32.ne select if f32.const 0 @@ -494,22 +487,20 @@ call $std/math/check ) (func $std/math/test_abs (; 38 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) - (local $2 i32) local.get $0 f64.abs local.get $1 f64.const 0 call $std/math/check - local.tee $2 - if + if (result i32) local.get $0 call $~lib/bindings/Math/abs local.get $1 f64.const 0 call $std/math/check - local.set $2 + else + i32.const 0 end - local.get $2 ) (func $std/math/test_absf (; 39 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) local.get $0 @@ -686,22 +677,20 @@ f64.mul ) (func $std/math/test_acos (; 42 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.acos local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/acos local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.acos (; 43 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -878,32 +867,29 @@ (local $1 f64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i64) - (local $8 f64) + (local $6 i64) + (local $7 f64) i32.const 1 - local.set $2 + local.set $3 local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1071284858 i32.lt_u - local.tee $4 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $4 end - local.get $4 if - local.get $3 + local.get $2 i32.const -1074790400 i32.ge_u if @@ -923,7 +909,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const 2034237440 @@ -932,17 +918,17 @@ local.get $0 return end - local.get $3 + local.get $2 i32.const -1076707644 i32.le_u if i32.const 0 - local.set $2 + local.set $3 local.get $0 local.set $1 end else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -950,28 +936,28 @@ return end end - local.get $2 + local.get $3 if f64.const 1 local.get $0 f64.add i64.reinterpret_f64 - local.tee $7 + local.tee $6 i64.const 32 i64.shr_u i32.wrap_i64 i32.const 614242 i32.add - local.tee $4 + local.tee $2 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.tee $2 + local.tee $3 i32.const 54 i32.lt_s if (result f64) - local.get $7 + local.get $6 f64.reinterpret_i64 local.set $1 f64.const 1 @@ -984,7 +970,7 @@ f64.const 1 f64.sub f64.sub - local.get $2 + local.get $3 i32.const 2 i32.ge_s select @@ -993,11 +979,11 @@ else f64.const 0 end - local.set $6 - local.get $7 + local.set $5 + local.get $6 i64.const 4294967295 i64.and - local.get $4 + local.get $2 i32.const 1048575 i32.and i32.const 1072079006 @@ -1016,192 +1002,20 @@ local.get $1 f64.add f64.div - local.tee $5 - local.get $5 - f64.mul - local.tee $8 - local.get $8 - f64.mul - local.set $0 - local.get $5 - f64.const 0.5 - local.get $1 - f64.mul - local.get $1 - f64.mul - local.tee $5 - local.get $8 - f64.const 0.6666666666666735 - local.get $0 - f64.const 0.2857142874366239 - local.get $0 - f64.const 0.1818357216161805 - local.get $0 - f64.const 0.14798198605116586 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.mul - local.get $0 - f64.const 0.3999999999940942 - local.get $0 - f64.const 0.22222198432149784 - local.get $0 - f64.const 0.15313837699209373 - f64.mul - f64.add - f64.mul - f64.add - f64.mul - f64.add - f64.add - f64.mul - local.get $2 - f64.convert_i32_s - local.tee $0 - f64.const 1.9082149292705877e-10 - f64.mul - local.get $6 - f64.add - f64.add - local.get $5 - f64.sub - local.get $1 - f64.add - local.get $0 - f64.const 0.6931471803691238 - f64.mul - f64.add - ) - (func $~lib/math/NativeMath.log (; 46 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) - (local $1 i32) - (local $2 i32) - (local $3 i64) - (local $4 f64) - (local $5 f64) - (local $6 i32) - (local $7 f64) - local.get $0 - i64.reinterpret_f64 - local.tee $3 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $2 - i32.const 1048576 - i32.lt_u - local.tee $1 - i32.eqz - if - local.get $2 - i32.const 31 - i32.shr_u - local.set $1 - end - local.get $1 - if - local.get $3 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - if - f64.const -1 - local.get $0 - local.get $0 - f64.mul - f64.div - return - end - local.get $2 - i32.const 31 - i32.shr_u - if - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.div - return - end - i32.const -54 - local.set $6 - local.get $0 - f64.const 18014398509481984 - f64.mul - i64.reinterpret_f64 - local.tee $3 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.set $2 - else - local.get $2 - i32.const 2146435072 - i32.ge_u - if - local.get $0 - return - else - local.get $2 - i32.const 1072693248 - i32.eq - local.tee $1 - if - local.get $3 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $1 - end - local.get $1 - if - f64.const 0 - return - end - end - end - local.get $3 - i64.const 4294967295 - i64.and - local.get $2 - i32.const 614242 - i32.add - local.tee $1 - i32.const 1048575 - i32.and - i32.const 1072079006 - i32.add - i64.extend_i32_u - i64.const 32 - i64.shl - i64.or - f64.reinterpret_i64 - f64.const 1 - f64.sub local.tee $4 - f64.const 2 local.get $4 - f64.add - f64.div - local.tee $5 - local.get $5 f64.mul local.tee $7 local.get $7 f64.mul local.set $0 - local.get $5 - f64.const 0.5 local.get $4 + f64.const 0.5 + local.get $1 f64.mul - local.get $4 + local.get $1 f64.mul - local.tee $5 + local.tee $4 local.get $7 f64.const 0.6666666666666735 local.get $0 @@ -1231,21 +1045,187 @@ f64.add f64.add f64.mul + local.get $3 + f64.convert_i32_s + local.tee $0 + f64.const 1.9082149292705877e-10 + f64.mul + local.get $5 + f64.add + f64.add + local.get $4 + f64.sub + local.get $1 + f64.add + local.get $0 + f64.const 0.6931471803691238 + f64.mul + f64.add + ) + (func $~lib/math/NativeMath.log (; 46 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (local $1 i32) + (local $2 i64) + (local $3 f64) + (local $4 f64) + (local $5 i32) + (local $6 f64) + local.get $0 + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $1 + i32.const 1048576 + i32.lt_u + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 31 + i32.shr_u + end + if + local.get $2 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + if + f64.const -1 + local.get $0 + local.get $0 + f64.mul + f64.div + return + end + local.get $1 + i32.const 31 + i32.shr_u + if + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.div + return + end + i32.const -54 + local.set $5 + local.get $0 + f64.const 18014398509481984 + f64.mul + i64.reinterpret_f64 + local.tee $2 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.set $1 + else + local.get $1 + i32.const 2146435072 + i32.ge_u + if + local.get $0 + return + else + local.get $2 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $1 + i32.const 1072693248 + i32.eq + select + if + f64.const 0 + return + end + end + end + local.get $2 + i64.const 4294967295 + i64.and + local.get $1 + i32.const 614242 + i32.add + local.tee $1 + i32.const 1048575 + i32.and + i32.const 1072079006 + i32.add + i64.extend_i32_u + i64.const 32 + i64.shl + i64.or + f64.reinterpret_i64 + f64.const 1 + f64.sub + local.tee $3 + f64.const 2 + local.get $3 + f64.add + f64.div + local.tee $4 + local.get $4 + f64.mul + local.tee $6 + local.get $6 + f64.mul + local.set $0 + local.get $4 + f64.const 0.5 + local.get $3 + f64.mul + local.get $3 + f64.mul + local.tee $4 + local.get $6 + f64.const 0.6666666666666735 + local.get $0 + f64.const 0.2857142874366239 + local.get $0 + f64.const 0.1818357216161805 + local.get $0 + f64.const 0.14798198605116586 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.mul + local.get $0 + f64.const 0.3999999999940942 + local.get $0 + f64.const 0.22222198432149784 + local.get $0 + f64.const 0.15313837699209373 + f64.mul + f64.add + f64.mul + f64.add + f64.mul + f64.add + f64.add + f64.mul local.get $1 i32.const 20 i32.shr_s i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s local.tee $0 f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $5 - f64.sub local.get $4 + f64.sub + local.get $3 f64.add local.get $0 f64.const 0.6931471803691238 @@ -1307,49 +1287,44 @@ f64.add ) (func $std/math/test_acosh (; 48 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.acosh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/acosh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.log1p (; 49 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f32) (local $5 f32) (local $6 f32) - (local $7 f32) i32.const 1 - local.set $2 + local.set $3 local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 1054086096 i32.lt_u - local.tee $4 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $4 end - local.get $4 if - local.get $3 + local.get $2 i32.const -1082130432 i32.ge_u if @@ -1369,7 +1344,7 @@ f32.div return end - local.get $3 + local.get $2 i32.const 1 i32.shl i32.const 1728053248 @@ -1378,17 +1353,17 @@ local.get $0 return end - local.get $3 + local.get $2 i32.const -1097468391 i32.le_u if i32.const 0 - local.set $2 + local.set $3 local.get $0 local.set $1 end else - local.get $3 + local.get $2 i32.const 2139095040 i32.ge_u if @@ -1396,7 +1371,7 @@ return end end - local.get $2 + local.get $3 if f32.const 1 local.get $0 @@ -1405,12 +1380,12 @@ i32.reinterpret_f32 i32.const 4913933 i32.add - local.tee $4 + local.tee $2 i32.const 23 i32.shr_u i32.const 127 i32.sub - local.tee $2 + local.tee $3 i32.const 25 i32.lt_s if (result f32) @@ -1424,7 +1399,7 @@ f32.const 1 f32.sub f32.sub - local.get $2 + local.get $3 i32.const 2 i32.ge_s select @@ -1433,8 +1408,8 @@ else f32.const 0 end - local.set $6 - local.get $4 + local.set $5 + local.get $2 i32.const 8388607 i32.and i32.const 1060439283 @@ -1449,21 +1424,21 @@ local.get $1 f32.add f32.div - local.tee $5 - local.get $5 + local.tee $4 + local.get $4 f32.mul - local.tee $7 - local.get $7 + local.tee $6 + local.get $6 f32.mul local.set $0 - local.get $5 + local.get $4 f32.const 0.5 local.get $1 f32.mul local.get $1 f32.mul - local.tee $5 - local.get $7 + local.tee $4 + local.get $6 f32.const 0.6666666269302368 local.get $0 f32.const 0.2849878668785095 @@ -1480,15 +1455,15 @@ f32.add f32.add f32.mul - local.get $2 + local.get $3 f32.convert_i32_s local.tee $0 f32.const 9.05800061445916e-06 f32.mul - local.get $6 + local.get $5 f32.add f32.add - local.get $5 + local.get $4 f32.sub local.get $1 f32.add @@ -1500,24 +1475,21 @@ (func $~lib/math/NativeMathf.log (; 50 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 f32) + (local $3 f32) + (local $4 i32) + (local $5 f32) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 8388608 i32.lt_u - local.tee $3 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 i32.const 31 i32.shr_u - local.set $3 end - local.get $3 if local.get $1 i32.const 1 @@ -1543,7 +1515,7 @@ return end i32.const -25 - local.set $5 + local.set $4 local.get $0 f32.const 33554432 f32.mul @@ -1569,7 +1541,7 @@ local.get $1 i32.const 4913933 i32.add - local.tee $3 + local.tee $1 i32.const 8388607 i32.and i32.const 1060439283 @@ -1582,21 +1554,21 @@ local.get $0 f32.add f32.div - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 f32.mul - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 f32.mul local.set $2 - local.get $4 + local.get $3 f32.const 0.5 local.get $0 f32.mul local.get $0 f32.mul - local.tee $4 - local.get $6 + local.tee $3 + local.get $5 f32.const 0.6666666269302368 local.get $2 f32.const 0.2849878668785095 @@ -1613,19 +1585,19 @@ f32.add f32.add f32.mul - local.get $3 + local.get $1 i32.const 23 i32.shr_s i32.const 127 i32.sub - local.get $5 + local.get $4 i32.add f32.convert_i32_s local.tee $2 f32.const 9.05800061445916e-06 f32.mul f32.add - local.get $4 + local.get $3 f32.sub local.get $0 f32.add @@ -1694,14 +1666,14 @@ (func $~lib/math/NativeMath.asin (; 53 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 f64) + (local $3 f64) + (local $4 i32) local.get $0 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $4 i32.const 2147483647 i32.and local.tee $2 @@ -1735,17 +1707,14 @@ i32.const 1071644672 i32.lt_u if + local.get $2 + i32.const 1048576 + i32.ge_u + i32.const 0 local.get $2 i32.const 1045430272 i32.lt_u - local.tee $3 - if - local.get $2 - i32.const 1048576 - i32.ge_u - local.set $3 - end - local.get $3 + select if local.get $0 return @@ -1771,7 +1740,7 @@ local.set $0 local.get $1 call $~lib/math/R - local.set $4 + local.set $3 local.get $2 i32.const 1072640819 i32.ge_u @@ -1780,7 +1749,7 @@ f64.const 2 local.get $0 local.get $0 - local.get $4 + local.get $3 f64.mul f64.add f64.mul @@ -1792,7 +1761,7 @@ f64.const 2 local.get $0 f64.mul - local.get $4 + local.get $3 f64.mul f64.const 6.123233995736766e-17 f64.const 2 @@ -1822,7 +1791,7 @@ f64.sub end local.set $0 - local.get $3 + local.get $4 i32.const 31 i32.shr_u if @@ -1833,29 +1802,26 @@ local.get $0 ) (func $std/math/test_asin (; 54 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.asin local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/asin local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.asin (; 55 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 f32) - (local $3 i32) - (local $4 f32) - (local $5 f64) + (local $3 f32) + (local $4 f64) local.get $0 i32.reinterpret_f32 i32.const 2147483647 @@ -1886,17 +1852,14 @@ i32.const 1056964608 i32.lt_u if + local.get $1 + i32.const 8388608 + i32.ge_u + i32.const 0 local.get $1 i32.const 964689920 i32.lt_u - local.tee $3 - if (result i32) - local.get $1 - i32.const 8388608 - i32.ge_u - else - local.get $3 - end + select if local.get $0 return @@ -1950,15 +1913,15 @@ f32.mul f32.add f32.div - local.set $4 + local.set $3 f64.const 1.5707963705062866 f64.const 2 local.get $2 f64.promote_f32 f64.sqrt - local.tee $5 - local.get $5 + local.tee $4 local.get $4 + local.get $3 f64.promote_f32 f64.mul f64.add @@ -2046,22 +2009,20 @@ f64.copysign ) (func $std/math/test_asinh (; 58 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.asinh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/asinh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.asinh (; 59 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -2359,22 +2320,20 @@ f64.copysign ) (func $std/math/test_atan (; 62 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.atan local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/atan local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.atan (; 63 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) @@ -2637,22 +2596,20 @@ f64.copysign ) (func $std/math/test_atanh (; 66 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.atanh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/atanh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.atanh (; 67 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -2715,19 +2672,16 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - (local $6 i64) + (local $5 i64) + (local $6 i32) (local $7 i32) - local.get $1 - local.get $1 - f64.ne - local.tee $3 - local.set $2 - local.get $2 + i32.const 1 local.get $0 local.get $0 f64.ne - local.get $3 + local.get $1 + local.get $1 + f64.ne select if local.get $1 @@ -2737,20 +2691,20 @@ end local.get $0 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i64.const 32 i64.shr_u i32.wrap_i64 local.set $3 - local.get $6 + local.get $5 i32.wrap_i64 - local.set $5 + local.set $6 local.get $1 i64.reinterpret_f64 - local.tee $6 + local.tee $5 i32.wrap_i64 local.tee $7 - local.get $6 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 @@ -2778,11 +2732,11 @@ i32.const 2147483647 i32.and local.set $4 - local.get $5 local.get $3 i32.const 2147483647 i32.and - local.tee $5 + local.tee $3 + local.get $6 i32.or i32.eqz if @@ -2821,7 +2775,7 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $3 i32.const 2146435072 i32.eq if @@ -2874,33 +2828,27 @@ end end end + i32.const 1 + local.get $3 + i32.const 2146435072 + i32.eq local.get $4 i32.const 67108864 i32.add - local.get $5 + local.get $3 i32.lt_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $5 - i32.const 2146435072 - i32.eq - end + select br_if $folding-inner0 + local.get $3 + i32.const 67108864 + i32.add + local.get $4 + i32.lt_u + i32.const 0 local.get $2 i32.const 2 i32.and - local.tee $3 - if (result i32) - local.get $5 - i32.const 67108864 - i32.add - local.get $4 - i32.lt_u - else - local.get $3 - end + select if (result f64) f64.const 0 else @@ -2953,40 +2901,34 @@ select ) (func $std/math/test_atan2 (; 70 ;) (type $FUNCSIG$idddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - (local $4 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 local.get $2 local.get $3 call $std/math/check - local.tee $4 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/atan2 local.get $2 local.get $3 call $std/math/check - local.set $4 + else + i32.const 0 end - local.get $4 ) (func $~lib/math/NativeMathf.atan2 (; 71 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $1 - local.get $1 - f32.ne - local.tee $3 - local.set $2 - local.get $2 + i32.const 1 local.get $0 local.get $0 f32.ne - local.get $3 + local.get $1 + local.get $1 + f32.ne select if local.get $1 @@ -3024,7 +2966,7 @@ local.get $3 i32.const 2147483647 i32.and - local.tee $5 + local.tee $3 i32.eqz if block $break|0 @@ -3060,7 +3002,7 @@ i32.const 2139095040 i32.eq if - local.get $5 + local.get $3 i32.const 2139095040 i32.eq if @@ -3113,33 +3055,27 @@ end end end + i32.const 1 + local.get $3 + i32.const 2139095040 + i32.eq local.get $4 i32.const 218103808 i32.add - local.get $5 + local.get $3 i32.lt_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $5 - i32.const 2139095040 - i32.eq - end + select br_if $folding-inner0 + local.get $3 + i32.const 218103808 + i32.add + local.get $4 + i32.lt_u + i32.const 0 local.get $2 i32.const 2 i32.and - local.tee $3 - if (result i32) - local.get $5 - i32.const 218103808 - i32.add - local.get $4 - i32.lt_u - else - local.get $3 - end + select if (result f32) f32.const 0 else @@ -3322,22 +3258,20 @@ f64.add ) (func $std/math/test_cbrt (; 74 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.cbrt local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/cbrt local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.cbrt (; 75 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f64) @@ -3443,13 +3377,11 @@ call $std/math/check ) (func $std/math/test_ceil (; 77 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) - (local $2 i32) local.get $0 f64.ceil local.get $1 f64.const 0 call $std/math/check - local.tee $2 if (result i32) local.get $0 call $~lib/bindings/Math/ceil @@ -3457,7 +3389,7 @@ f64.const 0 call $std/math/check else - local.get $2 + i32.const 0 end ) (func $std/math/test_ceilf (; 78 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) @@ -3681,7 +3613,7 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.0 end - i32.const 104 + i32.const 116 i32.load local.get $3 i32.const 23 @@ -3695,9 +3627,9 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $10 - i32.const 104 + i32.const 116 i32.load local.get $9 i32.const 1 @@ -3705,7 +3637,7 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $4 local.get $5 i32.const 63 @@ -3720,7 +3652,7 @@ i32.sub i64.extend_i32_s i64.shl - i32.const 104 + i32.const 116 i32.load local.get $9 i32.const 2 @@ -3728,7 +3660,7 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load i64.const 96 local.get $5 i64.extend_i32_s @@ -3938,14 +3870,14 @@ i64.const 63 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $6 local.get $8 i64.const 32 i64.shr_u i64.const 2147483647 i64.and i32.wrap_i64 - local.tee $6 + local.tee $5 i32.const 1078159482 i32.ge_u if @@ -3956,7 +3888,7 @@ local.get $0 return end - local.get $5 + local.get $6 if f64.const -1 return @@ -3971,13 +3903,13 @@ return end end - local.get $6 + local.get $5 i32.const 1071001154 i32.gt_u if local.get $0 i32.const 1 - local.get $5 + local.get $6 i32.const 1 i32.shl i32.sub @@ -3989,7 +3921,7 @@ f64.copysign f64.add i32.trunc_f64_s - local.get $6 + local.get $5 i32.const 1072734898 i32.lt_u select @@ -4012,7 +3944,7 @@ f64.sub local.set $7 else - local.get $6 + local.get $5 i32.const 1016070144 i32.lt_u if @@ -4138,17 +4070,14 @@ i64.shl f64.reinterpret_i64 local.set $1 + i32.const 1 + local.get $3 + i32.const 56 + i32.gt_s local.get $3 i32.const 0 i32.lt_s - local.tee $5 - if (result i32) - local.get $5 - else - local.get $3 - i32.const 56 - i32.gt_s - end + select if local.get $0 local.get $2 @@ -4417,51 +4346,49 @@ f64.mul ) (func $std/math/test_cosh (; 84 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.cosh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/cosh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.expm1 (; 85 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) - (local $1 f32) - (local $2 i32) + (local $1 i32) + (local $2 f32) (local $3 f32) - (local $4 i32) - (local $5 f32) + (local $4 f32) + (local $5 i32) (local $6 f32) local.get $0 i32.reinterpret_f32 - local.tee $4 + local.tee $1 i32.const 31 i32.shr_u - local.set $2 - local.get $4 + local.set $5 + local.get $1 i32.const 2147483647 i32.and - local.tee $4 + local.tee $1 i32.const 1100331076 i32.ge_u if - local.get $4 + local.get $1 i32.const 2139095040 i32.gt_u if local.get $0 return end - local.get $2 + local.get $5 if f32.const -1 return @@ -4476,13 +4403,13 @@ return end end - local.get $4 + local.get $1 i32.const 1051816472 i32.gt_u if local.get $0 i32.const 1 - local.get $2 + local.get $5 i32.const 1 i32.shl i32.sub @@ -4494,30 +4421,30 @@ f32.copysign f32.add i32.trunc_f32_s - local.get $4 + local.get $1 i32.const 1065686418 i32.lt_u select - local.tee $2 + local.tee $1 f32.convert_i32_s local.tee $0 f32.const 0.6931381225585938 f32.mul f32.sub - local.tee $1 - local.get $1 + local.tee $2 + local.get $2 local.get $0 f32.const 9.05800061445916e-06 f32.mul - local.tee $1 + local.tee $2 f32.sub local.tee $0 f32.sub - local.get $1 + local.get $2 f32.sub - local.set $5 + local.set $4 else - local.get $4 + local.get $1 i32.const 855638016 i32.lt_u if (result i32) @@ -4526,7 +4453,7 @@ else i32.const 0 end - local.set $2 + local.set $1 end f32.const 3 f32.const 1 @@ -4536,9 +4463,9 @@ f32.mul local.tee $3 f32.mul - local.tee $1 + local.tee $2 f32.const -0.03333321213722229 - local.get $1 + local.get $2 f32.const 1.5807170420885086e-03 f32.mul f32.add @@ -4549,7 +4476,7 @@ f32.mul f32.sub local.set $3 - local.get $1 + local.get $2 local.get $6 local.get $3 f32.sub @@ -4561,42 +4488,42 @@ f32.div f32.mul local.set $3 - local.get $2 + local.get $1 i32.eqz if local.get $0 local.get $0 local.get $3 f32.mul - local.get $1 + local.get $2 f32.sub f32.sub return end local.get $0 local.get $3 - local.get $5 + local.get $4 f32.sub f32.mul - local.get $5 - f32.sub - local.get $1 + local.get $4 f32.sub - local.set $1 local.get $2 + f32.sub + local.set $2 + local.get $1 i32.const -1 i32.eq if f32.const 0.5 local.get $0 - local.get $1 + local.get $2 f32.sub f32.mul f32.const 0.5 f32.sub return end - local.get $2 + local.get $1 i32.const 1 i32.eq if @@ -4605,7 +4532,7 @@ f32.lt if f32.const -2 - local.get $1 + local.get $2 local.get $0 f32.const 0.5 f32.add @@ -4616,39 +4543,35 @@ f32.const 1 f32.const 2 local.get $0 - local.get $1 + local.get $2 f32.sub f32.mul f32.add return end - local.get $2 + local.get $1 i32.const 127 i32.add i32.const 23 i32.shl f32.reinterpret_i32 - local.set $5 - local.get $2 + local.set $4 + i32.const 1 + local.get $1 + i32.const 56 + i32.gt_s + local.get $1 i32.const 0 i32.lt_s - local.tee $4 - i32.eqz - if - local.get $2 - i32.const 56 - i32.gt_s - local.set $4 - end - local.get $4 + select if local.get $0 - local.get $1 + local.get $2 f32.sub f32.const 1 f32.add local.set $0 - local.get $2 + local.get $1 i32.const 128 i32.eq if (result f32) @@ -4659,7 +4582,7 @@ f32.mul else local.get $0 - local.get $5 + local.get $4 f32.mul end f32.const 1 @@ -4667,7 +4590,7 @@ return end i32.const 127 - local.get $2 + local.get $1 i32.sub i32.const 23 i32.shl @@ -4677,19 +4600,19 @@ f32.const 1 local.get $3 f32.sub - local.get $1 + local.get $2 f32.sub f32.const 1 - local.get $1 + local.get $2 local.get $3 f32.add f32.sub - local.get $2 + local.get $1 i32.const 20 i32.lt_s select f32.add - local.get $5 + local.get $4 f32.mul ) (func $~lib/math/NativeMathf.exp (; 86 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -4887,22 +4810,20 @@ call $std/math/check ) (func $std/math/test_exp (; 89 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.exp local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/exp local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_expf (; 90 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -4912,22 +4833,20 @@ call $std/math/check ) (func $std/math/test_expm1 (; 91 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.expm1 local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/expm1 local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_expm1f (; 92 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -4937,13 +4856,11 @@ call $std/math/check ) (func $std/math/test_floor (; 93 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) - (local $2 i32) local.get $0 f64.floor local.get $1 f64.const 0 call $std/math/check - local.tee $2 if (result i32) local.get $0 call $~lib/bindings/Math/floor @@ -4951,7 +4868,7 @@ f64.const 0 call $std/math/check else - local.get $2 + i32.const 0 end ) (func $std/math/test_floorf (; 94 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) @@ -4970,9 +4887,8 @@ (local $7 f64) (local $8 f64) (local $9 i32) - (local $10 i32) - (local $11 f64) - (local $12 i64) + (local $10 f64) + (local $11 i64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 @@ -4986,10 +4902,10 @@ i64.lt_u if local.get $4 - local.set $12 + local.set $11 local.get $2 local.set $4 - local.get $12 + local.get $11 local.set $2 end local.get $4 @@ -5014,18 +4930,14 @@ local.get $4 f64.reinterpret_i64 local.set $0 + i32.const 1 + local.get $2 + i64.const 0 + i64.eq local.get $5 i32.const 2047 i32.eq - local.tee $10 - i32.eqz - if - local.get $2 - i64.const 0 - i64.eq - local.set $10 - end - local.get $10 + select if local.get $0 return @@ -5085,7 +4997,7 @@ f64.add local.tee $7 f64.sub - local.set $11 + local.set $10 local.get $1 local.get $1 local.get $1 @@ -5126,9 +5038,9 @@ f64.const 2 local.get $7 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add f64.add @@ -5140,31 +5052,29 @@ f64.mul ) (func $std/math/test_hypot (; 96 ;) (type $FUNCSIG$idddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - (local $4 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot local.get $2 local.get $3 call $std/math/check - local.tee $4 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/hypot local.get $2 local.get $3 call $std/math/check - local.set $4 + else + i32.const 0 end - local.get $4 ) (func $~lib/math/NativeMathf.hypot (; 97 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 f64) + (local $4 f32) + (local $5 f64) + (local $6 i32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 @@ -5178,10 +5088,10 @@ i32.lt_u if local.get $3 - local.set $4 + local.set $6 local.get $2 local.set $3 - local.get $4 + local.get $6 local.set $2 end local.get $3 @@ -5197,27 +5107,20 @@ local.get $1 return end + i32.const 1 local.get $3 - i32.const 2139095040 + local.get $2 + i32.sub + i32.const 209715200 i32.ge_u - local.tee $4 - i32.eqz - if - local.get $2 - i32.eqz - local.set $4 - end - local.get $4 + i32.const 1 + local.get $2 i32.eqz - if - local.get $3 - local.get $2 - i32.sub - i32.const 209715200 - i32.ge_u - local.set $4 - end - local.get $4 + local.get $3 + i32.const 2139095040 + i32.ge_u + select + select if local.get $0 local.get $1 @@ -5225,13 +5128,13 @@ return end f32.const 1 - local.set $5 + local.set $4 local.get $3 i32.const 1568669696 i32.ge_u if (result f32) f32.const 1237940039285380274899124e3 - local.set $5 + local.set $4 local.get $1 f32.const 8.077935669463161e-28 f32.mul @@ -5245,7 +5148,7 @@ i32.lt_u if (result f32) f32.const 8.077935669463161e-28 - local.set $5 + local.set $4 local.get $1 f32.const 1237940039285380274899124e3 f32.mul @@ -5258,16 +5161,16 @@ end end local.set $0 - local.get $5 + local.get $4 local.get $0 f64.promote_f32 - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 f64.mul local.get $1 f64.promote_f32 - local.tee $6 - local.get $6 + local.tee $5 + local.get $5 f64.mul f64.add f32.demote_f64 @@ -5283,22 +5186,20 @@ call $std/math/check ) (func $std/math/test_log (; 99 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.log local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/log local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_logf (; 100 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) local.get $0 @@ -5310,33 +5211,30 @@ (func $~lib/math/NativeMath.log10 (; 101 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 f64) - (local $6 i32) + (local $3 i64) + (local $4 f64) + (local $5 i32) + (local $6 f64) (local $7 f64) (local $8 f64) - (local $9 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -5349,7 +5247,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -5361,18 +5259,18 @@ return end i32.const -54 - local.set $6 + local.set $5 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -5380,28 +5278,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -5421,26 +5316,26 @@ local.get $1 f64.add f64.div + local.tee $6 + local.get $6 + f64.mul local.tee $7 local.get $7 f64.mul - local.tee $8 - local.get $8 - f64.mul local.set $0 local.get $2 i32.const 20 i32.shr_u i32.const 1023 i32.sub - local.get $6 + local.get $5 i32.add f64.convert_i32_s - local.tee $5 + local.tee $4 f64.const 0.30102999566361177 f64.mul - local.set $9 - local.get $5 + local.set $8 + local.get $4 f64.const 3.694239077158931e-13 f64.mul local.get $1 @@ -5456,13 +5351,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $5 + local.tee $4 f64.sub local.get $1 f64.sub - local.get $7 + local.get $6 local.get $1 - local.get $8 + local.get $7 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -5493,7 +5388,7 @@ f64.mul f64.add local.tee $0 - local.get $5 + local.get $4 f64.add f64.const 2.5082946711645275e-11 f64.mul @@ -5502,9 +5397,9 @@ f64.const 0.4342944818781689 f64.mul f64.add - local.get $9 - local.get $9 - local.get $5 + local.get $8 + local.get $8 + local.get $4 f64.const 0.4342944818781689 f64.mul local.tee $0 @@ -5518,46 +5413,41 @@ f64.add ) (func $std/math/test_log10 (; 102 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.log10 local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/log10 local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.log10 (; 103 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) (local $5 f32) (local $6 f32) (local $7 f32) - (local $8 f32) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 8388608 i32.lt_u - local.tee $2 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if local.get $1 i32.const 1 @@ -5583,7 +5473,7 @@ return end i32.const -25 - local.set $4 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -5609,7 +5499,7 @@ local.get $1 i32.const 4913933 i32.add - local.tee $2 + local.tee $1 i32.const 8388607 i32.and i32.const 1060439283 @@ -5622,22 +5512,22 @@ local.get $0 f32.add f32.div + local.tee $4 + local.get $4 + f32.mul local.tee $5 local.get $5 f32.mul - local.tee $6 - local.get $6 - f32.mul - local.set $3 - local.get $2 + local.set $2 + local.get $1 i32.const 23 i32.shr_u i32.const 127 i32.sub - local.get $4 + local.get $3 i32.add f32.convert_i32_s - local.tee $8 + local.tee $7 f32.const 7.903415166765626e-07 f32.mul local.get $0 @@ -5653,22 +5543,22 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $7 + local.tee $6 f32.sub local.get $0 f32.sub - local.get $5 + local.get $4 local.get $0 - local.get $6 + local.get $5 f32.const 0.6666666269302368 - local.get $3 + local.get $2 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $3 + local.get $2 f32.const 0.40000972151756287 - local.get $3 + local.get $2 f32.const 0.24279078841209412 f32.mul f32.add @@ -5678,7 +5568,7 @@ f32.mul f32.add local.tee $0 - local.get $7 + local.get $6 f32.add f32.const -3.168997136526741e-05 f32.mul @@ -5687,11 +5577,11 @@ f32.const 0.434326171875 f32.mul f32.add - local.get $7 + local.get $6 f32.const 0.434326171875 f32.mul f32.add - local.get $8 + local.get $7 f32.const 0.3010292053222656 f32.mul f32.add @@ -5704,22 +5594,20 @@ call $std/math/check ) (func $std/math/test_log1p (; 105 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.log1p local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/log1p local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_log1pf (; 106 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -5731,32 +5619,29 @@ (func $~lib/math/NativeMath.log2 (; 107 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 f64) (local $2 i32) - (local $3 i32) - (local $4 i64) + (local $3 i64) + (local $4 f64) (local $5 f64) - (local $6 f64) - (local $7 i32) - (local $8 f64) + (local $6 i32) + (local $7 f64) local.get $0 i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $3 + local.tee $2 i32.const 1048576 i32.lt_u - local.tee $2 - i32.eqz - if - local.get $3 + if (result i32) + i32.const 1 + else + local.get $2 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if - local.get $4 + local.get $3 i64.const 1 i64.shl i64.const 0 @@ -5769,7 +5654,7 @@ f64.div return end - local.get $3 + local.get $2 i32.const 31 i32.shr_u if @@ -5781,18 +5666,18 @@ return end i32.const -54 - local.set $7 + local.set $6 local.get $0 f64.const 18014398509481984 f64.mul i64.reinterpret_f64 - local.tee $4 + local.tee $3 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $3 + local.set $2 else - local.get $3 + local.get $2 i32.const 2146435072 i32.ge_u if @@ -5800,28 +5685,25 @@ return else local.get $3 + i64.const 32 + i64.shl + i64.const 0 + i64.eq + i32.const 0 + local.get $2 i32.const 1072693248 i32.eq - local.tee $2 - if - local.get $4 - i64.const 32 - i64.shl - i64.const 0 - i64.eq - local.set $2 - end - local.get $2 + select if f64.const 0 return end end end - local.get $4 + local.get $3 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i32.const 614242 i32.add local.tee $2 @@ -5841,12 +5723,12 @@ local.get $1 f64.add f64.div + local.tee $4 + local.get $4 + f64.mul local.tee $5 local.get $5 f64.mul - local.tee $6 - local.get $6 - f64.mul local.set $0 local.get $1 local.get $1 @@ -5861,13 +5743,13 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $8 + local.tee $7 f64.sub local.get $1 f64.sub - local.get $5 + local.get $4 local.get $1 - local.get $6 + local.get $5 f64.const 0.6666666666666735 local.get $0 f64.const 0.2857142874366239 @@ -5903,18 +5785,18 @@ i32.shr_u i32.const 1023 i32.sub - local.get $7 + local.get $6 i32.add f64.convert_i32_s - local.tee $5 - local.get $8 + local.tee $4 + local.get $7 f64.const 1.4426950407214463 f64.mul - local.tee $6 + local.tee $5 f64.add local.set $1 local.get $0 - local.get $8 + local.get $7 f64.add f64.const 1.6751713164886512e-10 f64.mul @@ -5922,55 +5804,50 @@ f64.const 1.4426950407214463 f64.mul f64.add - local.get $5 + local.get $4 local.get $1 f64.sub - local.get $6 + local.get $5 f64.add f64.add local.get $1 f64.add ) (func $std/math/test_log2 (; 108 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.log2 local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/log2 local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.log2 (; 109 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) + (local $2 f32) + (local $3 i32) + (local $4 f32) (local $5 f32) (local $6 f32) - (local $7 f32) local.get $0 i32.reinterpret_f32 local.tee $1 i32.const 8388608 i32.lt_u - local.tee $2 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 i32.const 31 i32.shr_u - local.set $2 end - local.get $2 if local.get $1 i32.const 1 @@ -5996,7 +5873,7 @@ return end i32.const -25 - local.set $4 + local.set $3 local.get $0 f32.const 33554432 f32.mul @@ -6022,7 +5899,7 @@ local.get $1 i32.const 4913933 i32.add - local.tee $2 + local.tee $1 i32.const 8388607 i32.and i32.const 1060439283 @@ -6035,13 +5912,13 @@ local.get $0 f32.add f32.div + local.tee $4 + local.get $4 + f32.mul local.tee $5 local.get $5 f32.mul - local.tee $6 - local.get $6 - f32.mul - local.set $3 + local.set $2 local.get $0 local.get $0 f32.const 0.5 @@ -6055,22 +5932,22 @@ i32.const -4096 i32.and f32.reinterpret_i32 - local.tee $7 + local.tee $6 f32.sub local.get $0 f32.sub - local.get $5 + local.get $4 local.get $0 - local.get $6 + local.get $5 f32.const 0.6666666269302368 - local.get $3 + local.get $2 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.get $3 + local.get $2 f32.const 0.40000972151756287 - local.get $3 + local.get $2 f32.const 0.24279078841209412 f32.mul f32.add @@ -6080,7 +5957,7 @@ f32.mul f32.add local.tee $0 - local.get $7 + local.get $6 f32.add f32.const -1.7605285393074155e-04 f32.mul @@ -6088,16 +5965,16 @@ f32.const 1.44287109375 f32.mul f32.add - local.get $7 + local.get $6 f32.const 1.44287109375 f32.mul f32.add - local.get $2 + local.get $1 i32.const 23 i32.shr_u i32.const 127 i32.sub - local.get $4 + local.get $3 i32.add f32.convert_i32_s f32.add @@ -6110,24 +5987,22 @@ call $std/math/check ) (func $std/math/test_max (; 111 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 f64.max local.get $2 f64.const 0 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/max local.get $2 f64.const 0 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_maxf (; 112 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -6138,24 +6013,22 @@ call $std/math/check ) (func $std/math/test_min (; 113 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 f64.min local.get $2 f64.const 0 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/min local.get $2 f64.const 0 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_minf (; 114 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -6170,10 +6043,9 @@ (local $3 i64) (local $4 i64) (local $5 i64) - (local $6 i32) + (local $6 i64) (local $7 i64) (local $8 i64) - (local $9 i64) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -6193,30 +6065,27 @@ local.get $2 i64.const 63 i64.shr_u - local.set $8 + local.set $7 local.get $3 i64.const 1 i64.shl - local.tee $7 + local.tee $6 i64.const 0 i64.eq - local.tee $6 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $4 i64.const 2047 i64.eq - local.set $6 end - local.get $6 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 local.get $1 f64.ne - local.set $6 end - local.get $6 if local.get $0 local.get $1 @@ -6230,12 +6099,12 @@ local.get $2 i64.const 1 i64.shl - local.tee $9 - local.get $7 + local.tee $8 + local.get $6 i64.le_u if - local.get $7 - local.get $9 + local.get $6 + local.get $8 i64.eq br_if $folding-inner0 local.get $0 @@ -6297,7 +6166,7 @@ local.get $2 local.get $3 i64.ge_u - if (result i64) + if local.get $2 local.get $3 i64.eq @@ -6305,9 +6174,9 @@ local.get $2 local.get $3 i64.sub - else - local.get $2 + local.set $2 end + local.get $2 i64.const 1 i64.shl local.set $2 @@ -6342,27 +6211,27 @@ local.get $4 local.get $3 i64.sub - local.tee $4 + local.tee $3 i64.const 0 i64.gt_s if (result i64) local.get $2 i64.const 4503599627370496 i64.sub - local.get $4 + local.get $3 i64.const 52 i64.shl i64.or else local.get $2 i64.const 0 - local.get $4 + local.get $3 i64.sub i64.const 1 i64.add i64.shr_u end - local.get $8 + local.get $7 i64.const 63 i64.shl i64.or @@ -6374,14 +6243,12 @@ f64.mul ) (func $std/math/test_mod (; 116 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod local.get $2 f64.const 0 call $std/math/check - local.tee $3 if (result i32) local.get $0 local.get $1 @@ -6390,7 +6257,7 @@ f64.const 0 call $std/math/check else - local.get $3 + i32.const 0 end ) (func $~lib/math/NativeMathf.mod (; 117 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -6403,7 +6270,7 @@ (local $8 i32) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 23 i32.shr_u i32.const 255 @@ -6411,38 +6278,34 @@ local.set $4 local.get $1 i32.reinterpret_f32 - local.tee $5 + local.tee $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $6 - local.get $3 + local.set $5 + local.get $2 i32.const -2147483648 i32.and - local.set $8 - local.get $5 + local.set $7 + local.get $3 i32.const 1 i32.shl - local.tee $7 - i32.eqz - local.tee $2 - i32.eqz - if + local.tee $6 + if (result i32) local.get $4 i32.const 255 i32.eq - local.set $2 + else + i32.const 1 end - local.get $2 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 local.get $1 f32.ne - local.set $2 end - local.get $2 if local.get $0 local.get $1 @@ -6453,15 +6316,15 @@ return end block $folding-inner0 - local.get $3 + local.get $2 i32.const 1 i32.shl - local.tee $2 - local.get $7 + local.tee $8 + local.get $6 i32.le_u if - local.get $2 - local.get $7 + local.get $6 + local.get $8 i32.eq br_if $folding-inner0 local.get $0 @@ -6469,16 +6332,16 @@ end local.get $4 if (result i32) - local.get $3 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $3 + local.get $2 i32.const 1 local.get $4 - local.get $3 + local.get $2 i32.const 9 i32.shl i32.clz @@ -6488,36 +6351,36 @@ i32.shl end local.set $2 - local.get $6 + local.get $5 if (result i32) - local.get $5 + local.get $3 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $5 + local.get $3 i32.const 1 - local.get $6 local.get $5 + local.get $3 i32.const 9 i32.shl i32.clz i32.sub - local.tee $6 + local.tee $5 i32.sub i32.shl end local.set $3 loop $continue|0 local.get $4 - local.get $6 + local.get $5 i32.gt_s if local.get $2 local.get $3 i32.ge_u - if (result i32) + if local.get $2 local.get $3 i32.eq @@ -6525,9 +6388,9 @@ local.get $2 local.get $3 i32.sub - else - local.get $2 + local.set $2 end + local.get $2 i32.const 1 i32.shl local.set $2 @@ -6562,25 +6425,25 @@ local.get $4 local.get $3 i32.sub - local.tee $4 + local.tee $3 i32.const 0 i32.gt_s if (result i32) local.get $2 i32.const 8388608 i32.sub - local.get $4 + local.get $3 i32.const 23 i32.shl i32.or else local.get $2 i32.const 1 - local.get $4 + local.get $3 i32.sub i32.shr_u end - local.get $8 + local.get $7 i32.or f32.reinterpret_i32 return @@ -6598,9 +6461,9 @@ call $std/math/check ) (func $~lib/math/NativeMath.pow (; 119 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 f64) @@ -6629,7 +6492,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $16 @@ -6650,46 +6513,38 @@ f64.const 1 return end - local.get $5 + i32.const 1 + local.get $8 i32.const 2146435072 i32.gt_s - local.tee $2 - i32.eqz - if - local.get $5 + local.get $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else + local.get $19 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $19 - i32.const 0 - i32.ne - local.set $2 - end - end - local.get $2 - i32.eqz - if - local.get $8 - i32.const 2146435072 - i32.gt_s - local.set $2 + select end - local.get $2 - i32.eqz - if + select + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 0 + i32.ne + i32.const 0 local.get $8 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $6 - i32.const 0 - i32.ne - local.set $2 - end + select end - local.get $2 if local.get $0 local.get $1 @@ -6722,8 +6577,8 @@ i32.gt_s local.tee $13 select - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 i32.const 52 i32.const 20 local.get $13 @@ -6732,13 +6587,13 @@ i32.sub local.tee $13 i32.shr_s - local.tee $2 + local.tee $5 local.get $13 i32.shl i32.eq if (result i32) i32.const 2 - local.get $2 + local.get $5 i32.const 1 i32.and i32.sub @@ -6758,13 +6613,13 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $19 i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -6835,66 +6690,58 @@ end local.get $0 f64.abs - local.set $4 + local.set $3 local.get $19 i32.eqz if - local.get $5 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $5 - i32.const 2146435072 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz - if - local.get $5 - i32.const 1072693248 - i32.eq - local.set $2 - end - local.get $2 + i32.const 1 + local.get $4 + i32.const 1072693248 + i32.eq + local.get $4 + i32.const 2146435072 + i32.eq + i32.const 1 + local.get $4 + select + select if f64.const 1 - local.get $4 + local.get $3 f64.div - local.get $4 + local.get $3 local.get $9 i32.const 0 i32.lt_s select - local.set $4 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $11 i32.or if (result f64) - local.get $4 + local.get $3 f64.neg - local.get $4 + local.get $3 local.get $11 i32.const 1 i32.eq select else - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $4 + local.get $3 end return end @@ -6932,7 +6779,7 @@ i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if @@ -6944,7 +6791,7 @@ select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -6957,7 +6804,7 @@ return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if @@ -6979,7 +6826,7 @@ end return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if @@ -7001,16 +6848,16 @@ end return end - local.get $4 + local.get $3 f64.const 1 f64.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul f64.const 0.5 - local.get $3 + local.get $2 f64.const 0.3333333333333333 - local.get $3 + local.get $2 f64.const 0.25 f64.mul f64.sub @@ -7019,10 +6866,10 @@ f64.mul local.set $0 f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 f64.const 1.9259629911266175e-08 f64.mul local.get $0 @@ -7038,50 +6885,50 @@ local.set $10 local.get $0 local.get $10 - local.get $4 + local.get $3 f64.sub f64.sub else i32.const 0 local.set $6 - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $4 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $4 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -7091,38 +6938,38 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $4 + local.set $5 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl i64.or f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select local.tee $0 f64.sub local.tee $10 f64.const 1 - local.get $4 + local.get $3 local.get $0 f64.add f64.div - local.tee $3 + local.tee $2 f64.mul local.tee $18 i64.reinterpret_f64 @@ -7130,15 +6977,15 @@ i64.and f64.reinterpret_i64 local.set $14 + local.get $3 local.get $4 - local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -7146,7 +6993,7 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $4 + local.tee $3 local.get $0 f64.sub f64.sub @@ -7187,10 +7034,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $2 local.get $10 local.get $14 - local.get $4 + local.get $3 f64.mul f64.sub local.get $14 @@ -7198,7 +7045,7 @@ f64.mul f64.sub f64.mul - local.tee $3 + local.tee $2 local.get $14 local.get $18 f64.add @@ -7212,8 +7059,8 @@ f64.reinterpret_i64 local.tee $10 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 local.get $10 f64.mul local.get $0 @@ -7232,15 +7079,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $2 f64.mul local.tee $20 f64.const -7.028461650952758e-09 - local.get $3 + local.get $2 f64.mul local.get $0 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub f64.const 0.9617966939259756 @@ -7248,16 +7095,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $3 + local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $4 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -7268,17 +7115,17 @@ i64.and f64.reinterpret_i64 local.set $10 - local.get $3 + local.get $2 local.get $10 local.get $0 f64.sub - local.get $4 + local.get $3 f64.sub local.get $20 f64.sub f64.sub end - local.set $4 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -7290,20 +7137,20 @@ local.get $10 f64.mul local.get $1 - local.get $4 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $10 f64.mul - local.tee $3 + local.tee $2 f64.add local.tee $0 i64.reinterpret_f64 local.tee $16 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $16 @@ -7317,14 +7164,14 @@ local.get $12 i32.const 1083179008 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner0 local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $2 f64.sub f64.gt br_if $folding-inner0 @@ -7338,12 +7185,12 @@ local.get $12 i32.const -1064252416 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner1 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.le br_if $folding-inner1 @@ -7357,7 +7204,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $13 @@ -7365,7 +7212,7 @@ i32.gt_s if i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -7378,9 +7225,9 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 1048575 - local.get $2 + local.get $5 i32.shr_s i32.const -1 i32.xor @@ -7397,7 +7244,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.set $6 @@ -7410,13 +7257,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $2 local.get $0 f64.sub - local.set $3 + local.set $2 end local.get $1 - local.get $3 + local.get $2 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -7425,10 +7272,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $4 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.6931471805599453 @@ -7439,14 +7286,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul local.set $0 local.get $7 f64.const 1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -7474,17 +7321,17 @@ f64.sub f64.div local.get $1 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $2 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 @@ -7496,7 +7343,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -7510,7 +7357,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -7534,24 +7381,22 @@ f64.mul ) (func $std/math/test_pow (; 120 ;) (type $FUNCSIG$idddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) - (local $4 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow local.get $2 local.get $3 call $std/math/check - local.tee $4 - if + if (result i32) local.get $0 local.get $1 call $~lib/bindings/Math/pow local.get $2 local.get $3 call $std/math/check - local.set $4 + else + i32.const 0 end - local.get $4 ) (func $~lib/math/NativeMathf.pow (; 121 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 f32) @@ -7574,7 +7419,7 @@ local.tee $8 i32.const 2147483647 i32.and - local.set $6 + local.set $5 local.get $1 i32.reinterpret_f32 local.tee $11 @@ -7586,18 +7431,14 @@ f32.const 1 return end - local.get $6 + i32.const 1 + local.get $10 i32.const 2139095040 i32.gt_s - local.tee $4 - i32.eqz - if - local.get $10 - i32.const 2139095040 - i32.gt_s - local.set $4 - end - local.get $4 + local.get $5 + i32.const 2139095040 + i32.gt_s + select if local.get $0 local.get $1 @@ -7626,14 +7467,14 @@ i32.sub local.tee $12 i32.shr_s - local.tee $4 + local.tee $6 local.get $12 i32.shl local.get $10 i32.eq if (result i32) i32.const 2 - local.get $4 + local.get $6 i32.const 1 i32.and i32.sub @@ -7644,20 +7485,20 @@ i32.const 0 end end - local.set $5 + local.set $4 end local.get $10 i32.const 2139095040 i32.eq if - local.get $6 + local.get $5 i32.const 1065353216 i32.eq if f32.const nan:0x400000 return else - local.get $6 + local.get $5 i32.const 1065353216 i32.gt_s if @@ -7725,25 +7566,18 @@ local.get $0 f32.abs local.set $3 - local.get $6 - i32.const 2139095040 + i32.const 1 + local.get $5 + i32.const 1065353216 i32.eq - local.tee $4 - i32.eqz - if - local.get $6 - i32.eqz - local.set $4 - end - local.get $4 + i32.const 1 + local.get $5 i32.eqz - if - local.get $6 - i32.const 1065353216 - i32.eq - local.set $4 - end - local.get $4 + local.get $5 + i32.const 2139095040 + i32.eq + select + select if f32.const 1 local.get $3 @@ -7758,16 +7592,16 @@ i32.const 0 i32.lt_s if (result f32) - local.get $6 + local.get $5 i32.const 1065353216 i32.sub - local.get $5 + local.get $4 i32.or if (result f32) local.get $3 f32.neg local.get $3 - local.get $5 + local.get $4 i32.const 1 i32.eq select @@ -7790,7 +7624,7 @@ i32.const 0 i32.lt_s if - local.get $5 + local.get $4 i32.eqz if local.get $0 @@ -7803,7 +7637,7 @@ end f32.const -1 f32.const 1 - local.get $5 + local.get $4 i32.const 1 i32.eq select @@ -7813,7 +7647,7 @@ i32.const 1291845632 i32.gt_s if (result f32) - local.get $6 + local.get $5 i32.const 1065353208 i32.lt_s if @@ -7835,7 +7669,7 @@ end return end - local.get $6 + local.get $5 i32.const 1065353223 i32.gt_s if @@ -7899,8 +7733,8 @@ f32.sub else i32.const 0 - local.set $5 - local.get $6 + local.set $4 + local.get $5 i32.const 8388608 i32.lt_s if (result i32) @@ -7908,55 +7742,55 @@ f32.const 16777216 f32.mul i32.reinterpret_f32 - local.set $6 + local.set $5 i32.const -24 else i32.const 0 end - local.get $6 + local.get $5 i32.const 23 i32.shr_s i32.const 127 i32.sub i32.add - local.set $5 - local.get $6 + local.set $4 + local.get $5 i32.const 8388607 i32.and - local.tee $4 + local.tee $6 i32.const 1065353216 i32.or - local.set $6 - local.get $4 + local.set $5 + local.get $6 i32.const 1885297 i32.le_s if (result i32) i32.const 0 else - local.get $4 + local.get $6 i32.const 6140887 i32.lt_s if (result i32) i32.const 1 else - local.get $5 + local.get $4 i32.const 1 i32.add - local.set $5 - local.get $6 + local.set $4 + local.get $5 i32.const 8388608 i32.sub - local.set $6 + local.set $5 i32.const 0 end end - local.set $4 - local.get $6 + local.set $6 + local.get $5 f32.reinterpret_i32 local.tee $3 f32.const 1.5 f32.const 1 - local.get $4 + local.get $6 select local.tee $0 f32.sub @@ -7975,7 +7809,7 @@ f32.reinterpret_i32 local.set $13 local.get $3 - local.get $6 + local.get $5 i32.const 1 i32.shr_s i32.const -4096 @@ -7984,7 +7818,7 @@ i32.or i32.const 4194304 i32.add - local.get $4 + local.get $6 i32.const 21 i32.shl i32.add @@ -8091,18 +7925,18 @@ f32.add f32.const 1.5632208487659227e-06 f32.const 0 - local.get $4 + local.get $6 select f32.add local.tee $2 f32.add f32.const 0.5849609375 f32.const 0 - local.get $4 + local.get $6 select local.tee $3 f32.add - local.get $5 + local.get $4 f32.convert_i32_s local.tee $0 f32.add @@ -8192,15 +8026,15 @@ i32.shr_s i32.const 127 i32.sub - local.set $4 + local.set $6 i32.const 0 - local.set $5 + local.set $4 local.get $12 i32.const 1056964608 i32.gt_s if i32.const 8388608 - local.get $4 + local.get $6 i32.const 1 i32.add i32.shr_s @@ -8213,9 +8047,9 @@ i32.shr_s i32.const 127 i32.sub - local.set $4 + local.set $6 i32.const 8388607 - local.get $4 + local.get $6 i32.shr_s i32.const -1 i32.xor @@ -8229,19 +8063,19 @@ i32.const 8388608 i32.or i32.const 23 - local.get $4 + local.get $6 i32.sub i32.shr_s - local.set $5 + local.set $4 i32.const 0 - local.get $5 + local.get $4 i32.sub - local.get $5 + local.get $4 local.get $8 i32.const 0 i32.lt_s select - local.set $5 + local.set $4 local.get $2 local.get $0 f32.sub @@ -8321,21 +8155,21 @@ f32.sub local.tee $0 i32.reinterpret_f32 - local.get $5 + local.get $4 i32.const 23 i32.shl i32.add - local.tee $4 + local.tee $6 i32.const 23 i32.shr_s i32.const 0 i32.le_s if (result f32) local.get $0 - local.get $5 + local.get $4 call $~lib/math/NativeMathf.scalbn else - local.get $4 + local.get $6 f32.reinterpret_i32 end f32.mul @@ -8400,10 +8234,10 @@ i64.eqz if i32.const 0 - i32.const 112 - i32.const 978 + i32.const 144 + i32.const 1021 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -8466,10 +8300,10 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 987 + i32.const 144 + i32.const 1030 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_64 @@ -8513,10 +8347,10 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 2219 + i32.const 144 + i32.const 2312 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_32 @@ -8576,7 +8410,6 @@ ) (func $std/math/test_sign (; 129 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 f64) - (local $3 i32) local.get $0 local.set $2 f64.const 1 @@ -8593,16 +8426,15 @@ local.get $1 f64.const 0 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/sign local.get $1 f64.const 0 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_signf (; 130 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) f32.const 1 @@ -8624,19 +8456,10 @@ (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i32) - (local $6 i64) - (local $7 i32) - (local $8 f64) - (local $9 i32) - local.get $0 - i64.reinterpret_f64 - local.tee $2 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $3 + (local $5 i64) + (local $6 i32) + (local $7 f64) + (local $8 i32) local.get $1 i64.reinterpret_f64 local.tee $4 @@ -8644,35 +8467,35 @@ i64.shr_u i64.const 2047 i64.and - local.set $6 - local.get $2 + local.set $5 + local.get $0 + i64.reinterpret_f64 + local.tee $2 i64.const 63 i64.shr_u i32.wrap_i64 - local.set $9 - block (result i32) - local.get $4 - i64.const 1 - i64.shl - i64.const 0 - i64.eq - local.tee $5 - i32.eqz - if - local.get $3 - i64.const 2047 - i64.eq - local.set $5 - end - local.get $5 - i32.eqz - end + local.set $8 + i32.const 1 + local.get $2 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $3 + i64.const 2047 + i64.eq + local.get $4 + i64.const 1 + i64.shl + i64.const 0 + i64.eq + select if (result i32) + i32.const 1 + else local.get $1 local.get $1 f64.ne - else - local.get $5 end if local.get $0 @@ -8716,18 +8539,18 @@ i64.or end local.set $2 - local.get $6 + local.get $5 i64.eqz if (result i64) local.get $4 i64.const 0 - local.get $6 + local.get $5 local.get $4 i64.const 12 i64.shl i64.clz i64.sub - local.tee $6 + local.tee $5 i64.sub i64.const 1 i64.add @@ -8742,13 +8565,13 @@ local.set $4 block $break|0 local.get $3 - local.get $6 + local.get $5 i64.lt_s if local.get $3 i64.const 1 i64.add - local.get $6 + local.get $5 i64.eq br_if $break|0 local.get $0 @@ -8756,30 +8579,30 @@ end loop $continue|1 local.get $3 - local.get $6 + local.get $5 i64.gt_s if local.get $2 local.get $4 i64.ge_u if - local.get $7 - i32.const 1 - i32.add - local.set $7 local.get $2 local.get $4 i64.sub local.set $2 + local.get $6 + i32.const 1 + i32.add + local.set $6 end local.get $2 i64.const 1 i64.shl local.set $2 - local.get $7 + local.get $6 i32.const 1 i32.shl - local.set $7 + local.set $6 local.get $3 i64.const 1 i64.sub @@ -8787,24 +8610,22 @@ br $continue|1 end end - block (result i32) + local.get $2 + local.get $4 + i64.ge_u + if local.get $2 local.get $4 - i64.ge_u - if - local.get $7 - i32.const 1 - i32.add - local.set $7 - local.get $2 - local.get $4 - i64.sub - local.set $2 - end - local.get $2 - i64.const 0 - i64.eq + i64.sub + local.set $2 + local.get $6 + i32.const 1 + i32.add + local.set $6 end + local.get $2 + i64.const 0 + i64.eq if i64.const -60 local.set $3 @@ -8825,7 +8646,7 @@ end local.get $1 f64.abs - local.set $0 + local.set $1 local.get $3 i64.const 0 i64.gt_s @@ -8847,49 +8668,43 @@ i64.shr_u end f64.reinterpret_i64 - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f64.add - local.set $8 - local.get $1 + local.set $7 local.get $0 - f64.sub local.get $1 + f64.sub + local.get $0 local.get $3 - local.get $6 + local.get $5 i64.eq - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $3 i64.const 1 i64.add - local.get $6 + local.get $5 i64.eq - local.tee $5 if (result i32) - local.get $8 - local.get $0 + local.get $7 + local.get $1 f64.gt - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else - local.get $8 - local.get $0 + local.get $6 + i32.const 1 + i32.and + i32.const 0 + local.get $7 + local.get $1 f64.eq - local.tee $5 - if (result i32) - local.get $7 - i32.const 1 - i32.and - else - local.get $5 - end + select end else - local.get $5 + i32.const 0 end end select @@ -8897,7 +8712,7 @@ local.get $0 f64.neg local.get $0 - local.get $9 + local.get $8 select ) (func $std/math/test_rem (; 132 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) @@ -8916,48 +8731,39 @@ (local $6 i32) (local $7 f32) (local $8 i32) - local.get $0 + local.get $1 i32.reinterpret_f32 local.tee $4 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $3 - local.get $1 + local.set $5 + local.get $0 i32.reinterpret_f32 - local.tee $5 + local.tee $2 + i32.const 31 + i32.shr_u + local.set $8 + local.get $2 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $6 + local.tee $3 + i32.const 255 + i32.eq + i32.const 1 local.get $4 - i32.const 31 - i32.shr_u - local.set $8 - block (result i32) - local.get $5 - i32.const 1 - i32.shl - i32.eqz - local.tee $2 - i32.eqz - if - local.get $3 - i32.const 255 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz - end + i32.const 1 + i32.shl + select if (result i32) + i32.const 1 + else local.get $1 local.get $1 f32.ne - else - local.get $2 end if local.get $0 @@ -8968,7 +8774,7 @@ f32.div return end - local.get $4 + local.get $2 i32.const 1 i32.shl i32.eqz @@ -8978,16 +8784,16 @@ end local.get $3 if (result i32) - local.get $4 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $4 + local.get $2 i32.const 1 local.get $3 - local.get $4 + local.get $2 i32.const 9 i32.shl i32.clz @@ -8997,38 +8803,36 @@ i32.shl end local.set $2 - local.get $6 + local.get $5 if (result i32) - local.get $5 + local.get $4 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $5 + local.get $4 i32.const 1 - local.get $6 local.get $5 + local.get $4 i32.const 9 i32.shl i32.clz i32.sub - local.tee $6 + local.tee $5 i32.sub i32.shl end local.set $4 - i32.const 0 - local.set $5 block $break|0 local.get $3 - local.get $6 + local.get $5 i32.lt_s if local.get $3 i32.const 1 i32.add - local.get $6 + local.get $5 i32.eq br_if $break|0 local.get $0 @@ -9036,30 +8840,30 @@ end loop $continue|1 local.get $3 - local.get $6 + local.get $5 i32.gt_s if local.get $2 local.get $4 i32.ge_u - if (result i32) - local.get $5 + if + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 local.get $2 local.get $4 i32.sub - else - local.get $2 + local.set $2 end + local.get $2 i32.const 1 i32.shl local.set $2 - local.get $5 + local.get $6 i32.const 1 i32.shl - local.set $5 + local.set $6 local.get $3 i32.const 1 i32.sub @@ -9072,18 +8876,22 @@ local.get $4 i32.ge_u if - local.get $5 + local.get $6 i32.const 1 i32.add - local.set $5 + local.set $6 local.get $2 local.get $4 i32.sub local.set $2 end local.get $2 + i32.eqz end if + i32.const -30 + local.set $3 + else local.get $3 local.get $2 i32.const 8 @@ -9096,14 +8904,11 @@ local.get $4 i32.shl local.set $2 - else - i32.const -30 - local.set $3 end end local.get $1 f32.abs - local.set $0 + local.set $1 local.get $3 i32.const 0 i32.gt_s @@ -9123,49 +8928,43 @@ i32.shr_u end f32.reinterpret_i32 - local.tee $1 - local.get $1 + local.tee $0 + local.get $0 f32.add local.set $7 - local.get $1 local.get $0 - f32.sub local.get $1 + f32.sub + local.get $0 local.get $3 - local.get $6 + local.get $5 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $3 i32.const 1 i32.add - local.get $6 + local.get $5 i32.eq - local.tee $2 if (result i32) local.get $7 - local.get $0 + local.get $1 f32.gt - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else + local.get $6 + i32.const 1 + i32.and + i32.const 0 local.get $7 - local.get $0 + local.get $1 f32.eq - local.tee $2 - if (result i32) - local.get $5 - i32.const 1 - i32.and - else - local.get $2 - end + select end else - local.get $2 + i32.const 0 end end select @@ -9478,7 +9277,7 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.1 end - i32.const 104 + i32.const 116 i32.load local.get $3 i32.const 23 @@ -9492,9 +9291,9 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $10 - i32.const 104 + i32.const 116 i32.load local.get $9 i32.const 1 @@ -9502,7 +9301,7 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $4 local.get $6 i32.const 63 @@ -9517,7 +9316,7 @@ i32.sub i64.extend_i32_s i64.shl - i32.const 104 + i32.const 116 i32.load local.get $9 i32.const 2 @@ -9525,7 +9324,7 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load i64.const 96 local.get $6 i64.extend_i32_s @@ -9774,22 +9573,20 @@ f64.mul ) (func $std/math/test_sinh (; 138 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.sinh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/sinh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.sinh (; 139 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -9871,22 +9668,20 @@ call $std/math/check ) (func $std/math/test_sqrt (; 141 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 f64.sqrt local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/sqrt local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $std/math/test_sqrtf (; 142 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32) local.get $0 @@ -10071,7 +9866,7 @@ i32.trunc_f64_s br $~lib/math/rempio2f|inlined.2 end - i32.const 104 + i32.const 116 i32.load local.get $4 i32.const 23 @@ -10085,9 +9880,9 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $10 - i32.const 104 + i32.const 116 i32.load local.get $9 i32.const 1 @@ -10095,7 +9890,7 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load local.set $5 local.get $6 i32.const 63 @@ -10110,7 +9905,7 @@ i32.sub i64.extend_i32_s i64.shl - i32.const 104 + i32.const 116 i32.load local.get $9 i32.const 2 @@ -10118,7 +9913,7 @@ i32.const 3 i32.shl i32.add - i64.load offset=8 + i64.load i64.const 96 local.get $6 i64.extend_i32_s @@ -10390,22 +10185,20 @@ f64.copysign ) (func $std/math/test_tanh (; 146 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 call $~lib/math/NativeMath.tanh local.get $1 local.get $2 call $std/math/check - local.tee $3 - if + if (result i32) local.get $0 call $~lib/bindings/Math/tanh local.get $1 local.get $2 call $std/math/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.tanh (; 147 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) @@ -10489,13 +10282,11 @@ call $std/math/check ) (func $std/math/test_trunc (; 149 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) - (local $2 i32) local.get $0 f64.trunc local.get $1 f64.const 0 call $std/math/check - local.tee $2 if (result i32) local.get $0 call $~lib/bindings/Math/trunc @@ -10503,7 +10294,7 @@ f64.const 0 call $std/math/check else - local.get $2 + i32.const 0 end ) (func $std/math/test_truncf (; 150 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) @@ -10858,7 +10649,6 @@ (local $0 f64) (local $1 f32) (local $2 i32) - (local $3 i32) f64.const 2.718281828459045 global.get $~lib/bindings/Math/E f64.const 0 @@ -10866,10 +10656,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6931471805599453 @@ -10879,10 +10669,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.302585092994046 @@ -10892,10 +10682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.4426950408889634 @@ -10905,10 +10695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.141592653589793 @@ -10918,10 +10708,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7071067811865476 @@ -10931,10 +10721,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.4142135623730951 @@ -10944,10 +10734,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.7182817459106445 @@ -10958,10 +10748,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6931471824645996 @@ -10972,10 +10762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3025851249694824 @@ -10986,10 +10776,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4426950216293335 @@ -11000,10 +10790,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.1415927410125732 @@ -11014,10 +10804,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7071067690849304 @@ -11028,10 +10818,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4142135381698608 @@ -11042,10 +10832,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -11055,10 +10845,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -11068,10 +10858,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -11081,10 +10871,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -11094,10 +10884,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -11107,10 +10897,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -11120,10 +10910,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -11133,10 +10923,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -11146,10 +10936,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -11159,10 +10949,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -11172,10 +10962,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -11185,10 +10975,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -11198,10 +10988,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -11211,10 +11001,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -11224,10 +11014,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -11237,10 +11027,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -11250,10 +11040,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11263,10 +11053,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11276,10 +11066,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11289,10 +11079,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11302,10 +11092,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -11315,10 +11105,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -11328,10 +11118,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -11341,10 +11131,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -11354,10 +11144,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8988465674311579538646525e283 @@ -11367,10 +11157,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -11380,10 +11170,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.000244140625 @@ -11393,10 +11183,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7499999999999999 @@ -11406,10 +11196,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5000000000000012 @@ -11419,10 +11209,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -11432,10 +11222,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -11445,10 +11235,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -11458,10 +11248,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -11471,10 +11261,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -11484,10 +11274,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 176 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -11497,10 +11287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -11510,10 +11300,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 178 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -11523,10 +11313,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -11536,10 +11326,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -11549,10 +11339,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -11562,10 +11352,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -11575,10 +11365,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -11588,10 +11378,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -11601,10 +11391,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -11614,10 +11404,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -11627,10 +11417,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -11640,10 +11430,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -11653,10 +11443,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -11666,10 +11456,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -11679,10 +11469,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -11692,10 +11482,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -11705,10 +11495,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -11718,10 +11508,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -11731,10 +11521,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1701411834604692317316873e14 @@ -11744,10 +11534,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -11757,10 +11547,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.000244140625 @@ -11770,10 +11560,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7499999403953552 @@ -11783,10 +11573,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5000006556510925 @@ -11796,10 +11586,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -11808,10 +11598,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -11820,10 +11610,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -11832,10 +11622,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -11844,10 +11634,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -11856,10 +11646,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -11868,10 +11658,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -11880,10 +11670,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -11892,10 +11682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -11904,10 +11694,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -11916,10 +11706,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -11928,10 +11718,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -11940,10 +11730,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -11952,10 +11742,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -11964,10 +11754,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -11976,10 +11766,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -11988,10 +11778,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -12000,10 +11790,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -12012,10 +11802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -12024,10 +11814,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -12036,10 +11826,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -12048,10 +11838,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -12060,10 +11850,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -12072,10 +11862,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -12084,10 +11874,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -12096,10 +11886,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -12108,10 +11898,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -12120,10 +11910,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -12132,10 +11922,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 253 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -12144,10 +11934,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -12156,10 +11946,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -12168,10 +11958,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -12180,10 +11970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -12192,10 +11982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -12204,10 +11994,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -12217,10 +12007,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -12230,10 +12020,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -12243,10 +12033,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -12256,10 +12046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -12269,10 +12059,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -12282,10 +12072,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -12295,10 +12085,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -12308,10 +12098,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -12321,10 +12111,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -12334,10 +12124,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -12347,10 +12137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -12360,10 +12150,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -12373,10 +12163,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -12386,10 +12176,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000000000000002 @@ -12399,10 +12189,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -12412,10 +12202,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -12425,10 +12215,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -12438,10 +12228,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5309227209592985 @@ -12451,10 +12241,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.4939556746399746 @@ -12464,10 +12254,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -12477,10 +12267,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -12490,10 +12280,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -12503,10 +12293,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 303 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -12516,10 +12306,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -12529,10 +12319,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -12542,10 +12332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -12555,10 +12345,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -12568,10 +12358,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -12581,10 +12371,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -12594,10 +12384,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -12607,10 +12397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -12620,10 +12410,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -12633,10 +12423,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -12646,10 +12436,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000001192092896 @@ -12659,10 +12449,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -12672,10 +12462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -12685,10 +12475,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -12698,10 +12488,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.49965065717697144 @@ -12711,10 +12501,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5051405429840088 @@ -12724,10 +12514,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5189794898033142 @@ -12737,10 +12527,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -12750,10 +12540,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -12763,10 +12553,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -12776,10 +12566,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -12789,10 +12579,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -12802,10 +12592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -12815,10 +12605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -12828,10 +12618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -12841,10 +12631,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -12854,10 +12644,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -12867,10 +12657,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -12880,10 +12670,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -12893,10 +12683,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -12906,10 +12696,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -12919,10 +12709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 350 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -12932,10 +12722,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 351 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -12945,10 +12735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 352 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -12958,10 +12748,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 353 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1060831199926429 @@ -12971,10 +12761,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1089809557628658 @@ -12984,10 +12774,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1169429159875521 @@ -12997,10 +12787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -13010,10 +12800,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -13023,10 +12813,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -13036,10 +12826,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -13049,10 +12839,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -13062,10 +12852,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -13075,10 +12865,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -13088,10 +12878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -13101,10 +12891,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -13114,10 +12904,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -13127,10 +12917,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -13140,10 +12930,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -13153,10 +12943,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -13166,10 +12956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -13179,10 +12969,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -13192,10 +12982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -13205,10 +12995,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -13218,10 +13008,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1125899906842624 @@ -13231,10 +13021,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -13244,10 +13034,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -13257,10 +13047,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -13270,10 +13060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -13283,10 +13073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -13296,10 +13086,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -13309,10 +13099,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -13322,10 +13112,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -13335,10 +13125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -13348,10 +13138,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -13361,10 +13151,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -13374,10 +13164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -13387,10 +13177,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -13400,10 +13190,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -13413,10 +13203,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -13426,10 +13216,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000000000000002 @@ -13439,10 +13229,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -13452,10 +13242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -13465,10 +13255,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -13478,10 +13268,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5073043929119148 @@ -13491,10 +13281,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -13504,10 +13294,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -13517,10 +13307,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -13530,10 +13320,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -13543,10 +13333,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -13556,10 +13346,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -13569,10 +13359,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -13582,10 +13372,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -13595,10 +13385,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -13608,10 +13398,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -13621,10 +13411,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -13634,10 +13424,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -13647,10 +13437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -13660,10 +13450,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -13673,10 +13463,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -13686,10 +13476,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000001192092896 @@ -13699,10 +13489,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 459 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -13712,10 +13502,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 460 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -13725,10 +13515,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 461 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -13738,10 +13528,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 462 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5004770159721375 @@ -13751,10 +13541,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 463 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -13764,10 +13554,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -13777,10 +13567,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -13790,10 +13580,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -13803,10 +13593,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -13816,10 +13606,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -13829,10 +13619,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -13842,10 +13632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -13855,10 +13645,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -13868,10 +13658,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -13881,10 +13671,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -13894,10 +13684,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -13907,10 +13697,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -13920,10 +13710,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -13933,10 +13723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -13946,10 +13736,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -13959,10 +13749,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -13972,10 +13762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -13985,10 +13775,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -13998,10 +13788,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14011,10 +13801,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -14024,10 +13814,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -14037,10 +13827,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -14050,10 +13840,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -14063,10 +13853,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -14076,10 +13866,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -14089,10 +13879,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14102,10 +13892,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 533 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -14115,10 +13905,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 534 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -14128,10 +13918,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 535 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -14141,10 +13931,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 536 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -14154,10 +13944,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -14167,10 +13957,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -14180,10 +13970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -14193,10 +13983,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -14206,10 +13996,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -14219,10 +14009,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -14232,10 +14022,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 554 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -14245,10 +14035,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 555 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -14258,10 +14048,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -14271,10 +14061,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -14284,10 +14074,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -14297,10 +14087,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14310,10 +14100,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -14323,10 +14113,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14336,10 +14126,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -14349,10 +14139,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14362,10 +14152,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6929821535674624 @@ -14375,10 +14165,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -14388,10 +14178,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 576 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -14401,10 +14191,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 577 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -14414,10 +14204,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 578 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -14427,10 +14217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 579 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14440,10 +14230,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 580 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -14453,10 +14243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 581 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -14466,10 +14256,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 582 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -14479,10 +14269,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 583 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -14492,10 +14282,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 584 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -14505,10 +14295,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -14518,10 +14308,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 588 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -14531,10 +14321,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 589 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14544,10 +14334,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 590 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -14557,10 +14347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 591 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14570,10 +14360,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 592 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -14583,10 +14373,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 593 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -14596,10 +14386,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 594 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -14609,10 +14399,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -14622,10 +14412,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -14635,10 +14425,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -14648,10 +14438,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -14661,10 +14451,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -14674,10 +14464,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 611 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -14687,10 +14477,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 612 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -14700,10 +14490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -14713,10 +14503,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 614 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -14726,10 +14516,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 615 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14739,10 +14529,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 618 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14752,10 +14542,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 619 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -14765,10 +14555,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 620 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -14778,10 +14568,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 621 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -14791,10 +14581,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 622 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14804,10 +14594,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 623 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -14817,10 +14607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 624 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -14830,10 +14620,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -14843,10 +14633,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.3552527156068805e-20 @@ -14856,10 +14646,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.332636185032189e-302 @@ -14869,10 +14659,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.562684646268003e-309 @@ -14882,10 +14672,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5.562684646268003e-309 @@ -14895,10 +14685,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 630 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8988465674311579538646525e283 @@ -14908,10 +14698,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 631 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -14921,10 +14711,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -14934,10 +14724,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -14947,10 +14737,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -14960,10 +14750,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14973,10 +14763,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -14986,10 +14776,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 645 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -14999,10 +14789,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 646 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -15012,10 +14802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 647 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -15025,10 +14815,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 648 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -15038,10 +14828,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 649 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -15051,10 +14841,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 652 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15064,10 +14854,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -15077,10 +14867,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15090,10 +14880,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -15103,10 +14893,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -15116,10 +14906,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -15129,10 +14919,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -15142,10 +14932,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -15155,10 +14945,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.3552527156068805e-20 @@ -15168,10 +14958,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 661 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -15181,10 +14971,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -15194,10 +14984,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -15207,10 +14997,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1701411834604692317316873e14 @@ -15220,10 +15010,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -15234,10 +15024,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -15248,10 +15038,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 678 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -15262,10 +15052,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -15276,10 +15066,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 680 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -15290,10 +15080,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 681 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -15304,10 +15094,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -15318,10 +15108,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -15332,10 +15122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -15346,10 +15136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -15360,10 +15150,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 686 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15374,10 +15164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 689 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15388,10 +15178,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 690 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15402,10 +15192,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 691 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15416,10 +15206,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 692 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15430,10 +15220,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15444,10 +15234,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15458,10 +15248,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15472,10 +15262,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15486,10 +15276,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15500,10 +15290,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15514,10 +15304,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15528,10 +15318,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15542,10 +15332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15556,10 +15346,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 702 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15570,10 +15360,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 703 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15584,10 +15374,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 704 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15598,10 +15388,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 705 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15612,10 +15402,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 706 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15626,10 +15416,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 707 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15640,10 +15430,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15654,10 +15444,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 709 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -15668,10 +15458,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15682,10 +15472,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15696,10 +15486,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -15710,10 +15500,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -15724,10 +15514,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1125369292536007e-308 @@ -15738,10 +15528,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 715 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15752,10 +15542,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 716 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -15766,10 +15556,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 717 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -15780,10 +15570,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 718 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -15794,10 +15584,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -15808,10 +15598,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 728 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -15822,10 +15612,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 729 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -15836,10 +15626,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 730 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -15850,10 +15640,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 731 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -15864,10 +15654,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 732 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -15878,10 +15668,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 733 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -15892,10 +15682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 734 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -15906,10 +15696,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 735 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -15920,10 +15710,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 736 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15934,10 +15724,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 739 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15948,10 +15738,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 740 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15962,10 +15752,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15976,10 +15766,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15990,10 +15780,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -16004,10 +15794,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16018,10 +15808,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16032,10 +15822,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16046,10 +15836,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16060,10 +15850,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 748 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16074,10 +15864,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 749 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16088,10 +15878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16102,10 +15892,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 751 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16116,10 +15906,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 752 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16130,10 +15920,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16144,10 +15934,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16158,10 +15948,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16172,10 +15962,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16186,10 +15976,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16200,10 +15990,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16214,10 +16004,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -16228,10 +16018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16242,10 +16032,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 761 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16256,10 +16046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 762 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -16270,10 +16060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 763 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -16284,10 +16074,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 764 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -16298,10 +16088,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 765 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16312,10 +16102,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 766 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -16325,10 +16115,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -16338,10 +16128,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 779 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -16351,10 +16141,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 780 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -16364,10 +16154,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -16377,10 +16167,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -16390,10 +16180,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -16403,10 +16193,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -16416,10 +16206,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -16429,10 +16219,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -16442,10 +16232,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -16455,10 +16245,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 790 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -16468,10 +16258,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 791 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -16481,10 +16271,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 792 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -16494,10 +16284,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 793 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -16507,10 +16297,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 794 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.313225746154785e-10 @@ -16520,10 +16310,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 795 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -9.313225746154785e-10 @@ -16533,10 +16323,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 796 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -16546,10 +16336,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 797 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -16559,10 +16349,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 798 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8 @@ -16572,10 +16362,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 799 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -16585,10 +16375,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -16598,10 +16388,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -16611,10 +16401,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -16624,10 +16414,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 811 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -16637,10 +16427,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 812 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -16650,10 +16440,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -16663,10 +16453,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -16676,10 +16466,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -16689,10 +16479,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -16702,10 +16492,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 817 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -16715,10 +16505,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 820 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16728,10 +16518,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 821 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -16741,10 +16531,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 822 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -16754,10 +16544,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 823 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16767,10 +16557,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 824 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.313225746154785e-10 @@ -16780,10 +16570,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 825 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -9.313225746154785e-10 @@ -16793,10 +16583,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 826 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16806,10 +16596,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 827 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16819,10 +16609,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 8 @@ -16832,10 +16622,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -16844,10 +16634,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -16856,10 +16646,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -16868,10 +16658,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -16880,10 +16670,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -16892,10 +16682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -16904,10 +16694,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -16916,10 +16706,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -16928,10 +16718,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -16940,10 +16730,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 849 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -16952,10 +16742,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 850 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -16964,10 +16754,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 853 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -16976,10 +16766,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 854 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -16988,10 +16778,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 855 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17000,10 +16790,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17012,10 +16802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 857 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17024,10 +16814,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 858 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17036,10 +16826,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -17048,10 +16838,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -17060,10 +16850,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -17072,10 +16862,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -17084,10 +16874,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -17096,10 +16886,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -17108,10 +16898,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -17120,10 +16910,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -17132,10 +16922,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17144,10 +16934,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17156,10 +16946,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -17168,10 +16958,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 870 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17180,10 +16970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17192,10 +16982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17204,10 +16994,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17216,10 +17006,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -17228,10 +17018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -17240,10 +17030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -17252,10 +17042,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -17264,10 +17054,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -17276,10 +17066,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -17288,10 +17078,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -17300,10 +17090,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -17312,10 +17102,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17324,10 +17114,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17336,10 +17126,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -17348,10 +17138,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17360,10 +17150,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17372,10 +17162,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17384,10 +17174,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17396,10 +17186,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -17408,10 +17198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -17420,10 +17210,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -17432,10 +17222,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -17444,10 +17234,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -17456,10 +17246,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -17468,10 +17258,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -17480,10 +17270,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -17492,10 +17282,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -17504,10 +17294,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 906 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -17516,10 +17306,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 907 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -17528,10 +17318,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 908 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -17540,10 +17330,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 909 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -17552,10 +17342,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 910 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -17564,10 +17354,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 911 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -17576,10 +17366,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 912 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -17588,10 +17378,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -17600,10 +17390,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -17612,10 +17402,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17624,10 +17414,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17636,10 +17426,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 919 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -17648,10 +17438,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -17660,10 +17450,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 921 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -17672,10 +17462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 922 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -17684,10 +17474,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 923 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -17696,10 +17486,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -17708,10 +17498,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -17720,10 +17510,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -17732,10 +17522,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -17744,10 +17534,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 928 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -17756,10 +17546,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -17768,10 +17558,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 930 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -17780,10 +17570,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 931 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -17792,10 +17582,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 932 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17804,10 +17594,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 933 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17816,10 +17606,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 934 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -17828,10 +17618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 935 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -17840,10 +17630,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 936 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -17852,10 +17642,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 937 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -17864,10 +17654,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 938 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -17876,10 +17666,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 939 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -17888,10 +17678,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -17900,10 +17690,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -17912,10 +17702,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -17924,10 +17714,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -17936,10 +17726,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -17948,10 +17738,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -17960,10 +17750,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -17972,10 +17762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17984,10 +17774,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 948 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17996,10 +17786,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 949 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -18008,10 +17798,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -18020,10 +17810,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 951 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -18032,10 +17822,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 952 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -18044,10 +17834,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -18056,10 +17846,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -18068,10 +17858,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -18080,10 +17870,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -18092,10 +17882,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -18104,10 +17894,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 958 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -18116,10 +17906,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 959 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -18128,10 +17918,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -18140,10 +17930,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -18152,10 +17942,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -18165,10 +17955,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1073 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -18178,10 +17968,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1074 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -18191,10 +17981,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1075 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -18204,10 +17994,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1076 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -18217,10 +18007,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1077 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -18230,10 +18020,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -18243,10 +18033,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -18256,10 +18046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -18269,10 +18059,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -18282,10 +18072,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -18295,10 +18085,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -18308,10 +18098,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -18321,10 +18111,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -18334,10 +18124,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1088 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -18347,10 +18137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1089 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -18360,10 +18150,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1092 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -18373,10 +18163,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1093 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -18386,10 +18176,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1094 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -18399,10 +18189,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1095 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -18412,10 +18202,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1096 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -18425,10 +18215,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -18438,10 +18228,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -18451,10 +18241,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -18464,10 +18254,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -18477,10 +18267,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -18490,10 +18280,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -18503,10 +18293,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -18516,10 +18306,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -18529,10 +18319,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -18542,10 +18332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -18555,10 +18345,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -18568,10 +18358,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -18581,10 +18371,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.450580596923828e-09 @@ -18594,10 +18384,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -18607,10 +18397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.00048828125 @@ -18620,10 +18410,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.0009765625 @@ -18633,10 +18423,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -18646,10 +18436,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -18659,10 +18449,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -18672,10 +18462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -18685,10 +18475,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -18698,10 +18488,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -18711,10 +18501,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -18724,10 +18514,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -18737,10 +18527,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -18750,10 +18540,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.350988701644575e-38 @@ -18763,10 +18553,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -18776,10 +18566,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -18789,10 +18579,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.450580596923828e-09 @@ -18802,10 +18592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -18815,10 +18605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.00048828125 @@ -18828,10 +18618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.0009765625 @@ -18841,10 +18631,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 255.99993896484375 @@ -18854,10 +18644,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5033165 @@ -18867,10 +18657,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 421657440 @@ -18880,10 +18670,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2147483392 @@ -18893,10 +18683,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 68719476736 @@ -18906,10 +18696,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 549755813888 @@ -18919,10 +18709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -18932,10 +18722,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -255.99993896484375 @@ -18945,10 +18735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5033165 @@ -18958,10 +18748,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -421657440 @@ -18971,10 +18761,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2147483392 @@ -18984,10 +18774,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -68719476736 @@ -18997,10 +18787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -549755813888 @@ -19010,10 +18800,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3402823466385288598117041e14 @@ -19023,10 +18813,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -19036,10 +18826,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -19049,10 +18839,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -19062,10 +18852,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -19075,10 +18865,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -19088,10 +18878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -19101,10 +18891,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -19114,10 +18904,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -19127,10 +18917,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -19140,10 +18930,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -19153,10 +18943,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -19166,10 +18956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1168 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -19179,10 +18969,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19192,10 +18982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1170 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -19205,10 +18995,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -19218,10 +19008,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -19231,10 +19021,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -19244,10 +19034,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1182 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -19257,10 +19047,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -19270,10 +19060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -19283,10 +19073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -19296,10 +19086,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -19309,10 +19099,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -19322,10 +19112,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -19335,10 +19125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -19348,10 +19138,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19361,10 +19151,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19374,10 +19164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19387,10 +19177,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -19400,10 +19190,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -19413,10 +19203,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -19426,10 +19216,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -19439,10 +19229,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -19452,10 +19242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -19465,10 +19255,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -19478,10 +19268,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -19491,10 +19281,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -19504,10 +19294,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -19517,10 +19307,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -19530,10 +19320,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -19543,10 +19333,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -19556,10 +19346,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -19569,10 +19359,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -19582,10 +19372,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -19595,10 +19385,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19608,10 +19398,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -19621,10 +19411,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -19634,10 +19424,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397214889526365 @@ -19647,10 +19437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0397214889526365 @@ -19660,10 +19450,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397210121154785 @@ -19673,10 +19463,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397214889526367 @@ -19686,10 +19476,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -19699,10 +19489,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5e-324 @@ -19712,10 +19502,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 709.782712893384 @@ -19725,10 +19515,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 709.7827128933841 @@ -19738,10 +19528,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -745.1332191019411 @@ -19751,10 +19541,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -745.1332191019412 @@ -19764,10 +19554,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -708.3964185322641 @@ -19777,10 +19567,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -708.3964185322642 @@ -19790,10 +19580,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5006933289508785 @@ -19803,10 +19593,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.628493326460252 @@ -19816,10 +19606,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.837522455340574 @@ -19829,10 +19619,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.8504909932810999 @@ -19842,10 +19632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.6270060846924657 @@ -19855,10 +19645,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.6744336219614115 @@ -19868,10 +19658,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 6.657914718791208 @@ -19881,10 +19671,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 11.022872793631722 @@ -19894,10 +19684,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 11.411195701885317 @@ -19907,10 +19697,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 11.794490387560606 @@ -19920,10 +19710,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 412.83872756953286 @@ -19933,10 +19723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 510.87569028483415 @@ -19946,10 +19736,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.6589841439772853e-14 @@ -19959,10 +19749,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1354 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.7144952952085447e-14 @@ -19972,10 +19762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -19985,10 +19775,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -19998,10 +19788,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -20011,10 +19801,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -20024,10 +19814,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -20037,10 +19827,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -20050,10 +19840,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -20063,10 +19853,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -20076,10 +19866,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -20089,10 +19879,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -20102,10 +19892,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -20115,10 +19905,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -20128,10 +19918,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -20141,10 +19931,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -20154,10 +19944,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -20167,10 +19957,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1391 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -20180,10 +19970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1392 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -20193,10 +19983,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 88.72283172607422 @@ -20206,10 +19996,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 88.72283935546875 @@ -20219,10 +20009,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -103.97207641601562 @@ -20232,10 +20022,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -103.97208404541016 @@ -20245,10 +20035,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465735614299774 @@ -20258,10 +20048,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465735912322998 @@ -20271,10 +20061,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465736210346222 @@ -20284,10 +20074,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -20297,10 +20087,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -20310,10 +20100,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -20323,10 +20113,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -20336,10 +20126,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -20349,10 +20139,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -20362,10 +20152,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -20375,10 +20165,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -20388,10 +20178,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -20401,10 +20191,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -20414,10 +20204,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20427,10 +20217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20440,10 +20230,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20453,10 +20243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20466,10 +20256,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20479,10 +20269,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -20492,10 +20282,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20505,10 +20295,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507201e-308 @@ -20518,10 +20308,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.225073858507201e-308 @@ -20531,10 +20321,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -20544,10 +20334,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -20557,10 +20347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -20570,10 +20360,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -20583,10 +20373,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -20596,10 +20386,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -20609,10 +20399,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -20622,10 +20412,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -20635,10 +20425,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -20648,10 +20438,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -20661,10 +20451,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -20674,10 +20464,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -20687,10 +20477,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -20700,10 +20490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -20713,10 +20503,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -20726,10 +20516,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -20739,10 +20529,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -20752,10 +20542,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1459 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -20764,10 +20554,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -20776,10 +20566,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -20788,10 +20578,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -20800,10 +20590,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -20812,10 +20602,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -20824,10 +20614,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -20836,10 +20626,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -20848,10 +20638,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -20860,10 +20650,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -20872,10 +20662,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20884,10 +20674,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20896,10 +20686,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -20908,10 +20698,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20920,10 +20710,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20932,10 +20722,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20944,10 +20734,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20956,10 +20746,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -20968,10 +20758,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -20980,10 +20770,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -20992,10 +20782,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -21004,10 +20794,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1493 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -21016,10 +20806,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -21028,10 +20818,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1495 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -21040,10 +20830,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1496 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -21052,10 +20842,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1497 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -21064,10 +20854,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -21076,10 +20866,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -21088,10 +20878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -21100,10 +20890,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -21112,10 +20902,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -21124,10 +20914,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -21136,10 +20926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -21148,10 +20938,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -21160,10 +20950,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1514 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -21172,10 +20962,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1515 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21184,10 +20974,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21196,10 +20986,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -21208,10 +20998,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21220,10 +21010,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21232,10 +21022,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -21244,10 +21034,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -21256,10 +21046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -21268,10 +21058,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -21280,10 +21070,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -21292,10 +21082,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -21304,10 +21094,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -21316,10 +21106,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -21328,10 +21118,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -21340,10 +21130,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -21352,10 +21142,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -21366,10 +21156,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1544 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -21380,10 +21170,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1545 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -21394,10 +21184,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1546 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -21408,10 +21198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1547 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -21422,10 +21212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -21436,10 +21226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -21450,10 +21240,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -21464,10 +21254,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -21478,10 +21268,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -21492,10 +21282,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -21506,10 +21296,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -21520,10 +21310,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -21534,10 +21324,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1558 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -21548,10 +21338,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1559 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -21562,10 +21352,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -21576,10 +21366,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -21590,10 +21380,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -21604,10 +21394,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -21618,10 +21408,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -21632,10 +21422,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -21646,10 +21436,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -21660,10 +21450,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -21674,10 +21464,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1568 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -21688,10 +21478,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1569 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -21702,10 +21492,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1570 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -21716,10 +21506,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1571 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -21730,10 +21520,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1572 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -21744,10 +21534,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1573 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -21758,10 +21548,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1574 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -21772,10 +21562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1583 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -21786,10 +21576,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1584 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -21800,10 +21590,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -21814,10 +21604,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1586 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -21828,10 +21618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1587 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -21842,10 +21632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1588 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -21856,10 +21646,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1589 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -21870,10 +21660,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1590 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -21884,10 +21674,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1591 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -21898,10 +21688,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1592 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -21912,10 +21702,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1595 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -21926,10 +21716,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1596 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -21940,10 +21730,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1597 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -21954,10 +21744,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1598 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -21968,10 +21758,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1599 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -21982,10 +21772,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1600 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -21996,10 +21786,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1601 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -22010,10 +21800,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1602 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -22024,10 +21814,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1603 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -22038,10 +21828,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1604 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22052,10 +21842,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1605 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -22066,10 +21856,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22080,10 +21870,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -22094,10 +21884,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22108,10 +21898,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -22122,10 +21912,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22136,10 +21926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1611 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22150,10 +21940,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1612 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22164,10 +21954,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -22177,10 +21967,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -22190,10 +21980,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -22203,10 +21993,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -22216,10 +22006,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -22229,10 +22019,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -22242,10 +22032,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1630 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -22255,10 +22045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1631 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -22268,10 +22058,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1632 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -22281,10 +22071,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1633 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -22294,10 +22084,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1634 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -22307,10 +22097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1637 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -22320,10 +22110,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1638 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -22333,10 +22123,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1639 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -22346,10 +22136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -22359,10 +22149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -22372,10 +22162,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -22385,10 +22175,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -22398,10 +22188,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -22410,10 +22200,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -22422,10 +22212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -22434,10 +22224,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22446,10 +22236,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -22458,10 +22248,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -22470,10 +22260,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -22482,10 +22272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22494,10 +22284,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -22506,10 +22296,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -22518,10 +22308,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -22530,10 +22320,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -22542,10 +22332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1666 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -22554,10 +22344,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1667 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -22566,10 +22356,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1668 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -22578,10 +22368,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1669 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -22590,10 +22380,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1670 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -22603,10 +22393,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -22616,10 +22406,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -22629,10 +22419,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -22642,10 +22432,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -22655,10 +22445,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1686 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -22668,10 +22458,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1687 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -22681,10 +22471,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1688 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -22694,10 +22484,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1689 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -22707,10 +22497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1690 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -22720,10 +22510,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1691 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -22733,10 +22523,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -22746,10 +22536,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -22759,10 +22549,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -22772,10 +22562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -22785,10 +22575,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -22798,10 +22588,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -22811,10 +22601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -22824,10 +22614,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -22837,10 +22627,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -22850,10 +22640,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -22863,10 +22653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -22876,10 +22666,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -22889,10 +22679,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -22902,10 +22692,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1715 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -22915,10 +22705,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1716 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -22928,10 +22718,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1717 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -22941,10 +22731,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1718 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -22954,10 +22744,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1719 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -22967,10 +22757,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -22980,10 +22770,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1723 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -22993,10 +22783,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1724 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -23006,10 +22796,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1725 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -23019,10 +22809,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1726 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23032,10 +22822,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -23045,10 +22835,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1728 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -23058,10 +22848,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1729 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -23071,10 +22861,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -23084,10 +22874,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -23097,10 +22887,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -23110,10 +22900,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -23123,10 +22913,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -23136,10 +22926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -23149,10 +22939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -23162,10 +22952,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1748 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -23175,10 +22965,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1749 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -23188,10 +22978,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -23201,10 +22991,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -23214,10 +23004,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -23227,10 +23017,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -23240,10 +23030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -23253,10 +23043,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -23266,10 +23056,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -23279,10 +23069,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -23292,10 +23082,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -23305,10 +23095,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1769 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -23318,10 +23108,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1770 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -23331,10 +23121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1771 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -23344,10 +23134,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1772 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -23357,10 +23147,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1773 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -23370,10 +23160,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1774 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -23383,10 +23173,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1775 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -23396,10 +23186,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1776 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -23409,10 +23199,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1777 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -23422,10 +23212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -23435,10 +23225,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -23448,10 +23238,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -23461,10 +23251,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -23474,10 +23264,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -23487,10 +23277,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23500,10 +23290,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -23513,10 +23303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -23526,10 +23316,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1788 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -23539,10 +23329,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1789 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -23552,10 +23342,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1801 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -23565,10 +23355,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1802 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -23578,10 +23368,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1803 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -23591,10 +23381,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1804 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -23604,10 +23394,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1805 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -23617,10 +23407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1806 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -23630,10 +23420,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1807 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -23643,10 +23433,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -23656,10 +23446,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -23669,10 +23459,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -23682,10 +23472,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -23695,10 +23485,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -23708,10 +23498,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -23721,10 +23511,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -23734,10 +23524,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1817 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -23747,10 +23537,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1818 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -23760,10 +23550,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1819 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -23773,10 +23563,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1820 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -23786,10 +23576,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -23799,10 +23589,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1830 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -23812,10 +23602,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1831 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -23825,10 +23615,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -23838,10 +23628,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1833 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -23851,10 +23641,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1834 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -23864,10 +23654,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1835 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -23877,10 +23667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1836 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -23890,10 +23680,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1837 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -23903,10 +23693,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1838 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -23916,10 +23706,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -23929,10 +23719,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -23942,10 +23732,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -23955,10 +23745,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -23968,10 +23758,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23981,10 +23771,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -23994,10 +23784,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -24007,10 +23797,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -24020,10 +23810,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -24033,10 +23823,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -24046,10 +23836,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -24059,10 +23849,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -24072,10 +23862,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -24085,10 +23875,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -24098,10 +23888,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -24111,10 +23901,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -24124,10 +23914,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -24137,10 +23927,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24150,10 +23940,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24163,10 +23953,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -24176,10 +23966,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -24189,10 +23979,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24202,10 +23992,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24215,10 +24005,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24228,10 +24018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24241,10 +24031,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24254,10 +24044,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24267,10 +24057,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24280,10 +24070,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -24293,10 +24083,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -24306,10 +24096,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24319,10 +24109,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24332,10 +24122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24345,10 +24135,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24358,10 +24148,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24371,10 +24161,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24384,10 +24174,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24397,10 +24187,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24410,10 +24200,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24423,10 +24213,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24436,10 +24226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24449,10 +24239,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24462,10 +24252,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24475,10 +24265,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24488,10 +24278,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1898 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24501,10 +24291,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1899 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24514,10 +24304,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1900 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24527,10 +24317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1901 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24540,10 +24330,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1902 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24553,10 +24343,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1903 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24566,10 +24356,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1904 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24579,10 +24369,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1905 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24592,10 +24382,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1906 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24605,10 +24395,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1907 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24618,10 +24408,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1908 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24631,10 +24421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1909 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24644,10 +24434,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1910 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24657,10 +24447,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1911 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24670,10 +24460,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1912 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24683,10 +24473,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24696,10 +24486,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24709,10 +24499,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24722,10 +24512,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1916 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24735,10 +24525,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1917 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24748,10 +24538,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24761,10 +24551,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1919 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24774,10 +24564,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24787,10 +24577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1921 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24800,10 +24590,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1922 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24813,10 +24603,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1923 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24826,10 +24616,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -24839,10 +24629,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -24852,10 +24642,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -24865,10 +24655,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -24878,10 +24668,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1928 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -24891,10 +24681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -24904,10 +24694,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1938 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -24917,10 +24707,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1939 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -24930,10 +24720,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -24943,10 +24733,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -24956,10 +24746,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -24969,10 +24759,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -24982,10 +24772,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -24995,10 +24785,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -25008,10 +24798,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -25021,10 +24811,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25034,10 +24824,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25047,10 +24837,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1951 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -25060,10 +24850,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1952 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -25073,10 +24863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25086,10 +24876,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25099,10 +24889,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25112,10 +24902,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25125,10 +24915,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25138,10 +24928,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1958 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25151,10 +24941,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1959 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25164,10 +24954,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -25177,10 +24967,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -25190,10 +24980,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25203,10 +24993,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1963 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25216,10 +25006,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1964 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25229,10 +25019,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1965 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25242,10 +25032,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1966 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25255,10 +25045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1967 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25268,10 +25058,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1968 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25281,10 +25071,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1969 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25294,10 +25084,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1970 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25307,10 +25097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1971 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25320,10 +25110,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1972 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25333,10 +25123,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1973 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25346,10 +25136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1974 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25359,10 +25149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1975 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25372,10 +25162,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1976 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25385,10 +25175,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1977 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25398,10 +25188,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1978 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25411,10 +25201,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1979 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25424,10 +25214,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1980 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25437,10 +25227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1981 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25450,10 +25240,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1982 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25463,10 +25253,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1983 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25476,10 +25266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1984 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25489,10 +25279,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1985 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25502,10 +25292,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1986 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25515,10 +25305,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1987 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25528,10 +25318,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1988 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25541,10 +25331,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1989 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25554,10 +25344,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1990 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25567,10 +25357,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1991 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25580,10 +25370,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1992 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25593,10 +25383,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1993 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25606,10 +25396,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1994 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25619,10 +25409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1995 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25632,10 +25422,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1996 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25645,10 +25435,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1997 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25658,10 +25448,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1998 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25671,10 +25461,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1999 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25684,10 +25474,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2000 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25697,10 +25487,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2001 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25710,10 +25500,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2002 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -25723,10 +25513,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2003 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -25736,10 +25526,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2004 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -25749,10 +25539,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2005 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -25762,10 +25552,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2006 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -25775,10 +25565,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2007 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -25788,10 +25578,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2019 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -25801,10 +25591,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2020 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -25814,10 +25604,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2021 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -25827,10 +25617,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2022 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -25840,10 +25630,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2023 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -25853,10 +25643,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2024 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -25866,10 +25656,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2025 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -25879,10 +25669,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2026 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -25892,10 +25682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2027 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -25905,10 +25695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2028 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -25918,10 +25708,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2031 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -25931,10 +25721,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2032 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -25944,10 +25734,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2033 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -25957,10 +25747,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2034 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -25970,10 +25760,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2035 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -25983,10 +25773,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2036 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25996,10 +25786,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2037 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26009,10 +25799,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2038 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26022,10 +25812,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2039 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26035,10 +25825,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2040 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26048,10 +25838,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2041 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -26061,10 +25851,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2042 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -26074,10 +25864,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2043 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26087,10 +25877,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2044 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26100,10 +25890,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2045 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26113,10 +25903,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2046 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26126,10 +25916,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2047 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26139,10 +25929,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2048 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26152,10 +25942,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2049 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26165,10 +25955,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2050 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26178,10 +25968,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2051 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26191,10 +25981,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2052 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26204,10 +25994,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2053 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26217,10 +26007,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2054 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26230,10 +26020,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2055 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26243,10 +26033,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2056 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26256,10 +26046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2057 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26269,10 +26059,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2058 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26282,10 +26072,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2059 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26295,10 +26085,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2060 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26308,10 +26098,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2061 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26321,10 +26111,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2062 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26334,10 +26124,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2063 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26347,10 +26137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2064 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26360,10 +26150,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2065 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26373,10 +26163,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2066 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26386,10 +26176,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2067 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26399,10 +26189,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2068 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26412,10 +26202,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2069 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26425,10 +26215,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2070 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26438,10 +26228,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2071 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26451,10 +26241,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2072 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26464,10 +26254,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2073 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26477,10 +26267,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2074 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26490,10 +26280,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2075 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26503,10 +26293,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2076 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26516,10 +26306,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2077 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26529,10 +26319,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26542,10 +26332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26555,10 +26345,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26568,10 +26358,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26581,10 +26371,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26594,10 +26384,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2083 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -26607,10 +26397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2084 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -26620,10 +26410,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -26633,10 +26423,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -26646,10 +26436,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -26659,10 +26449,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2088 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -26672,10 +26462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -26685,10 +26475,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -26698,10 +26488,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -26711,10 +26501,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -26724,10 +26514,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -26737,10 +26527,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -26750,10 +26540,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -26763,10 +26553,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -26776,10 +26566,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -26789,10 +26579,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -26802,10 +26592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -26815,10 +26605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -26828,10 +26618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -26841,10 +26631,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26854,10 +26644,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -26867,10 +26657,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26880,10 +26670,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -26893,10 +26683,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26906,10 +26696,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -26919,10 +26709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -26932,10 +26722,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -26945,10 +26735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -26958,10 +26748,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26971,10 +26761,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -26984,10 +26774,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26997,10 +26787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27010,10 +26800,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27023,10 +26813,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27036,10 +26826,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27049,10 +26839,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27062,10 +26852,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27075,10 +26865,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27088,10 +26878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27101,10 +26891,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27114,10 +26904,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27127,10 +26917,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27140,10 +26930,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27153,10 +26943,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27166,10 +26956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27179,10 +26969,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27192,10 +26982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27205,10 +26995,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27218,10 +27008,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27231,10 +27021,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27244,10 +27034,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27257,10 +27047,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27270,10 +27060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27283,10 +27073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27296,10 +27086,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27309,10 +27099,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27322,10 +27112,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27335,10 +27125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27348,10 +27138,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27361,10 +27151,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27374,10 +27164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27387,10 +27177,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27400,10 +27190,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27413,10 +27203,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27426,10 +27216,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27439,10 +27229,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27452,10 +27242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27465,10 +27255,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27478,10 +27268,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -27491,10 +27281,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -27504,10 +27294,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -27517,10 +27307,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -27530,10 +27320,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -27543,10 +27333,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -27556,10 +27346,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -27569,10 +27359,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -27582,10 +27372,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2182 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -27595,10 +27385,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -27608,10 +27398,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -27621,10 +27411,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -27634,10 +27424,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -27647,10 +27437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -27660,10 +27450,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -27673,10 +27463,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -27686,10 +27476,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -27699,10 +27489,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -27712,10 +27502,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -27725,10 +27515,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -27738,10 +27528,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -27751,10 +27541,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -27764,10 +27554,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -27777,10 +27567,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -27790,10 +27580,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -27803,10 +27593,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27816,10 +27606,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -27829,10 +27619,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -27842,10 +27632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -27855,10 +27645,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -27868,10 +27658,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -27881,10 +27671,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -27894,10 +27684,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -27907,10 +27697,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -27920,10 +27710,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -27933,10 +27723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -27946,10 +27736,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -27959,10 +27749,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -27972,10 +27762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27985,10 +27775,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -27998,10 +27788,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28011,10 +27801,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28024,10 +27814,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28037,10 +27827,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28050,10 +27840,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28063,10 +27853,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28076,10 +27866,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28089,10 +27879,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28102,10 +27892,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28115,10 +27905,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28128,10 +27918,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28141,10 +27931,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28154,10 +27944,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28167,10 +27957,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28180,10 +27970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28193,10 +27983,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28206,10 +27996,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28219,10 +28009,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2233 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28232,10 +28022,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28245,10 +28035,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28258,10 +28048,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2236 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28271,10 +28061,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28284,10 +28074,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28297,10 +28087,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2239 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28310,10 +28100,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2240 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28323,10 +28113,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28336,10 +28126,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28349,10 +28139,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28362,10 +28152,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28375,10 +28165,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28388,10 +28178,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28401,10 +28191,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28414,10 +28204,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28427,10 +28217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28440,10 +28230,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28453,10 +28243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28466,10 +28256,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -28479,10 +28269,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2253 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -28492,10 +28282,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -28505,10 +28295,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -28518,10 +28308,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -28531,10 +28321,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -28544,10 +28334,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -28557,10 +28347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -28570,10 +28360,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2268 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -28583,10 +28373,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -28596,10 +28386,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -28609,10 +28399,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -28622,10 +28412,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -28635,10 +28425,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -28648,10 +28438,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -28661,10 +28451,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -28674,10 +28464,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -28687,10 +28477,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -28700,10 +28490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -28713,10 +28503,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -28726,10 +28516,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -28739,10 +28529,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -28752,10 +28542,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -28765,10 +28555,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -28778,10 +28568,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -28791,10 +28581,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -28804,10 +28594,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -28817,10 +28607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -28830,10 +28620,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -28843,10 +28633,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -28856,10 +28646,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -28869,10 +28659,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -28882,10 +28672,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -28895,10 +28685,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -28908,10 +28698,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -28921,10 +28711,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -28934,10 +28724,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -28947,10 +28737,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -28960,10 +28750,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -28973,10 +28763,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -28986,10 +28776,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -28999,10 +28789,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2303 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29012,10 +28802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29025,10 +28815,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29038,10 +28828,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2306 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29051,10 +28841,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2307 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29064,10 +28854,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29077,10 +28867,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29090,10 +28880,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29103,10 +28893,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2311 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29116,10 +28906,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29129,10 +28919,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29142,10 +28932,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29155,10 +28945,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29168,10 +28958,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29181,10 +28971,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29194,10 +28984,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29207,10 +28997,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29220,10 +29010,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29233,10 +29023,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29246,10 +29036,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29259,10 +29049,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29272,10 +29062,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29285,10 +29075,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29298,10 +29088,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29311,10 +29101,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2327 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29324,10 +29114,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29337,10 +29127,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2329 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29350,10 +29140,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2330 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29363,10 +29153,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2331 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29376,10 +29166,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29389,10 +29179,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29402,10 +29192,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29415,10 +29205,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29428,10 +29218,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29441,10 +29231,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29454,10 +29244,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -29467,10 +29257,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -29480,10 +29270,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -29493,10 +29283,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -29506,10 +29296,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -29519,10 +29309,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -29533,10 +29323,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2355 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -29547,10 +29337,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2356 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -29561,10 +29351,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2357 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -29575,10 +29365,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2358 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -29589,10 +29379,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2359 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -29603,10 +29393,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2360 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -29617,10 +29407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -29631,10 +29421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2362 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -29645,10 +29435,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2363 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -29659,10 +29449,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29673,10 +29463,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2367 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29687,10 +29477,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29701,10 +29491,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29715,10 +29505,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2370 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29729,10 +29519,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29743,10 +29533,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29757,10 +29547,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2373 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29771,10 +29561,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2374 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29785,10 +29575,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29799,10 +29589,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29813,10 +29603,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29827,10 +29617,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29841,10 +29631,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -29855,10 +29645,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29869,10 +29659,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29883,10 +29673,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29897,10 +29687,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29911,10 +29701,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29925,10 +29715,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29939,10 +29729,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29953,10 +29743,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29967,10 +29757,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29981,10 +29771,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -29995,10 +29785,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30009,10 +29799,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2391 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30023,10 +29813,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2392 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30037,10 +29827,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30051,10 +29841,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30065,10 +29855,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30079,10 +29869,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30093,10 +29883,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30107,10 +29897,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30121,10 +29911,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30135,10 +29925,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30149,10 +29939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2401 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30163,10 +29953,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30177,10 +29967,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2403 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30191,10 +29981,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2404 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30205,10 +29995,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30219,10 +30009,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2406 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30233,10 +30023,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2407 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30247,10 +30037,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2408 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30261,10 +30051,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2409 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30275,10 +30065,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2410 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30289,10 +30079,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2411 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30303,10 +30093,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30317,10 +30107,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30331,10 +30121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30345,10 +30135,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30359,10 +30149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30373,10 +30163,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30387,10 +30177,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30401,10 +30191,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30415,10 +30205,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30429,10 +30219,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30443,10 +30233,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2422 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30457,10 +30247,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2423 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30471,10 +30261,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30485,10 +30275,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30499,10 +30289,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30513,10 +30303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30527,10 +30317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30541,10 +30331,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30555,10 +30345,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30569,10 +30359,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -30583,10 +30373,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -30597,10 +30387,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -30611,10 +30401,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2434 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30625,10 +30415,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2435 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30639,10 +30429,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2436 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30653,10 +30443,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2437 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30667,10 +30457,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30681,10 +30471,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2439 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30695,10 +30485,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2440 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30709,10 +30499,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30723,10 +30513,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30737,10 +30527,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30751,10 +30541,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30765,10 +30555,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30779,10 +30569,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30793,10 +30583,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30807,10 +30597,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30821,10 +30611,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30835,10 +30625,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30849,10 +30639,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30863,10 +30653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30877,10 +30667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -30891,10 +30681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30905,10 +30695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30919,10 +30709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -30933,10 +30723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -30947,10 +30737,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -30961,10 +30751,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2467 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -30975,10 +30765,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2468 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -30989,10 +30779,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2469 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -31003,10 +30793,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2470 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -31017,10 +30807,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -31031,10 +30821,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -31045,10 +30835,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -31059,10 +30849,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -31073,10 +30863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -31087,10 +30877,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31101,10 +30891,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31115,10 +30905,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31129,10 +30919,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31143,10 +30933,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31157,10 +30947,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31171,10 +30961,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31185,10 +30975,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31199,10 +30989,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31213,10 +31003,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31227,10 +31017,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31241,10 +31031,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31255,10 +31045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31269,10 +31059,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31283,10 +31073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31297,10 +31087,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2493 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31311,10 +31101,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31325,10 +31115,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2495 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31339,10 +31129,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2496 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31353,10 +31143,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2497 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31367,10 +31157,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2498 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31381,10 +31171,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2499 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31395,10 +31185,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2500 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31409,10 +31199,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31423,10 +31213,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31437,10 +31227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2503 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31451,10 +31241,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2504 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31465,10 +31255,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2505 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31479,10 +31269,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -31493,10 +31283,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31507,10 +31297,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -31521,10 +31311,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31535,10 +31325,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31549,10 +31339,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31563,10 +31353,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -31577,10 +31367,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31591,10 +31381,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2514 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -31605,10 +31395,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2515 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31619,10 +31409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2516 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31633,10 +31423,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2517 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31647,10 +31437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31661,10 +31451,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31675,10 +31465,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31689,10 +31479,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31703,10 +31493,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31717,10 +31507,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31731,10 +31521,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31745,10 +31535,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31759,10 +31549,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31773,10 +31563,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31787,10 +31577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31801,10 +31591,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31815,10 +31605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31829,10 +31619,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31843,10 +31633,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31857,10 +31647,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2533 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31871,10 +31661,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2534 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31885,10 +31675,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2535 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31899,10 +31689,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2536 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31913,10 +31703,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2537 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31927,10 +31717,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2538 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31941,10 +31731,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2539 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31955,10 +31745,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2540 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31969,10 +31759,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2541 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31983,10 +31773,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2542 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31997,10 +31787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2543 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -32011,10 +31801,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2544 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -32025,10 +31815,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2545 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -32039,10 +31829,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2546 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32053,10 +31843,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2547 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32067,10 +31857,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32081,10 +31871,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32095,10 +31885,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32109,10 +31899,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32123,10 +31913,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32137,10 +31927,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32151,10 +31941,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2554 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32165,10 +31955,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2555 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32179,10 +31969,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32193,10 +31983,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32207,10 +31997,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2558 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32221,10 +32011,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2559 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32235,10 +32025,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32249,10 +32039,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32263,10 +32053,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32277,10 +32067,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32291,10 +32081,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32305,10 +32095,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32319,10 +32109,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32333,10 +32123,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32347,10 +32137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2568 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -32361,10 +32151,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2569 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -32375,10 +32165,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2570 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/bindings/Math/random @@ -32394,13 +32184,12 @@ local.tee $0 f64.const 0 f64.ge - local.tee $3 if (result i32) local.get $0 f64.const 1 f64.lt else - local.get $3 + i32.const 0 end if local.get $2 @@ -32410,10 +32199,10 @@ br $repeat|0 else i32.const 0 - i32.const 8 + i32.const 24 i32.const 2579 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -32434,13 +32223,12 @@ local.tee $1 f32.const 0 f32.ge - local.tee $3 if (result i32) local.get $1 f32.const 1 f32.lt else - local.get $3 + i32.const 0 end if local.get $2 @@ -32450,10 +32238,10 @@ br $repeat|1 else i32.const 0 - i32.const 8 + i32.const 24 i32.const 2587 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -32465,10 +32253,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2601 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -32477,10 +32265,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2602 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -32489,10 +32277,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2603 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -32501,10 +32289,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2604 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -32513,10 +32301,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2605 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -32525,10 +32313,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -32537,10 +32325,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -32549,10 +32337,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -32561,10 +32349,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -32573,10 +32361,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -32585,10 +32373,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32597,10 +32385,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2614 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -32609,10 +32397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2615 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32621,10 +32409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2616 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -32633,10 +32421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2617 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -32645,10 +32433,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2618 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -32657,10 +32445,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2619 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -32669,10 +32457,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2620 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -32681,10 +32469,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2621 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -32693,10 +32481,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2622 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -32705,10 +32493,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2623 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -32717,10 +32505,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2624 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -32729,10 +32517,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -32741,10 +32529,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -32753,10 +32541,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -32765,10 +32553,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -32777,10 +32565,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -32789,10 +32577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2638 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -32801,10 +32589,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2639 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -32813,10 +32601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -32825,10 +32613,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -32837,10 +32625,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -32849,10 +32637,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -32861,10 +32649,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -32873,10 +32661,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2645 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -32885,10 +32673,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2646 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -32897,10 +32685,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2647 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32909,10 +32697,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2650 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32921,10 +32709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2651 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -32933,10 +32721,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2652 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -32945,10 +32733,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -32957,10 +32745,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -32969,10 +32757,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32981,10 +32769,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -32993,10 +32781,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -33005,10 +32793,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -33017,10 +32805,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -33029,10 +32817,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -33041,10 +32829,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2661 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -33053,10 +32841,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -33065,10 +32853,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -33077,10 +32865,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -33089,10 +32877,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -33101,10 +32889,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2666 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33113,10 +32901,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33125,10 +32913,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2678 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33137,10 +32925,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -33149,10 +32937,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2680 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33161,10 +32949,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2681 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -33173,10 +32961,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33185,10 +32973,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -33197,10 +32985,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33209,10 +32997,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -33221,10 +33009,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -33233,10 +33021,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -33245,10 +33033,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -33257,10 +33045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -33269,10 +33057,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -33281,10 +33069,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -33293,10 +33081,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -33305,10 +33093,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -33317,10 +33105,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -33330,10 +33118,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2738 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -33343,10 +33131,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2739 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -33356,10 +33144,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2740 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -33369,10 +33157,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -33382,10 +33170,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -33395,10 +33183,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -33408,10 +33196,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -33421,10 +33209,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -33434,10 +33222,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -33447,10 +33235,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33460,10 +33248,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33473,10 +33261,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2751 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -33486,10 +33274,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2752 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -33499,10 +33287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33512,10 +33300,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33525,10 +33313,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -33538,10 +33326,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -33551,10 +33339,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -33564,10 +33352,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -33577,10 +33365,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33590,10 +33378,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -33603,10 +33391,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2761 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33616,10 +33404,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2762 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33629,10 +33417,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2763 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33642,10 +33430,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2764 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -33655,10 +33443,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2765 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -33668,10 +33456,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2766 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33681,10 +33469,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2767 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33694,10 +33482,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2768 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -33707,10 +33495,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2769 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -33720,10 +33508,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2770 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -33733,10 +33521,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2771 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -33746,10 +33534,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2772 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33759,10 +33547,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2773 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -33772,10 +33560,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2774 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33785,10 +33573,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2775 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33798,10 +33586,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2776 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33811,10 +33599,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2777 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33824,10 +33612,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33837,10 +33625,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2779 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33850,10 +33638,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2780 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33863,10 +33651,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33876,10 +33664,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33889,10 +33677,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33902,10 +33690,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33915,10 +33703,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33928,10 +33716,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33941,10 +33729,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33954,10 +33742,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2788 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -33967,10 +33755,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2789 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33980,10 +33768,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2790 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33993,10 +33781,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2791 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34006,10 +33794,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2792 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34019,10 +33807,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2793 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -34032,10 +33820,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2794 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34045,10 +33833,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2795 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34058,10 +33846,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2796 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34071,10 +33859,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2797 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34084,10 +33872,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2798 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34097,10 +33885,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2799 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34110,10 +33898,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2800 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -34123,10 +33911,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2801 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -34136,10 +33924,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2802 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -34149,10 +33937,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2803 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -34162,10 +33950,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2804 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -34175,10 +33963,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2805 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34188,10 +33976,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2806 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34201,10 +33989,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2807 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -34214,10 +34002,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -34227,10 +34015,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -34240,10 +34028,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -34253,10 +34041,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2811 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -34266,10 +34054,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2812 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -34279,10 +34067,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -34292,10 +34080,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -34305,10 +34093,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8e-323 @@ -34318,10 +34106,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -34331,10 +34119,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2825 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -34344,10 +34132,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2826 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -34357,10 +34145,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2827 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -34370,10 +34158,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -34383,10 +34171,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -34396,10 +34184,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2830 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -34409,10 +34197,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2831 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -34422,10 +34210,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -34435,10 +34223,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2833 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -34448,10 +34236,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2834 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34461,10 +34249,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2837 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34474,10 +34262,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2838 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -34487,10 +34275,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2839 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -34500,10 +34288,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2840 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34513,10 +34301,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34526,10 +34314,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -34539,10 +34327,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -34552,10 +34340,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -34565,10 +34353,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -34578,10 +34366,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34591,10 +34379,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -34604,10 +34392,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34617,10 +34405,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2849 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34630,10 +34418,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2850 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34643,10 +34431,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2851 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -34656,10 +34444,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2852 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -34669,10 +34457,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2853 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34682,10 +34470,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2854 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34695,10 +34483,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2855 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -34708,10 +34496,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -34721,10 +34509,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2857 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -34734,10 +34522,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2858 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -34747,10 +34535,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34760,10 +34548,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -34773,10 +34561,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34786,10 +34574,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34799,10 +34587,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34812,10 +34600,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34825,10 +34613,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34838,10 +34626,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34851,10 +34639,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34864,10 +34652,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34877,10 +34665,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34890,10 +34678,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2870 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34903,10 +34691,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34916,10 +34704,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34929,10 +34717,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34942,10 +34730,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34955,10 +34743,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -34968,10 +34756,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34981,10 +34769,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34994,10 +34782,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35007,10 +34795,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35020,10 +34808,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -35033,10 +34821,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35046,10 +34834,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35059,10 +34847,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35072,10 +34860,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35085,10 +34873,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35098,10 +34886,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35111,10 +34899,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -35124,10 +34912,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -35137,10 +34925,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -35150,10 +34938,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -35163,10 +34951,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -35176,10 +34964,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35189,10 +34977,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35202,10 +34990,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -35215,10 +35003,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -35228,10 +35016,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35241,10 +35029,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35254,10 +35042,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2898 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -35267,10 +35055,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2899 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -35280,10 +35068,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2900 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -35293,10 +35081,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2901 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -35306,10 +35094,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2902 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -35319,10 +35107,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2903 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -35332,10 +35120,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -35345,10 +35133,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -35358,10 +35146,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -35371,10 +35159,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -35384,10 +35172,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -35397,10 +35185,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -35410,10 +35198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -35423,10 +35211,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2948 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -35436,10 +35224,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2949 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -35449,10 +35237,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -35462,10 +35250,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -35475,10 +35263,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -35488,10 +35276,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -35501,10 +35289,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -35514,10 +35302,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -35527,10 +35315,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -35540,10 +35328,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -35553,10 +35341,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -35566,10 +35354,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2963 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -35579,10 +35367,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2964 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -35592,10 +35380,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2965 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -35605,10 +35393,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2966 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -35618,10 +35406,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2967 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -35631,10 +35419,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2968 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -35644,10 +35432,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2969 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -35657,10 +35445,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2970 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -35670,10 +35458,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2971 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1175870895385742e-08 @@ -35683,10 +35471,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2972 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4901161193847656e-08 @@ -35696,10 +35484,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2973 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -35709,10 +35497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2974 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.0003662109375 @@ -35722,10 +35510,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2975 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -35735,10 +35523,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2976 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -35748,10 +35536,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2977 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -35761,10 +35549,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2978 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.350988701644575e-38 @@ -35774,10 +35562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2979 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -35787,10 +35575,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2980 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -35800,10 +35588,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2981 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1175870895385742e-08 @@ -35813,10 +35601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2982 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.4901161193847656e-08 @@ -35826,10 +35614,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2983 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -35839,10 +35627,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2984 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.0003662109375 @@ -35852,10 +35640,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2985 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -35865,10 +35653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2986 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -35878,10 +35666,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2987 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -35891,10 +35679,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2988 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -35904,10 +35692,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2989 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -35917,10 +35705,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2990 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -35930,10 +35718,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2991 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -35943,10 +35731,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2992 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -35956,10 +35744,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2993 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -35969,10 +35757,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2994 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -35982,10 +35770,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2995 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -35995,10 +35783,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2996 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -36008,10 +35796,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2997 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 255.99993896484375 @@ -36021,10 +35809,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3000 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5033165 @@ -36034,10 +35822,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3001 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 421657440 @@ -36047,10 +35835,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3002 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2147483392 @@ -36060,10 +35848,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3003 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 68719476736 @@ -36073,10 +35861,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3004 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 549755813888 @@ -36086,10 +35874,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3005 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -36099,10 +35887,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3006 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -255.99993896484375 @@ -36112,10 +35900,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3007 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5033165 @@ -36125,10 +35913,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3008 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -421657440 @@ -36138,10 +35926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3009 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2147483392 @@ -36151,10 +35939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3010 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -68719476736 @@ -36164,10 +35952,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3011 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -549755813888 @@ -36177,10 +35965,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3012 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3402823466385288598117041e14 @@ -36190,10 +35978,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3013 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -36203,10 +35991,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3025 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -36216,10 +36004,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3026 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -36229,10 +36017,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3027 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -36242,10 +36030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3028 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -36255,10 +36043,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3029 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -36268,10 +36056,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3030 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -36281,10 +36069,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3031 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -36294,10 +36082,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3032 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -36307,10 +36095,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3033 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -36320,10 +36108,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3034 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -36333,10 +36121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3037 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -36346,10 +36134,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3038 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36359,10 +36147,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3039 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -36372,10 +36160,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3040 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -36385,10 +36173,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3041 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -36398,10 +36186,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3050 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -36411,10 +36199,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3051 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -36424,10 +36212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3052 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -36437,10 +36225,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3053 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -36450,10 +36238,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3054 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -36463,10 +36251,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3055 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -36476,10 +36264,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3056 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -36489,10 +36277,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3057 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -36502,10 +36290,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3058 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -36515,10 +36303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3059 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36528,10 +36316,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3062 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36541,10 +36329,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3063 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36554,10 +36342,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3064 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -36567,10 +36355,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3065 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -36580,10 +36368,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3066 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -36593,10 +36381,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -36606,10 +36394,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -36619,10 +36407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -36632,10 +36420,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -36645,10 +36433,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -36658,10 +36446,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3083 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -36671,10 +36459,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3084 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -36684,10 +36472,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -36697,10 +36485,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -36710,10 +36498,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -36723,10 +36511,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3090 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36736,10 +36524,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3091 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -36749,10 +36537,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3092 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -36762,10 +36550,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3093 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -36775,10 +36563,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3094 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -36788,10 +36576,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3095 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -36801,10 +36589,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3096 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -36814,10 +36602,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-323 @@ -36827,10 +36615,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5e-323 @@ -36840,10 +36628,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -36853,10 +36641,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5e-324 @@ -36866,10 +36654,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -36879,10 +36667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.9999999999999998 @@ -36892,10 +36680,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -36905,10 +36693,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.0000000000000004 @@ -36918,10 +36706,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -36931,10 +36719,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -36944,10 +36732,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1797693134862315708145274e284 @@ -36957,10 +36745,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -36970,10 +36758,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 179769313486231490980915e285 @@ -36983,10 +36771,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862314111473026e284 @@ -36996,10 +36784,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862313313136902e284 @@ -37009,10 +36797,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862312514800778e284 @@ -37022,10 +36810,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862311716464655e284 @@ -37035,10 +36823,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862310918128531e284 @@ -37048,10 +36836,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862310119792407e284 @@ -37061,10 +36849,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862309321456283e284 @@ -37074,10 +36862,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862308523120159e284 @@ -37087,10 +36875,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862307724784036e284 @@ -37100,10 +36888,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507203e-308 @@ -37113,10 +36901,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507205e-308 @@ -37126,10 +36914,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507207e-308 @@ -37139,10 +36927,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507209e-308 @@ -37152,10 +36940,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507211e-308 @@ -37165,10 +36953,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072127e-308 @@ -37178,10 +36966,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072147e-308 @@ -37191,10 +36979,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072167e-308 @@ -37204,10 +36992,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072187e-308 @@ -37217,10 +37005,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072207e-308 @@ -37230,10 +37018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072226e-308 @@ -37243,10 +37031,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072246e-308 @@ -37256,10 +37044,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072266e-308 @@ -37269,10 +37057,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072286e-308 @@ -37282,10 +37070,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 92.35130391890645 @@ -37295,10 +37083,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 93.3599596388916 @@ -37308,10 +37096,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 95.42049628886124 @@ -37321,10 +37109,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 95.87916941885449 @@ -37334,10 +37122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 96.84804174884022 @@ -37347,10 +37135,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.43639050883155 @@ -37360,10 +37148,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.50957979883047 @@ -37373,10 +37161,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.80496893882612 @@ -37386,10 +37174,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 98.2751822888192 @@ -37399,10 +37187,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 99.47293564880155 @@ -37412,10 +37200,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.57047130878539 @@ -37425,10 +37213,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.60954608878481 @@ -37438,10 +37226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.67909109878379 @@ -37451,10 +37239,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 101.12268095877725 @@ -37464,10 +37252,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 101.3027691287746 @@ -37477,10 +37265,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.45932313565507e-307 @@ -37490,10 +37278,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.610957305180409e-307 @@ -37503,10 +37291,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.8073887977408524e-307 @@ -37516,10 +37304,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.026137080471427e-307 @@ -37529,10 +37317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8.438697769194972e-307 @@ -37542,10 +37330,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1607792515836795e-306 @@ -37555,10 +37343,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.2827413827423193e-306 @@ -37568,10 +37356,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.7116604596087457e-306 @@ -37581,10 +37369,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.038173251686994e-306 @@ -37594,10 +37382,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.171572060856931e-306 @@ -37607,10 +37395,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.4681399631804094e-306 @@ -37620,10 +37408,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.5175533964200588e-306 @@ -37633,10 +37421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.6461505468829625e-306 @@ -37646,10 +37434,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.8167076367720413e-306 @@ -37659,10 +37447,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.5743220778562766e-306 @@ -37672,10 +37460,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -37685,10 +37473,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -37698,10 +37486,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -37711,10 +37499,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -37724,10 +37512,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -37737,10 +37525,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3176 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -37750,10 +37538,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -37763,10 +37551,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3178 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -37776,10 +37564,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -37789,10 +37577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -37802,10 +37590,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -37815,10 +37603,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37828,10 +37616,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -37841,10 +37629,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -37854,10 +37642,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -37867,10 +37655,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37880,10 +37668,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37893,10 +37681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -37906,10 +37694,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -37919,10 +37707,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.203895392974451e-45 @@ -37932,10 +37720,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -37945,10 +37733,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -37958,10 +37746,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -37971,10 +37759,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3402823466385288598117041e14 @@ -37984,10 +37772,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999998807907104 @@ -37997,10 +37785,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999999403953552 @@ -38010,10 +37798,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.999999761581421 @@ -38023,10 +37811,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.9999998807907104 @@ -38036,10 +37824,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -38049,10 +37837,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.000000238418579 @@ -38062,10 +37850,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.000000238418579 @@ -38075,10 +37863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.000000476837158 @@ -38088,10 +37876,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -38101,10 +37889,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -38114,10 +37902,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -38127,10 +37915,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -38140,10 +37928,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -38153,10 +37941,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -38166,10 +37954,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -38179,10 +37967,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -38192,10 +37980,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -38205,10 +37993,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -38218,10 +38006,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -38231,10 +38019,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -38244,10 +38032,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38257,10 +38045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -38270,10 +38058,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -38283,10 +38071,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -38296,10 +38084,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -38309,10 +38097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3263 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -38322,10 +38110,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -38335,10 +38123,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -38348,10 +38136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -38361,10 +38149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -38374,10 +38162,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3268 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -38387,10 +38175,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -38400,10 +38188,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -38413,10 +38201,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -38426,10 +38214,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -38439,10 +38227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1175870895385742e-08 @@ -38452,10 +38240,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4901161193847656e-08 @@ -38465,10 +38253,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -38478,10 +38266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -38491,10 +38279,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -38504,10 +38292,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -38517,10 +38305,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -38530,10 +38318,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -38543,10 +38331,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -38556,10 +38344,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1175870895385742e-08 @@ -38569,10 +38357,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.4901161193847656e-08 @@ -38582,10 +38370,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -38595,10 +38383,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -38608,10 +38396,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -38621,10 +38409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -38634,10 +38422,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -38647,10 +38435,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -38660,10 +38448,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -38673,10 +38461,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -38686,10 +38474,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -38699,10 +38487,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -38712,10 +38500,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -38725,10 +38513,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -38738,10 +38526,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -38751,10 +38539,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -38764,10 +38552,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -38777,10 +38565,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -38790,10 +38578,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3311 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -38803,10 +38591,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -38816,10 +38604,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -38829,10 +38617,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -38842,10 +38630,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -38855,10 +38643,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -38868,10 +38656,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -38881,10 +38669,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -38894,10 +38682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -38907,10 +38695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38920,10 +38708,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -38933,10 +38721,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -38946,10 +38734,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -38959,10 +38747,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -38972,10 +38760,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -38985,10 +38773,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -38998,10 +38786,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -39011,10 +38799,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -39024,10 +38812,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -39037,10 +38825,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -39050,10 +38838,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -39063,10 +38851,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -39076,10 +38864,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -39089,10 +38877,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3346 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -39102,10 +38890,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -39115,10 +38903,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -39128,10 +38916,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -39141,10 +38929,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3350 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -39153,10 +38941,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3362 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -39165,10 +38953,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3363 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -39177,10 +38965,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -39189,10 +38977,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3365 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -39201,10 +38989,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3366 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -39213,10 +39001,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3367 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -39225,10 +39013,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -39237,10 +39025,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -39249,10 +39037,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3370 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -39261,10 +39049,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -39273,10 +39061,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3374 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39285,10 +39073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -39297,10 +39085,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39309,10 +39097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -39321,10 +39109,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39333,10 +39121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39345,10 +39133,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -39357,10 +39145,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -39369,10 +39157,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -39381,10 +39169,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -39393,10 +39181,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -39405,10 +39193,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -39417,10 +39205,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -39429,10 +39217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -39441,10 +39229,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -39453,10 +39241,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -39465,10 +39253,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -39477,10 +39265,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -39489,10 +39277,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -39501,10 +39289,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3401 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -39513,10 +39301,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -39525,10 +39313,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3403 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -39537,10 +39325,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3404 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -39549,10 +39337,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -39561,10 +39349,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3406 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -39573,10 +39361,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3409 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -39585,10 +39373,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3410 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -39597,10 +39385,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3411 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -39609,10 +39397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -39621,10 +39409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -39633,10 +39421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -39645,10 +39433,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -39657,10 +39445,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -39669,10 +39457,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -39681,10 +39469,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -39693,10 +39481,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -39705,10 +39493,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -39717,10 +39505,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -39729,10 +39517,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3422 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -39741,10 +39529,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3423 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -39754,10 +39542,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39767,10 +39555,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -39780,10 +39568,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295 @@ -39793,10 +39581,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967294 @@ -39806,10 +39594,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+60 @@ -39819,10 +39607,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+60 @@ -39832,10 +39620,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.e+60 @@ -39845,10 +39633,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3434 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+24 @@ -39858,10 +39646,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3435 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -39871,10 +39659,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3436 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39884,10 +39672,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3437 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -39897,10 +39685,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39909,10 +39697,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39921,10 +39709,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39933,10 +39721,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -128 @@ -39945,10 +39733,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295 @@ -39957,10 +39745,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295.5 @@ -39969,10 +39757,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967296 @@ -39981,10 +39769,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967297 @@ -39993,10 +39781,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40005,10 +39793,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40017,10 +39805,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9007199254740991 @@ -40029,10 +39817,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -9007199254740991 @@ -40041,10 +39829,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -40053,10 +39841,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -40065,10 +39853,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1797693134862315708145274e284 @@ -40077,10 +39865,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.220446049250313e-16 @@ -40089,10 +39877,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -40102,10 +39890,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3461 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -40115,10 +39903,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3462 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -40128,10 +39916,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3463 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -40141,10 +39929,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3464 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -40154,10 +39942,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3466 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -40167,10 +39955,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3467 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -40180,10 +39968,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3468 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -40193,10 +39981,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3469 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -40206,10 +39994,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -40219,10 +40007,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -40232,10 +40020,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -40245,10 +40033,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -40258,10 +40046,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -40271,10 +40059,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -40284,10 +40072,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -40297,10 +40085,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -40310,10 +40098,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -40323,10 +40111,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -40336,10 +40124,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -40349,10 +40137,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40362,10 +40150,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40375,10 +40163,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40388,10 +40176,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40401,10 +40189,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40414,10 +40202,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40427,10 +40215,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -40440,10 +40228,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 57055 @@ -40457,10 +40245,10 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -40470,10 +40258,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3498 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40483,10 +40271,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3499 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40497,10 +40285,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3500 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40511,10 +40299,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40525,10 +40313,10 @@ f32.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -40538,10 +40326,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3503 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -40551,10 +40339,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3504 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -40564,10 +40352,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3505 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -40577,10 +40365,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -40590,10 +40378,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -40603,10 +40391,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -40616,10 +40404,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -40629,10 +40417,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -40642,10 +40430,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 10 @@ -40655,10 +40443,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 10 @@ -40668,10 +40456,10 @@ f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -40681,10 +40469,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3517 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40694,10 +40482,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40708,10 +40496,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40722,10 +40510,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40736,10 +40524,10 @@ f64.eq if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40749,10 +40537,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40762,10 +40550,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -40775,10 +40563,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -40788,10 +40576,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -40801,10 +40589,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40814,10 +40602,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -40827,10 +40615,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -40840,10 +40628,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -40853,10 +40641,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 10 @@ -40866,10 +40654,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 10 @@ -40879,10 +40667,10 @@ f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index e56de62614..ed77e58bee 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -31,7 +31,7 @@ (import "Math" "PI" (global $~lib/bindings/Math/PI f64)) (import "Math" "SQRT1_2" (global $~lib/bindings/Math/SQRT1_2 f64)) (import "Math" "SQRT2" (global $~lib/bindings/Math/SQRT2 f64)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "Math" "abs" (func $~lib/bindings/Math/abs (param f64) (result f64))) (import "Math" "acos" (func $~lib/bindings/Math/acos (param f64) (result f64))) (import "Math" "acosh" (func $~lib/bindings/Math/acosh (param f64) (result f64))) @@ -62,10 +62,10 @@ (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 40) " \00\00\00\00\00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 104) "(\00\00\00\04\00\00\00") - (data (i32.const 112) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 48) "\0f\00\00\00 \00\00\00\00\00\00\00\00\00\00\00)\15DNn\83\f9\a2\c0\dd4\f5\d1W\'\fcA\90C<\99\95b\dba\c5\bb\de\abcQ\fe") + (data (i32.const 96) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00@\00\00\00@\00\00\00 \00\00\00\04\00\00\00") + (data (i32.const 128) "\10\00\00\00\18\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/math/js i32 (i32.const 1)) @@ -90,7 +90,7 @@ (global $~lib/math/NativeMathf.SQRT2 f32 (f32.const 1.4142135381698608)) (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 104)) + (global $~lib/math/PIO2_TABLE i32 (i32.const 112)) (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)) @@ -102,9 +102,7 @@ (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) (global $~lib/builtins/f32.MIN_VALUE f32 (f32.const 1.401298464324817e-45)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 140)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/builtins/isNaN (; 30 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 @@ -237,16 +235,14 @@ f64.mul ) (func $std/math/ulperr (; 34 ;) (type $FUNCSIG$dddd) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - (local $3 i32) - (local $4 f64) + (local $3 f64) local.get $0 call $~lib/builtins/isNaN - local.tee $3 if (result i32) local.get $1 call $~lib/builtins/isNaN else - local.get $3 + i32.const 0 end if f64.const 0 @@ -258,14 +254,14 @@ if block $~lib/math/NativeMath.signbit|inlined.2 (result i32) local.get $0 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i64.reinterpret_f64 i64.const 63 i64.shr_u i32.wrap_i64 - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.eq i32.and end @@ -273,14 +269,14 @@ i32.ne block $~lib/math/NativeMath.signbit|inlined.3 (result i32) local.get $1 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i64.reinterpret_f64 i64.const 63 i64.shr_u i32.wrap_i64 - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.eq i32.and end @@ -478,16 +474,14 @@ f32.mul ) (func $std/math/ulperrf (; 40 ;) (type $FUNCSIG$ffff) (param $0 f32) (param $1 f32) (param $2 f32) (result f32) - (local $3 i32) - (local $4 f32) + (local $3 f32) local.get $0 call $~lib/builtins/isNaN - local.tee $3 if (result i32) local.get $1 call $~lib/builtins/isNaN else - local.get $3 + i32.const 0 end if f32.const 0 @@ -499,13 +493,13 @@ if block $~lib/math/NativeMathf.signbit|inlined.2 (result i32) local.get $0 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -513,13 +507,13 @@ i32.ne block $~lib/math/NativeMathf.signbit|inlined.3 (result i32) local.get $1 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -608,7 +602,6 @@ ) (func $std/math/test_abs (; 44 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.abs|inlined.0 (result f64) local.get $0 local.set $4 @@ -619,13 +612,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/abs @@ -635,7 +626,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_absf (; 45 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -853,20 +844,17 @@ f64.mul ) (func $std/math/test_acos (; 48 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.acos local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/acos @@ -876,7 +864,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/Rf (; 49 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -1085,9 +1073,8 @@ local.get $2 i32.const 1071284858 i32.lt_u - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $2 i32.const 31 @@ -1301,7 +1288,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -1309,8 +1296,7 @@ (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) - (local $13 i32) + (local $12 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -1324,9 +1310,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -1384,7 +1369,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -1392,7 +1376,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -1435,46 +1419,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -1483,28 +1467,28 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 local.get $3 - local.set $13 - local.get $7 + local.set $12 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul - local.get $13 + local.get $12 f64.convert_i32_s f64.const 1.9082149292705877e-10 f64.mul f64.add - local.get $6 - f64.sub local.get $5 + f64.sub + local.get $4 f64.add - local.get $13 + local.get $12 f64.convert_i32_s f64.const 0.6931471803691238 f64.mul @@ -1575,20 +1559,17 @@ f64.add ) (func $std/math/test_acosh (; 55 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.acosh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/acosh @@ -1598,7 +1579,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.log1p (; 56 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -1606,8 +1587,8 @@ (local $2 f32) (local $3 f32) (local $4 i32) - (local $5 i32) - (local $6 f32) + (local $5 f32) + (local $6 i32) (local $7 f32) (local $8 f32) (local $9 f32) @@ -1628,9 +1609,8 @@ local.get $1 i32.const 1054086096 i32.lt_u - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $1 i32.const 31 @@ -1693,17 +1673,17 @@ f32.const 1 local.get $0 f32.add - local.set $6 - local.get $6 - i32.reinterpret_f32 local.set $5 local.get $5 + i32.reinterpret_f32 + local.set $6 + local.get $6 i32.const 1065353216 i32.const 1060439283 i32.sub i32.add - local.set $5 - local.get $5 + local.set $6 + local.get $6 i32.const 23 i32.shr_u i32.const 127 @@ -1718,33 +1698,33 @@ i32.ge_s if (result f32) f32.const 1 - local.get $6 + local.get $5 local.get $0 f32.sub f32.sub else local.get $0 - local.get $6 + local.get $5 f32.const 1 f32.sub f32.sub end local.set $2 local.get $2 - local.get $6 + local.get $5 f32.div local.set $2 else f32.const 0 local.set $2 end - local.get $5 + local.get $6 i32.const 8388607 i32.and i32.const 1060439283 i32.add - local.set $5 - local.get $5 + local.set $6 + local.get $6 f32.reinterpret_i32 f32.const 1 f32.sub @@ -1816,7 +1796,7 @@ (func $~lib/math/NativeMathf.log (; 57 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 f32) (local $5 f32) (local $6 f32) @@ -1825,7 +1805,6 @@ (local $9 f32) (local $10 f32) (local $11 f32) - (local $12 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -1834,9 +1813,8 @@ local.get $1 i32.const 8388608 i32.lt_u - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $1 i32.const 31 @@ -1921,64 +1899,64 @@ local.get $0 f32.const 1 f32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 2 - local.get $4 + local.get $3 f32.add f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul local.set $5 local.get $5 local.get $5 f32.mul local.set $6 local.get $6 - local.get $6 - f32.mul - local.set $7 - local.get $7 f32.const 0.40000972151756287 - local.get $7 + local.get $6 f32.const 0.24279078841209412 f32.mul f32.add f32.mul - local.set $8 - local.get $6 + local.set $7 + local.get $5 f32.const 0.6666666269302368 - local.get $7 + local.get $6 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.set $9 - local.get $9 + local.set $8 local.get $8 + local.get $7 f32.add - local.set $10 + local.set $9 f32.const 0.5 - local.get $4 + local.get $3 f32.mul - local.get $4 + local.get $3 f32.mul - local.set $11 + local.set $10 local.get $2 f32.convert_i32_s - local.set $12 - local.get $5 - local.get $11 + local.set $11 + local.get $4 local.get $10 + local.get $9 f32.add f32.mul - local.get $12 + local.get $11 f32.const 9.05800061445916e-06 f32.mul f32.add - local.get $11 + local.get $10 f32.sub - local.get $4 + local.get $3 f32.add - local.get $12 + local.get $11 f32.const 0.6931381225585938 f32.mul f32.add @@ -2112,13 +2090,12 @@ local.get $2 i32.const 1045430272 i32.lt_u - local.tee $3 if (result i32) local.get $2 i32.const 1048576 i32.ge_u else - local.get $3 + i32.const 0 end if local.get $0 @@ -2216,20 +2193,17 @@ local.get $0 ) (func $std/math/test_asin (; 61 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.asin local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/asin @@ -2239,15 +2213,14 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.asin (; 62 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 f32) (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f64) + (local $3 f32) + (local $4 f64) local.get $0 local.set $1 local.get $0 @@ -2284,13 +2257,12 @@ local.get $2 i32.const 964689920 i32.lt_u - local.tee $3 if (result i32) local.get $2 i32.const 8388608 i32.ge_u else - local.get $3 + i32.const 0 end if local.get $0 @@ -2312,18 +2284,18 @@ f32.const 0.5 f32.mul f32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 f64.promote_f32 f64.sqrt - local.set $5 + local.set $4 f32.const 1.5707963705062866 f64.promote_f32 f32.const 2 f64.promote_f32 - local.get $5 - local.get $5 local.get $4 + local.get $4 + local.get $3 call $~lib/math/Rf f64.promote_f32 f64.mul @@ -2427,20 +2399,17 @@ f64.copysign ) (func $std/math/test_asinh (; 65 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.asinh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/asinh @@ -2450,7 +2419,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.asinh (; 66 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -2816,20 +2785,17 @@ f64.copysign ) (func $std/math/test_atan (; 69 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.atan local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/atan @@ -2839,7 +2805,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.atan (; 70 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -3168,20 +3134,17 @@ f64.copysign ) (func $std/math/test_atanh (; 73 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.atanh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/atanh @@ -3191,7 +3154,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.atanh (; 74 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -3265,8 +3228,8 @@ call $std/math/check ) (func $~lib/math/NativeMath.atan2 (; 76 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) - (local $3 i64) + (local $2 i64) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3275,9 +3238,8 @@ (local $9 f64) local.get $1 call $~lib/builtins/isNaN - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 call $~lib/builtins/isNaN @@ -3290,30 +3252,30 @@ end local.get $1 i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.wrap_i64 - local.set $5 + local.set $4 local.get $0 i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 i64.const 32 i64.shr_u i32.wrap_i64 + local.set $5 + local.get $2 + i32.wrap_i64 local.set $6 local.get $3 - i32.wrap_i64 - local.set $7 - local.get $4 i32.const 1072693248 i32.sub - local.get $5 + local.get $4 i32.or i32.const 0 i32.eq @@ -3322,28 +3284,28 @@ call $~lib/math/NativeMath.atan return end - local.get $6 + local.get $5 i32.const 31 i32.shr_u i32.const 1 i32.and - local.get $4 + local.get $3 i32.const 30 i32.shr_u i32.const 2 i32.and i32.or - local.set $8 - local.get $4 + local.set $7 + local.get $3 i32.const 2147483647 i32.and - local.set $4 - local.get $6 + local.set $3 + local.get $5 i32.const 2147483647 i32.and - local.set $6 + local.set $5 + local.get $5 local.get $6 - local.get $7 i32.or i32.const 0 i32.eq @@ -3353,21 +3315,21 @@ block $case2|0 block $case1|0 block $case0|0 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|0 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|0 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|0 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|0 @@ -3385,13 +3347,13 @@ return end end + local.get $3 local.get $4 - local.get $5 i32.or i32.const 0 i32.eq if - local.get $8 + local.get $7 i32.const 1 i32.and if (result f64) @@ -3406,11 +3368,11 @@ end return end - local.get $4 + local.get $3 i32.const 2146435072 i32.eq if - local.get $6 + local.get $5 i32.const 2146435072 i32.eq if @@ -3419,21 +3381,21 @@ block $case2|1 block $case1|1 block $case0|1 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|1 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|1 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|1 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|1 @@ -3470,21 +3432,21 @@ block $case2|2 block $case1|2 block $case0|2 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|2 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|2 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|2 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|2 @@ -3505,23 +3467,22 @@ end end end - local.get $4 + local.get $3 i32.const 64 i32.const 20 i32.shl i32.add - local.get $6 + local.get $5 i32.lt_u - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else - local.get $6 + local.get $5 i32.const 2146435072 i32.eq end if - local.get $8 + local.get $7 i32.const 1 i32.and if (result f64) @@ -3536,20 +3497,19 @@ end return end - local.get $8 + local.get $7 i32.const 2 i32.and - local.tee $2 if (result i32) - local.get $6 + local.get $5 i32.const 64 i32.const 20 i32.shl i32.add - local.get $4 + local.get $3 i32.lt_u else - local.get $2 + i32.const 0 end if f64.const 0 @@ -3567,21 +3527,21 @@ block $case2|3 block $case1|3 block $case0|3 + local.get $7 + local.set $8 local.get $8 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|3 - local.get $2 + local.get $8 i32.const 1 i32.eq br_if $case1|3 - local.get $2 + local.get $8 i32.const 2 i32.eq br_if $case2|3 - local.get $2 + local.get $8 i32.const 3 i32.eq br_if $case3|3 @@ -3612,7 +3572,6 @@ f64.const 0 ) (func $std/math/test_atan2 (; 77 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.atan2 @@ -3620,13 +3579,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 local.get $1 @@ -3637,7 +3594,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $~lib/math/NativeMathf.atan2 (; 78 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -3648,9 +3605,8 @@ (local $6 f32) local.get $1 call $~lib/builtins/isNaN - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $0 call $~lib/builtins/isNaN @@ -3663,11 +3619,11 @@ end local.get $1 i32.reinterpret_f32 - local.set $3 + local.set $2 local.get $0 i32.reinterpret_f32 - local.set $4 - local.get $3 + local.set $3 + local.get $2 i32.const 1065353216 i32.eq if @@ -3675,27 +3631,27 @@ call $~lib/math/NativeMathf.atan return end - local.get $4 + local.get $3 i32.const 31 i32.shr_u i32.const 1 i32.and - local.get $3 + local.get $2 i32.const 30 i32.shr_u i32.const 2 i32.and i32.or - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 2147483647 i32.and - local.set $3 - local.get $4 + local.set $2 + local.get $3 i32.const 2147483647 i32.and - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.const 0 i32.eq if @@ -3704,21 +3660,21 @@ block $case2|0 block $case1|0 block $case0|0 + local.get $4 + local.set $5 local.get $5 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|0 - local.get $2 + local.get $5 i32.const 1 i32.eq br_if $case1|0 - local.get $2 + local.get $5 i32.const 2 i32.eq br_if $case2|0 - local.get $2 + local.get $5 i32.const 3 i32.eq br_if $case3|0 @@ -3736,11 +3692,11 @@ return end end - local.get $3 + local.get $2 i32.const 0 i32.eq if - local.get $5 + local.get $4 i32.const 1 i32.and if (result f32) @@ -3755,11 +3711,11 @@ end return end - local.get $3 + local.get $2 i32.const 2139095040 i32.eq if - local.get $4 + local.get $3 i32.const 2139095040 i32.eq if @@ -3768,21 +3724,21 @@ block $case2|1 block $case1|1 block $case0|1 + local.get $4 + local.set $5 local.get $5 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|1 - local.get $2 + local.get $5 i32.const 1 i32.eq br_if $case1|1 - local.get $2 + local.get $5 i32.const 2 i32.eq br_if $case2|1 - local.get $2 + local.get $5 i32.const 3 i32.eq br_if $case3|1 @@ -3819,21 +3775,21 @@ block $case2|2 block $case1|2 block $case0|2 + local.get $4 + local.set $5 local.get $5 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|2 - local.get $2 + local.get $5 i32.const 1 i32.eq br_if $case1|2 - local.get $2 + local.get $5 i32.const 2 i32.eq br_if $case2|2 - local.get $2 + local.get $5 i32.const 3 i32.eq br_if $case3|2 @@ -3854,23 +3810,22 @@ end end end - local.get $3 + local.get $2 i32.const 26 i32.const 23 i32.shl i32.add - local.get $4 + local.get $3 i32.lt_u - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else - local.get $4 + local.get $3 i32.const 2139095040 i32.eq end if - local.get $5 + local.get $4 i32.const 1 i32.and if (result f32) @@ -3885,20 +3840,19 @@ end return end - local.get $5 + local.get $4 i32.const 2 i32.and - local.tee $2 if (result i32) - local.get $4 + local.get $3 i32.const 26 i32.const 23 i32.shl i32.add - local.get $3 + local.get $2 i32.lt_u else - local.get $2 + i32.const 0 end if f32.const 0 @@ -3916,21 +3870,21 @@ block $case2|3 block $case1|3 block $case0|3 + local.get $4 + local.set $5 local.get $5 - local.set $2 - local.get $2 i32.const 0 i32.eq br_if $case0|3 - local.get $2 + local.get $5 i32.const 1 i32.eq br_if $case1|3 - local.get $2 + local.get $5 i32.const 2 i32.eq br_if $case2|3 - local.get $2 + local.get $5 i32.const 3 i32.eq br_if $case3|3 @@ -4114,20 +4068,17 @@ local.get $3 ) (func $std/math/test_cbrt (; 81 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.cbrt local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/cbrt @@ -4137,7 +4088,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.cbrt (; 82 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -4266,7 +4217,6 @@ ) (func $std/math/test_ceil (; 84 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.ceil|inlined.0 (result f64) local.get $0 local.set $4 @@ -4277,13 +4227,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/ceil @@ -4293,7 +4241,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_ceilf (; 85 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -4310,24 +4258,13 @@ call $std/math/check ) (func $~lib/array/Array#__unchecked_get (; 86 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 i32.const 3 i32.shl i32.add - local.get $4 - i32.add - i64.load offset=8 + i64.load ) (func $~lib/math/NativeMathf.cos (; 87 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) @@ -4717,10 +4654,10 @@ local.get $0 local.set $8 local.get $1 - local.set $9 - local.get $2 local.set $10 - local.get $9 + local.get $2 + local.set $9 + local.get $10 i32.const 1305022427 i32.lt_u if @@ -4748,7 +4685,7 @@ block $~lib/math/pio2_large_quot|inlined.0 (result i32) local.get $8 local.set $11 - local.get $9 + local.get $10 local.set $12 local.get $12 i32.const 23 @@ -4764,13 +4701,13 @@ i32.const 63 i32.and local.set $15 - i32.const 104 + i32.const 112 local.get $14 i32.const 0 i32.add call $~lib/array/Array#__unchecked_get local.set $16 - i32.const 104 + i32.const 112 local.get $14 i32.const 1 i32.add @@ -4780,7 +4717,7 @@ i32.const 32 i32.gt_s if - i32.const 104 + i32.const 112 local.get $14 i32.const 2 i32.add @@ -4868,7 +4805,7 @@ local.get $23 i32.sub local.get $23 - local.get $10 + local.get $9 select end local.set $24 @@ -4986,7 +4923,6 @@ (local $13 f64) (local $14 f64) (local $15 f64) - (local $16 i32) local.get $0 i64.reinterpret_f64 local.set $1 @@ -5214,9 +5150,8 @@ local.get $3 i32.const 0 i32.lt_s - local.tee $16 if (result i32) - local.get $16 + i32.const 1 else local.get $3 i32.const 56 @@ -5545,20 +5480,17 @@ local.get $3 ) (func $std/math/test_cosh (; 92 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.cosh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/cosh @@ -5568,7 +5500,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.expm1 (; 93 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -5586,7 +5518,6 @@ (local $12 f32) (local $13 f32) (local $14 f32) - (local $15 i32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -5797,9 +5728,8 @@ local.get $6 i32.const 0 i32.lt_s - local.tee $15 if (result i32) - local.get $15 + i32.const 1 else local.get $6 i32.const 56 @@ -6102,20 +6032,17 @@ call $std/math/check ) (func $std/math/test_exp (; 97 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.exp local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/exp @@ -6125,7 +6052,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $std/math/test_expf (; 98 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6137,20 +6064,17 @@ call $std/math/check ) (func $std/math/test_expm1 (; 99 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.expm1 local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/expm1 @@ -6160,7 +6084,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $std/math/test_expm1f (; 100 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6173,7 +6097,6 @@ ) (func $std/math/test_floor (; 101 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.floor|inlined.0 (result f64) local.get $0 local.set $4 @@ -6184,13 +6107,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/floor @@ -6200,7 +6121,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_floorf (; 102 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6222,7 +6143,7 @@ (local $4 i64) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f64) (local $8 f64) (local $9 f64) (local $10 f64) @@ -6230,7 +6151,6 @@ (local $12 f64) (local $13 f64) (local $14 f64) - (local $15 f64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -6282,9 +6202,8 @@ local.get $5 i32.const 2047 i32.eq - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $3 i64.const 0 @@ -6306,7 +6225,7 @@ return end f64.const 1 - local.set $8 + local.set $7 local.get $5 i32.const 1023 i32.const 510 @@ -6314,7 +6233,7 @@ i32.gt_s if f64.const 5260135901548373507240989e186 - local.set $8 + local.set $7 local.get $0 f64.const 1.90109156629516e-211 f64.mul @@ -6331,7 +6250,7 @@ i32.lt_s if f64.const 1.90109156629516e-211 - local.set $8 + local.set $7 local.get $0 f64.const 5260135901548373507240989e186 f64.mul @@ -6345,80 +6264,79 @@ local.get $0 f64.const 134217729 f64.mul - local.set $9 + local.set $8 local.get $0 - local.get $9 + local.get $8 f64.sub - local.get $9 + local.get $8 f64.add - local.set $10 + local.set $9 local.get $0 - local.get $10 + local.get $9 f64.sub - local.set $11 + local.set $10 local.get $0 local.get $0 f64.mul - local.set $12 - local.get $10 - local.get $10 + local.set $11 + local.get $9 + local.get $9 f64.mul - local.get $12 + local.get $11 f64.sub f64.const 2 - local.get $10 + local.get $9 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add - local.set $13 + local.set $12 local.get $1 f64.const 134217729 f64.mul - local.set $9 + local.set $8 local.get $1 - local.get $9 + local.get $8 f64.sub - local.get $9 + local.get $8 f64.add - local.set $10 + local.set $9 local.get $1 - local.get $10 + local.get $9 f64.sub - local.set $11 + local.set $10 local.get $1 local.get $1 f64.mul - local.set $14 - local.get $10 - local.get $10 + local.set $13 + local.get $9 + local.get $9 f64.mul - local.get $14 + local.get $13 f64.sub f64.const 2 - local.get $10 + local.get $9 f64.mul - local.get $11 + local.get $10 f64.add - local.get $11 + local.get $10 f64.mul f64.add - local.set $15 - local.get $8 - local.get $15 - local.get $13 - f64.add + local.set $14 + local.get $7 local.get $14 - f64.add local.get $12 f64.add + local.get $13 + f64.add + local.get $11 + f64.add f64.sqrt f64.mul ) (func $std/math/test_hypot (; 104 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.hypot @@ -6426,13 +6344,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 local.get $1 @@ -6443,7 +6359,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $~lib/math/NativeMathf.hypot (; 105 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -6496,17 +6412,15 @@ i32.const 23 i32.shl i32.ge_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $3 i32.const 0 i32.eq end - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 local.get $3 @@ -6589,20 +6503,17 @@ call $std/math/check ) (func $std/math/test_log (; 107 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.log local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/log @@ -6612,7 +6523,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $std/math/test_logf (; 108 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -6627,7 +6538,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -6641,7 +6552,6 @@ (local $15 f64) (local $16 f64) (local $17 f64) - (local $18 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -6655,9 +6565,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -6715,7 +6624,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -6723,7 +6631,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -6766,46 +6674,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -6814,16 +6722,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -6832,75 +6740,72 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 0.4342944818781689 f64.mul - local.set $15 + local.set $14 local.get $3 f64.convert_i32_s - local.set $16 - local.get $16 + local.set $15 + local.get $15 f64.const 0.30102999566361177 f64.mul - local.set $17 - local.get $16 + local.set $16 + local.get $15 f64.const 3.694239077158931e-13 f64.mul - local.get $14 local.get $13 + local.get $12 f64.add f64.const 2.5082946711645275e-11 f64.mul f64.add - local.get $14 + local.get $13 f64.const 0.4342944818781689 f64.mul f64.add - local.set $18 - local.get $17 - local.get $15 + local.set $17 + local.get $16 + local.get $14 f64.add - local.set $9 - local.get $18 + local.set $8 local.get $17 - local.get $9 + local.get $16 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $18 - local.get $18 - local.get $9 + local.set $17 + local.get $17 + local.get $8 f64.add ) (func $std/math/test_log10 (; 110 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.log10 local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/log10 @@ -6910,13 +6815,13 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.log10 (; 111 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 f32) (local $5 f32) (local $6 f32) @@ -6927,7 +6832,6 @@ (local $11 f32) (local $12 f32) (local $13 f32) - (local $14 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -6936,9 +6840,8 @@ local.get $1 i32.const 8388608 i32.lt_u - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $1 i32.const 31 @@ -7023,52 +6926,52 @@ local.get $0 f32.const 1 f32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 2 - local.get $4 + local.get $3 f32.add f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul local.set $5 local.get $5 local.get $5 f32.mul local.set $6 local.get $6 - local.get $6 - f32.mul - local.set $7 - local.get $7 f32.const 0.40000972151756287 - local.get $7 + local.get $6 f32.const 0.24279078841209412 f32.mul f32.add f32.mul - local.set $8 - local.get $6 + local.set $7 + local.get $5 f32.const 0.6666666269302368 - local.get $7 + local.get $6 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.set $9 - local.get $9 + local.set $8 local.get $8 + local.get $7 f32.add - local.set $10 + local.set $9 f32.const 0.5 - local.get $4 + local.get $3 f32.mul - local.get $4 + local.get $3 f32.mul + local.set $10 + local.get $3 + local.get $10 + f32.sub local.set $11 - local.get $4 local.get $11 - f32.sub - local.set $12 - local.get $12 i32.reinterpret_f32 local.set $1 local.get $1 @@ -7077,40 +6980,40 @@ local.set $1 local.get $1 f32.reinterpret_i32 - local.set $12 - local.get $4 - local.get $12 - f32.sub + local.set $11 + local.get $3 local.get $11 f32.sub - local.get $5 - local.get $11 local.get $10 + f32.sub + local.get $4 + local.get $10 + local.get $9 f32.add f32.mul f32.add - local.set $13 + local.set $12 local.get $2 f32.convert_i32_s - local.set $14 - local.get $14 + local.set $13 + local.get $13 f32.const 7.903415166765626e-07 f32.mul - local.get $13 local.get $12 + local.get $11 f32.add f32.const -3.168997136526741e-05 f32.mul f32.add - local.get $13 + local.get $12 f32.const 0.434326171875 f32.mul f32.add - local.get $12 + local.get $11 f32.const 0.434326171875 f32.mul f32.add - local.get $14 + local.get $13 f32.const 0.3010292053222656 f32.mul f32.add @@ -7124,20 +7027,17 @@ call $std/math/check ) (func $std/math/test_log1p (; 113 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.log1p local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/log1p @@ -7147,7 +7047,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $std/math/test_log1pf (; 114 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -7162,7 +7062,7 @@ (local $1 i64) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) (local $6 f64) (local $7 f64) @@ -7175,7 +7075,6 @@ (local $14 f64) (local $15 f64) (local $16 f64) - (local $17 f64) local.get $0 i64.reinterpret_f64 local.set $1 @@ -7189,9 +7088,8 @@ local.get $2 i32.const 1048576 i32.lt_u - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $2 i32.const 31 @@ -7249,7 +7147,6 @@ local.get $2 i32.const 1072693248 i32.eq - local.tee $4 if (result i32) local.get $1 i64.const 32 @@ -7257,7 +7154,7 @@ i64.const 0 i64.eq else - local.get $4 + i32.const 0 end if f64.const 0 @@ -7300,46 +7197,46 @@ local.get $0 f64.const 1 f64.sub - local.set $5 + local.set $4 f64.const 0.5 - local.get $5 + local.get $4 f64.mul - local.get $5 + local.get $4 f64.mul - local.set $6 - local.get $5 + local.set $5 + local.get $4 f64.const 2 - local.get $5 + local.get $4 f64.add f64.div + local.set $6 + local.get $6 + local.get $6 + f64.mul local.set $7 local.get $7 local.get $7 f64.mul local.set $8 local.get $8 - local.get $8 - f64.mul - local.set $9 - local.get $9 f64.const 0.3999999999940942 - local.get $9 + local.get $8 f64.const 0.22222198432149784 - local.get $9 + local.get $8 f64.const 0.15313837699209373 f64.mul f64.add f64.mul f64.add f64.mul - local.set $10 - local.get $8 + local.set $9 + local.get $7 f64.const 0.6666666666666735 - local.get $9 + local.get $8 f64.const 0.2857142874366239 - local.get $9 + local.get $8 f64.const 0.1818357216161805 - local.get $9 + local.get $8 f64.const 0.14798198605116586 f64.mul f64.add @@ -7348,16 +7245,16 @@ f64.mul f64.add f64.mul - local.set $11 - local.get $11 + local.set $10 local.get $10 + local.get $9 f64.add - local.set $12 + local.set $11 + local.get $4 local.get $5 - local.get $6 f64.sub - local.set $13 - local.get $13 + local.set $12 + local.get $12 i64.reinterpret_f64 local.set $1 local.get $1 @@ -7366,69 +7263,66 @@ local.set $1 local.get $1 f64.reinterpret_i64 - local.set $13 - local.get $5 - local.get $13 + local.set $12 + local.get $4 + local.get $12 f64.sub - local.get $6 + local.get $5 f64.sub - local.get $7 local.get $6 - local.get $12 + local.get $5 + local.get $11 f64.add f64.mul f64.add - local.set $14 - local.get $13 + local.set $13 + local.get $12 f64.const 1.4426950407214463 f64.mul - local.set $15 - local.get $14 + local.set $14 local.get $13 + local.get $12 f64.add f64.const 1.6751713164886512e-10 f64.mul - local.get $14 + local.get $13 f64.const 1.4426950407214463 f64.mul f64.add - local.set $16 + local.set $15 local.get $3 f64.convert_i32_s - local.set $17 - local.get $17 - local.get $15 + local.set $16 + local.get $16 + local.get $14 f64.add - local.set $9 + local.set $8 + local.get $15 local.get $16 - local.get $17 - local.get $9 + local.get $8 f64.sub - local.get $15 + local.get $14 f64.add f64.add - local.set $16 - local.get $9 local.set $15 - local.get $16 + local.get $8 + local.set $14 local.get $15 + local.get $14 f64.add ) (func $std/math/test_log2 (; 116 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.log2 local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/log2 @@ -7438,13 +7332,13 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.log2 (; 117 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f32) (local $4 f32) (local $5 f32) (local $6 f32) @@ -7453,10 +7347,9 @@ (local $9 f32) (local $10 f32) (local $11 f32) - (local $12 f32) - (local $13 i32) + (local $12 i32) + (local $13 f32) (local $14 f32) - (local $15 f32) local.get $0 i32.reinterpret_f32 local.set $1 @@ -7465,9 +7358,8 @@ local.get $1 i32.const 8388608 i32.lt_u - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $1 i32.const 31 @@ -7552,90 +7444,90 @@ local.get $0 f32.const 1 f32.sub - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 2 - local.get $4 + local.get $3 f32.add f32.div + local.set $4 + local.get $4 + local.get $4 + f32.mul local.set $5 local.get $5 local.get $5 f32.mul local.set $6 local.get $6 - local.get $6 - f32.mul - local.set $7 - local.get $7 f32.const 0.40000972151756287 - local.get $7 + local.get $6 f32.const 0.24279078841209412 f32.mul f32.add f32.mul - local.set $8 - local.get $6 + local.set $7 + local.get $5 f32.const 0.6666666269302368 - local.get $7 + local.get $6 f32.const 0.2849878668785095 f32.mul f32.add f32.mul - local.set $9 - local.get $9 + local.set $8 local.get $8 + local.get $7 f32.add - local.set $10 + local.set $9 f32.const 0.5 - local.get $4 + local.get $3 f32.mul - local.get $4 + local.get $3 f32.mul + local.set $10 + local.get $3 + local.get $10 + f32.sub local.set $11 - local.get $4 local.get $11 - f32.sub + i32.reinterpret_f32 local.set $12 local.get $12 - i32.reinterpret_f32 - local.set $13 - local.get $13 i32.const -4096 i32.and - local.set $13 - local.get $13 - f32.reinterpret_i32 local.set $12 - local.get $4 local.get $12 - f32.sub + f32.reinterpret_i32 + local.set $11 + local.get $3 local.get $11 f32.sub - local.get $5 - local.get $11 local.get $10 + f32.sub + local.get $4 + local.get $10 + local.get $9 f32.add f32.mul f32.add - local.set $14 + local.set $13 local.get $2 f32.convert_i32_s - local.set $15 - local.get $14 - local.get $12 + local.set $14 + local.get $13 + local.get $11 f32.add f32.const -1.7605285393074155e-04 f32.mul - local.get $14 + local.get $13 f32.const 1.44287109375 f32.mul f32.add - local.get $12 + local.get $11 f32.const 1.44287109375 f32.mul f32.add - local.get $15 + local.get $14 f32.add ) (func $std/math/test_log2f (; 118 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -7649,27 +7541,24 @@ (func $std/math/test_max (; 119 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) - (local $7 i32) block $~lib/math/NativeMath.max|inlined.0 (result f64) local.get $0 - local.set $5 - local.get $1 local.set $6 - local.get $5 + local.get $1 + local.set $5 local.get $6 + local.get $5 f64.max end local.get $2 local.get $3 local.get $4 call $std/math/check - local.tee $7 if (result i32) global.get $std/math/js i32.eqz - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $0 local.get $1 @@ -7680,7 +7569,7 @@ call $std/math/check end else - local.get $7 + i32.const 0 end ) (func $std/math/test_maxf (; 120 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) @@ -7688,11 +7577,11 @@ (local $6 f32) block $~lib/math/NativeMathf.max|inlined.0 (result f32) local.get $0 - local.set $5 - local.get $1 local.set $6 - local.get $5 + local.get $1 + local.set $5 local.get $6 + local.get $5 f32.max end local.get $2 @@ -7703,27 +7592,24 @@ (func $std/math/test_min (; 121 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) (local $5 f64) (local $6 f64) - (local $7 i32) block $~lib/math/NativeMath.min|inlined.0 (result f64) local.get $0 - local.set $5 - local.get $1 local.set $6 - local.get $5 + local.get $1 + local.set $5 local.get $6 + local.get $5 f64.min end local.get $2 local.get $3 local.get $4 call $std/math/check - local.tee $7 if (result i32) global.get $std/math/js i32.eqz - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $0 local.get $1 @@ -7734,7 +7620,7 @@ call $std/math/check end else - local.get $7 + i32.const 0 end ) (func $std/math/test_minf (; 122 ;) (type $FUNCSIG$iffffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 f32) (param $4 i32) (result i32) @@ -7742,11 +7628,11 @@ (local $6 f32) block $~lib/math/NativeMathf.min|inlined.0 (result f32) local.get $0 - local.set $5 - local.get $1 local.set $6 - local.get $5 + local.get $1 + local.set $5 local.get $6 + local.get $5 f32.min end local.get $2 @@ -7761,10 +7647,9 @@ (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i64) (local $10 i64) - (local $11 i64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -7794,45 +7679,38 @@ local.get $7 i64.const 0 i64.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f64.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 f64.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f64.div return end local.get $2 i64.const 1 i64.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i64.le_u if - local.get $10 + local.get $9 local.get $7 i64.eq if @@ -7968,13 +7846,13 @@ i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i64.shl local.set $2 local.get $4 @@ -8013,7 +7891,6 @@ f64.reinterpret_i64 ) (func $std/math/test_mod (; 124 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod @@ -8021,13 +7898,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 local.get $1 @@ -8038,7 +7913,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $~lib/math/NativeMathf.mod (; 125 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -8048,10 +7923,9 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $8 f32) + (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.reinterpret_f32 local.set $2 @@ -8081,45 +7955,38 @@ local.get $7 i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f32.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 f32.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f32.div return end local.get $2 i32.const 1 i32.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i32.le_u if - local.get $10 + local.get $9 local.get $7 i32.eq if @@ -8255,13 +8122,13 @@ i32.const 8 i32.shl i32.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i32.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i32.shl local.set $2 local.get $4 @@ -8389,44 +8256,39 @@ local.get $7 i32.const 2146435072 i32.gt_s - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $4 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.gt_s end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $6 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end if @@ -8436,7 +8298,7 @@ return end i32.const 0 - local.set $10 + local.set $9 local.get $3 i32.const 0 i32.lt_s @@ -8446,7 +8308,7 @@ i32.ge_s if i32.const 2 - local.set $10 + local.set $9 else local.get $8 i32.const 1072693248 @@ -8457,21 +8319,21 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 - local.get $11 + local.set $10 + local.get $10 i32.const 20 i32.gt_s - local.set $9 + local.set $11 i32.const 52 i32.const 20 - local.get $9 - select local.get $11 + select + local.get $10 i32.sub local.set $12 local.get $6 local.get $8 - local.get $9 + local.get $11 select local.set $13 local.get $13 @@ -8489,7 +8351,7 @@ i32.const 1 i32.and i32.sub - local.set $10 + local.set $9 end end end @@ -8592,17 +8454,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq end - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 1072693248 @@ -8627,7 +8487,7 @@ local.get $7 i32.const 1072693248 i32.sub - local.get $10 + local.get $9 i32.or i32.const 0 i32.eq @@ -8641,7 +8501,7 @@ f64.div local.set $16 else - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -8661,7 +8521,7 @@ i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 0 i32.eq if @@ -8674,7 +8534,7 @@ f64.div return end - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -8860,17 +8720,17 @@ i32.le_s if i32.const 0 - local.set $11 + local.set $10 else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 - local.set $11 + local.set $10 else i32.const 0 - local.set $11 + local.set $10 local.get $29 i32.const 1 i32.add @@ -8894,7 +8754,7 @@ local.set $15 f64.const 1.5 f64.const 1 - local.get $11 + local.get $10 select local.set $35 local.get $15 @@ -8926,7 +8786,7 @@ i32.or i32.const 524288 i32.add - local.get $11 + local.get $10 i32.const 18 i32.shl i32.add @@ -9049,7 +8909,7 @@ local.set $36 f64.const 1.350039202129749e-08 f64.const 0 - local.get $11 + local.get $10 select local.set $37 f64.const -7.028461650952758e-09 @@ -9067,7 +8927,7 @@ local.set $24 f64.const 0.5849624872207642 f64.const 0 - local.get $11 + local.get $10 select local.set $39 local.get $36 @@ -9212,7 +9072,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 i32.const 0 local.set $29 local.get $41 @@ -9221,7 +9081,7 @@ if local.get $28 i32.const 1048576 - local.get $11 + local.get $10 i32.const 1 i32.add i32.shr_s @@ -9234,12 +9094,12 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 f64.const 0 local.set $24 local.get $29 i32.const 1048575 - local.get $11 + local.get $10 i32.shr_s i32.const -1 i32.xor @@ -9255,7 +9115,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $11 + local.get $10 i32.sub i32.shr_s local.set $29 @@ -9395,7 +9255,6 @@ f64.mul ) (func $std/math/test_pow (; 128 ;) (type $FUNCSIG$iddddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 i32) (result i32) - (local $5 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.pow @@ -9403,13 +9262,11 @@ local.get $3 local.get $4 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 local.get $1 @@ -9420,7 +9277,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $~lib/math/NativeMathf.pow (; 129 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) @@ -9483,9 +9340,8 @@ local.get $4 i32.const 2139095040 i32.gt_s - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $5 i32.const 2139095040 @@ -9498,7 +9354,7 @@ return end i32.const 0 - local.set $7 + local.set $6 local.get $2 i32.const 0 i32.lt_s @@ -9508,7 +9364,7 @@ i32.ge_s if i32.const 2 - local.set $7 + local.set $6 else local.get $5 i32.const 1065353216 @@ -9519,27 +9375,27 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 i32.const 23 - local.get $9 + local.get $8 i32.sub - local.set $6 + local.set $9 local.get $5 - local.get $6 + local.get $9 i32.shr_s - local.set $8 - local.get $8 - local.get $6 + local.set $7 + local.get $7 + local.get $9 i32.shl local.get $5 i32.eq if i32.const 2 - local.get $8 + local.get $7 i32.const 1 i32.and i32.sub - local.set $7 + local.set $6 end end end @@ -9629,17 +9485,15 @@ local.get $4 i32.const 2139095040 i32.eq - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $4 i32.const 0 i32.eq end - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $4 i32.const 1065353216 @@ -9664,7 +9518,7 @@ local.get $4 i32.const 1065353216 i32.sub - local.get $7 + local.get $6 i32.or i32.const 0 i32.eq @@ -9678,7 +9532,7 @@ f32.div local.set $11 else - local.get $7 + local.get $6 i32.const 1 i32.eq if @@ -9697,7 +9551,7 @@ i32.const 0 i32.lt_s if - local.get $7 + local.get $6 i32.const 0 i32.eq if @@ -9710,7 +9564,7 @@ f32.div return end - local.get $7 + local.get $6 i32.const 1 i32.eq if @@ -9844,27 +9698,27 @@ local.get $4 i32.const 8388607 i32.and - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 1065353216 i32.or local.set $4 - local.get $8 + local.get $7 i32.const 1885297 i32.le_s if i32.const 0 - local.set $9 + local.set $8 else - local.get $8 + local.get $7 i32.const 6140887 i32.lt_s if i32.const 1 - local.set $9 + local.set $8 else i32.const 0 - local.set $9 + local.set $8 local.get $24 i32.const 1 i32.add @@ -9880,7 +9734,7 @@ local.set $10 f32.const 1.5 f32.const 1 - local.get $9 + local.get $8 select local.set $30 local.get $10 @@ -9918,7 +9772,7 @@ local.get $25 i32.const 4194304 i32.add - local.get $9 + local.get $8 i32.const 21 i32.shl i32.add @@ -10042,7 +9896,7 @@ local.set $31 f32.const 1.5632208487659227e-06 f32.const 0 - local.get $9 + local.get $8 select local.set $32 f32.const -1.1736857413779944e-04 @@ -10060,7 +9914,7 @@ local.set $18 f32.const 0.5849609375 f32.const 0 - local.get $9 + local.get $8 select local.set $34 local.get $31 @@ -10118,8 +9972,8 @@ local.set $11 local.get $11 i32.reinterpret_f32 - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 1124073472 i32.gt_s if @@ -10130,7 +9984,7 @@ f32.mul return else - local.get $8 + local.get $7 i32.const 1124073472 i32.eq if @@ -10150,7 +10004,7 @@ return end else - local.get $8 + local.get $7 i32.const 2147483647 i32.and i32.const 1125515264 @@ -10163,7 +10017,7 @@ f32.mul return else - local.get $8 + local.get $7 i32.const -1021968384 i32.eq if @@ -10184,7 +10038,7 @@ end end end - local.get $8 + local.get $7 i32.const 2147483647 i32.and local.set $36 @@ -10193,16 +10047,16 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 i32.const 0 local.set $24 local.get $36 i32.const 1056964608 i32.gt_s if - local.get $8 + local.get $7 i32.const 8388608 - local.get $9 + local.get $8 i32.const 1 i32.add i32.shr_s @@ -10215,10 +10069,10 @@ i32.shr_s i32.const 127 i32.sub - local.set $9 + local.set $8 local.get $24 i32.const 8388607 - local.get $9 + local.get $8 i32.shr_s i32.const -1 i32.xor @@ -10231,11 +10085,11 @@ i32.const 8388608 i32.or i32.const 23 - local.get $9 + local.get $8 i32.sub i32.shr_s local.set $24 - local.get $8 + local.get $7 i32.const 0 i32.lt_s if @@ -10335,14 +10189,14 @@ local.set $11 local.get $11 i32.reinterpret_f32 - local.set $8 - local.get $8 + local.set $7 + local.get $7 local.get $24 i32.const 23 i32.shl i32.add - local.set $8 - local.get $8 + local.set $7 + local.get $7 i32.const 23 i32.shr_s i32.const 0 @@ -10353,7 +10207,7 @@ call $~lib/math/NativeMathf.scalbn local.set $11 else - local.get $8 + local.get $7 f32.reinterpret_i32 local.set $11 end @@ -10439,10 +10293,10 @@ i64.eqz if i32.const 0 - i32.const 112 - i32.const 978 + i32.const 144 + i32.const 1021 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -10471,10 +10325,10 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 987 + i32.const 144 + i32.const 1030 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_64 @@ -10528,10 +10382,10 @@ i32.eqz if i32.const 0 - i32.const 112 - i32.const 2219 + i32.const 144 + i32.const 2312 i32.const 24 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/random_state0_32 @@ -10611,7 +10465,6 @@ ) (func $std/math/test_sign (; 138 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.sign|inlined.0 (result f64) local.get $0 local.set $4 @@ -10636,13 +10489,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/sign @@ -10652,7 +10503,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_signf (; 139 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -10688,12 +10539,11 @@ (local $4 i64) (local $5 i64) (local $6 i32) - (local $7 i32) - (local $8 f64) - (local $9 i64) - (local $10 i32) - (local $11 i64) - (local $12 f64) + (local $7 f64) + (local $8 i64) + (local $9 i32) + (local $10 i64) + (local $11 f64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -10722,17 +10572,15 @@ i64.shl i64.const 0 i64.eq - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -10741,9 +10589,9 @@ local.get $0 local.get $1 f64.mul - local.set $8 - local.get $8 - local.get $8 + local.set $7 + local.get $7 + local.get $7 f64.div return end @@ -10757,38 +10605,38 @@ return end local.get $2 - local.set $9 + local.set $8 local.get $4 i64.eqz if local.get $4 - local.get $9 + local.get $8 i64.const 12 i64.shl i64.clz i64.sub local.set $4 - local.get $9 + local.get $8 i64.const 0 local.get $4 i64.sub i64.const 1 i64.add i64.shl - local.set $9 + local.set $8 else - local.get $9 + local.get $8 i64.const -1 i64.const 12 i64.shr_u i64.and - local.set $9 - local.get $9 + local.set $8 + local.get $8 i64.const 1 i64.const 52 i64.shl i64.or - local.set $9 + local.set $8 end local.get $5 i64.eqz @@ -10823,7 +10671,7 @@ local.set $3 end i32.const 0 - local.set $10 + local.set $9 block $break|0 loop $continue|0 local.get $4 @@ -10848,27 +10696,27 @@ i64.gt_s if block - local.get $9 + local.get $8 local.get $3 i64.ge_u if - local.get $9 + local.get $8 local.get $3 i64.sub - local.set $9 - local.get $10 + local.set $8 + local.get $9 i32.const 1 i32.add - local.set $10 + local.set $9 end - local.get $9 + local.get $8 i64.const 1 i64.shl - local.set $9 - local.get $10 + local.set $8 + local.get $9 i32.const 1 i32.shl - local.set $10 + local.set $9 local.get $4 i64.const 1 i64.sub @@ -10878,39 +10726,39 @@ end end end - local.get $9 + local.get $8 local.get $3 i64.ge_u if - local.get $9 + local.get $8 local.get $3 i64.sub - local.set $9 - local.get $10 + local.set $8 + local.get $9 i32.const 1 i32.add - local.set $10 + local.set $9 end - local.get $9 + local.get $8 i64.const 0 i64.eq if i64.const -60 local.set $4 else - local.get $9 + local.get $8 i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 - local.get $9 - local.get $11 + local.get $8 + local.get $10 i64.shl - local.set $9 + local.set $8 end br $break|0 unreachable @@ -10922,29 +10770,29 @@ i64.const 0 i64.gt_s if - local.get $9 + local.get $8 i64.const 1 i64.const 52 i64.shl i64.sub - local.set $9 - local.get $9 + local.set $8 + local.get $8 local.get $4 i64.const 52 i64.shl i64.or - local.set $9 + local.set $8 else - local.get $9 + local.get $8 i64.const 0 local.get $4 i64.sub i64.const 1 i64.add i64.shr_u - local.set $9 + local.set $8 end - local.get $9 + local.get $8 f64.reinterpret_i64 local.set $0 local.get $1 @@ -10953,42 +10801,38 @@ local.get $0 local.get $0 f64.add - local.set $12 + local.set $11 local.get $4 local.get $5 i64.eq - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else local.get $4 i64.const 1 i64.add local.get $5 i64.eq - local.tee $7 if (result i32) - local.get $12 + local.get $11 local.get $1 f64.gt - local.tee $7 if (result i32) - local.get $7 + i32.const 1 else - local.get $12 + local.get $11 local.get $1 f64.eq - local.tee $7 if (result i32) - local.get $10 + local.get $9 i32.const 1 i32.and else - local.get $7 + i32.const 0 end end else - local.get $7 + i32.const 0 end end if @@ -11053,17 +10897,15 @@ i32.shl i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 call $~lib/builtins/isNaN @@ -11152,7 +10994,7 @@ local.set $3 end i32.const 0 - local.set $9 + local.set $8 block $break|0 loop $continue|0 local.get $4 @@ -11185,19 +11027,19 @@ local.get $3 i32.sub local.set $7 - local.get $9 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 end local.get $7 i32.const 1 i32.shl local.set $7 - local.get $9 + local.get $8 i32.const 1 i32.shl - local.set $9 + local.set $8 local.get $4 i32.const 1 i32.sub @@ -11215,10 +11057,10 @@ local.get $3 i32.sub local.set $7 - local.get $9 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 end local.get $7 i32.const 0 @@ -11231,13 +11073,13 @@ i32.const 8 i32.shl i32.clz - local.set $8 + local.set $9 local.get $4 - local.get $8 + local.get $9 i32.sub local.set $4 local.get $7 - local.get $8 + local.get $9 i32.shl local.set $7 end @@ -11286,38 +11128,34 @@ local.get $4 local.get $5 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 1 i32.add local.get $5 i32.eq - local.tee $8 if (result i32) local.get $10 local.get $1 f32.gt - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $10 local.get $1 f32.eq - local.tee $8 if (result i32) - local.get $9 + local.get $8 i32.const 1 i32.and else - local.get $8 + i32.const 0 end end else - local.get $8 + i32.const 0 end end if @@ -11727,10 +11565,10 @@ local.get $0 local.set $8 local.get $1 - local.set $9 - local.get $2 local.set $10 - local.get $9 + local.get $2 + local.set $9 + local.get $10 i32.const 1305022427 i32.lt_u if @@ -11758,7 +11596,7 @@ block $~lib/math/pio2_large_quot|inlined.1 (result i32) local.get $8 local.set $11 - local.get $9 + local.get $10 local.set $12 local.get $12 i32.const 23 @@ -11774,13 +11612,13 @@ i32.const 63 i32.and local.set $15 - i32.const 104 + i32.const 112 local.get $14 i32.const 0 i32.add call $~lib/array/Array#__unchecked_get local.set $16 - i32.const 104 + i32.const 112 local.get $14 i32.const 1 i32.add @@ -11790,7 +11628,7 @@ i32.const 32 i32.gt_s if - i32.const 104 + i32.const 112 local.get $14 i32.const 2 i32.add @@ -11878,7 +11716,7 @@ local.get $23 i32.sub local.get $23 - local.get $10 + local.get $9 select end local.set $24 @@ -12083,20 +11921,17 @@ local.get $4 ) (func $std/math/test_sinh (; 147 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.sinh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/sinh @@ -12106,7 +11941,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.sinh (; 148 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -12214,7 +12049,6 @@ ) (func $std/math/test_sqrt (; 150 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.sqrt|inlined.0 (result f64) local.get $0 local.set $4 @@ -12225,13 +12059,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/sqrt @@ -12241,7 +12073,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_sqrtf (; 151 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -12707,10 +12539,10 @@ local.get $0 local.set $11 local.get $1 - local.set $4 - local.get $2 local.set $12 - local.get $4 + local.get $2 + local.set $4 + local.get $12 i32.const 1305022427 i32.lt_u if @@ -12738,7 +12570,7 @@ block $~lib/math/pio2_large_quot|inlined.2 (result i32) local.get $11 local.set $13 - local.get $4 + local.get $12 local.set $14 local.get $14 i32.const 23 @@ -12754,13 +12586,13 @@ i32.const 63 i32.and local.set $17 - i32.const 104 + i32.const 112 local.get $16 i32.const 0 i32.add call $~lib/array/Array#__unchecked_get local.set $18 - i32.const 104 + i32.const 112 local.get $16 i32.const 1 i32.add @@ -12770,7 +12602,7 @@ i32.const 32 i32.gt_s if - i32.const 104 + i32.const 112 local.get $16 i32.const 2 i32.add @@ -12858,7 +12690,7 @@ local.get $25 i32.sub local.get $25 - local.get $12 + local.get $4 select end local.set $26 @@ -13030,20 +12862,17 @@ f64.copysign ) (func $std/math/test_tanh (; 155 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) - (local $4 i32) local.get $0 call $~lib/math/NativeMath.tanh local.get $1 local.get $2 local.get $3 call $std/math/check - local.tee $4 if (result i32) global.get $std/math/js i32.eqz - local.tee $4 if (result i32) - local.get $4 + i32.const 1 else local.get $0 call $~lib/bindings/Math/tanh @@ -13053,7 +12882,7 @@ call $std/math/check end else - local.get $4 + i32.const 0 end ) (func $~lib/math/NativeMathf.tanh (; 156 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) @@ -13152,7 +12981,6 @@ ) (func $std/math/test_trunc (; 158 ;) (type $FUNCSIG$idddi) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 f64) - (local $5 i32) block $~lib/math/NativeMath.trunc|inlined.0 (result f64) local.get $0 local.set $4 @@ -13163,13 +12991,11 @@ local.get $2 local.get $3 call $std/math/check - local.tee $5 if (result i32) global.get $std/math/js i32.eqz - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else local.get $0 call $~lib/bindings/Math/trunc @@ -13179,7 +13005,7 @@ call $std/math/check end else - local.get $5 + i32.const 0 end ) (func $std/math/test_truncf (; 159 ;) (type $FUNCSIG$ifffi) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) @@ -13588,19 +13414,18 @@ (func $start:std/math (; 165 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) - (local $2 i32) - (local $3 i64) - (local $4 f32) + (local $2 i64) + (local $3 f32) global.get $~lib/math/NativeMath.E global.get $~lib/math/NativeMath.E f64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.E @@ -13609,10 +13434,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.E @@ -13623,10 +13448,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.LN2 @@ -13637,10 +13462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.LN10 @@ -13651,10 +13476,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.LOG2E @@ -13665,10 +13490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.PI @@ -13679,10 +13504,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.SQRT1_2 @@ -13693,10 +13518,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMath.SQRT2 @@ -13707,10 +13532,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.E @@ -13722,10 +13547,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.LN2 @@ -13737,10 +13562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.LN10 @@ -13752,10 +13577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.LOG2E @@ -13767,10 +13592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.PI @@ -13782,10 +13607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.SQRT1_2 @@ -13797,10 +13622,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/math/NativeMathf.SQRT2 @@ -13812,10 +13637,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -13827,10 +13652,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -13842,10 +13667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -13857,10 +13682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -13872,10 +13697,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -13887,10 +13712,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -13902,10 +13727,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -13917,10 +13742,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -13932,10 +13757,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -13947,10 +13772,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -13962,10 +13787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -13977,10 +13802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -13992,10 +13817,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -14007,10 +13832,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14022,10 +13847,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14037,10 +13862,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14054,10 +13879,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14069,10 +13894,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14084,10 +13909,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14099,10 +13924,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14116,10 +13941,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14131,10 +13956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14146,10 +13971,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14161,10 +13986,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14178,10 +14003,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8988465674311579538646525e283 @@ -14193,10 +14018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -14208,10 +14033,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.000244140625 @@ -14225,10 +14050,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7499999999999999 @@ -14242,10 +14067,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5000000000000012 @@ -14259,10 +14084,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -14274,10 +14099,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -14289,10 +14114,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -14304,10 +14129,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -14319,10 +14144,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -14334,10 +14159,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 176 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -14349,10 +14174,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -14364,10 +14189,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 178 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -14379,10 +14204,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -14394,10 +14219,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -14409,10 +14234,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -14424,10 +14249,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -14439,10 +14264,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -14454,10 +14279,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -14469,10 +14294,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14484,10 +14309,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14501,10 +14326,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14516,10 +14341,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14531,10 +14356,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14546,10 +14371,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -14563,10 +14388,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -14578,10 +14403,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14593,10 +14418,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14608,10 +14433,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -14625,10 +14450,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1701411834604692317316873e14 @@ -14640,10 +14465,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -14655,10 +14480,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.000244140625 @@ -14672,10 +14497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7499999403953552 @@ -14689,10 +14514,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5000006556510925 @@ -14706,10 +14531,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -14720,10 +14545,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -14734,10 +14559,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -14748,10 +14573,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -14762,10 +14587,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -14776,10 +14601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -14790,10 +14615,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -14804,10 +14629,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -14818,10 +14643,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -14832,10 +14657,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -14846,10 +14671,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -14860,10 +14685,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -14874,10 +14699,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -14888,10 +14713,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -14902,10 +14727,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14916,10 +14741,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -14931,10 +14756,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -14945,10 +14770,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -14959,10 +14784,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -14973,10 +14798,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -14987,10 +14812,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -15001,10 +14826,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -15015,10 +14840,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -15029,10 +14854,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -15043,10 +14868,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -15057,10 +14882,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -15071,10 +14896,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -15085,10 +14910,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15099,10 +14924,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 253 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -15113,10 +14938,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -15127,10 +14952,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -15141,10 +14966,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15155,10 +14980,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15170,10 +14995,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -15184,10 +15009,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -15198,10 +15023,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -15212,10 +15037,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -15226,10 +15051,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -15240,10 +15065,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -15254,10 +15079,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -15268,10 +15093,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -15282,10 +15107,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -15296,10 +15121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -15310,10 +15135,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -15324,10 +15149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15338,10 +15163,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -15352,10 +15177,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15366,10 +15191,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -15380,10 +15205,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000000000000002 @@ -15394,10 +15219,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15408,10 +15233,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15423,10 +15248,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -15437,10 +15262,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5309227209592985 @@ -15451,10 +15276,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.4939556746399746 @@ -15465,10 +15290,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -15479,10 +15304,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -15493,10 +15318,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -15507,10 +15332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 303 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -15521,10 +15346,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -15535,10 +15360,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -15549,10 +15374,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -15563,10 +15388,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -15577,10 +15402,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -15591,10 +15416,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -15605,10 +15430,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -15619,10 +15444,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -15633,10 +15458,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -15647,10 +15472,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -15661,10 +15486,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000001192092896 @@ -15675,10 +15500,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15689,10 +15514,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -15704,10 +15529,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -15718,10 +15543,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.49965065717697144 @@ -15732,10 +15557,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5051405429840088 @@ -15746,10 +15571,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5189794898033142 @@ -15760,10 +15585,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -15774,10 +15599,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -15788,10 +15613,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -15802,10 +15627,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -15816,10 +15641,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -15830,10 +15655,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -15844,10 +15669,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -15858,10 +15683,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -15872,10 +15697,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -15886,10 +15711,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -15900,10 +15725,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 344 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -15914,10 +15739,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15928,10 +15753,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -15942,10 +15767,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -15956,10 +15781,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 350 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -15970,10 +15795,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 351 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -15984,10 +15809,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 352 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -15999,10 +15824,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 353 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1060831199926429 @@ -16013,10 +15838,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1089809557628658 @@ -16027,10 +15852,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1169429159875521 @@ -16041,10 +15866,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -16055,10 +15880,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -16069,10 +15894,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -16083,10 +15908,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -16097,10 +15922,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -16111,10 +15936,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -16125,10 +15950,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -16139,10 +15964,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -16153,10 +15978,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -16167,10 +15992,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -16181,10 +16006,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -16195,10 +16020,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16209,10 +16034,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16223,10 +16048,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -16237,10 +16062,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -16251,10 +16076,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16265,10 +16090,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16280,10 +16105,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1125899906842624 @@ -16294,10 +16119,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -16308,10 +16133,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -16322,10 +16147,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -16336,10 +16161,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -16350,10 +16175,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -16364,10 +16189,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -16378,10 +16203,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -16392,10 +16217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -16406,10 +16231,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -16420,10 +16245,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -16434,10 +16259,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -16448,10 +16273,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -16462,10 +16287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -16476,10 +16301,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -16490,10 +16315,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -16504,10 +16329,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000000000000002 @@ -16518,10 +16343,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -16532,10 +16357,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -16547,10 +16372,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -16561,10 +16386,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5073043929119148 @@ -16575,10 +16400,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -16589,10 +16414,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -16603,10 +16428,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -16617,10 +16442,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -16631,10 +16456,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -16645,10 +16470,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -16659,10 +16484,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -16673,10 +16498,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -16687,10 +16512,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -16701,10 +16526,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -16715,10 +16540,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -16729,10 +16554,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -16743,10 +16568,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -16757,10 +16582,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -16771,10 +16596,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -16785,10 +16610,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000001192092896 @@ -16799,10 +16624,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 459 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16813,10 +16638,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 460 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -16828,10 +16653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 461 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -16842,10 +16667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 462 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5004770159721375 @@ -16856,10 +16681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 463 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -16870,10 +16695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -16884,10 +16709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -16898,10 +16723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -16912,10 +16737,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -16926,10 +16751,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -16940,10 +16765,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -16954,10 +16779,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -16968,10 +16793,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -16982,10 +16807,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -16996,10 +16821,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17010,10 +16835,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17024,10 +16849,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17040,10 +16865,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17054,10 +16879,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17068,10 +16893,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -17082,10 +16907,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -17096,10 +16921,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -17110,10 +16935,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -17124,10 +16949,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -17138,10 +16963,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -17152,10 +16977,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -17166,10 +16991,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -17180,10 +17005,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -17194,10 +17019,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -17208,10 +17033,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17222,10 +17047,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17236,10 +17061,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 533 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17252,10 +17077,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 534 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -17266,10 +17091,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 535 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -17280,10 +17105,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 536 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -17294,10 +17119,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -17308,10 +17133,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -17322,10 +17147,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -17336,10 +17161,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -17350,10 +17175,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -17364,10 +17189,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -17378,10 +17203,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 554 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -17392,10 +17217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 555 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -17406,10 +17231,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -17420,10 +17245,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17434,10 +17259,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17448,10 +17273,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17462,10 +17287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -17476,10 +17301,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17490,10 +17315,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17505,10 +17330,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17519,10 +17344,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6929821535674624 @@ -17533,10 +17358,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -17547,10 +17372,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 576 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -17561,10 +17386,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 577 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -17575,10 +17400,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 578 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -17589,10 +17414,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 579 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -17603,10 +17428,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 580 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -17617,10 +17442,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 581 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -17631,10 +17456,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 582 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -17645,10 +17470,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 583 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -17659,10 +17484,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 584 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -17673,10 +17498,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -17687,10 +17512,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 588 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -17701,10 +17526,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 589 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -17715,10 +17540,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 590 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -17729,10 +17554,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 591 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17743,10 +17568,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 592 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -17758,10 +17583,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 593 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -17772,10 +17597,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 594 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -17786,10 +17611,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -17800,10 +17625,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -17814,10 +17639,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -17828,10 +17653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -17842,10 +17667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -17856,10 +17681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 611 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -17870,10 +17695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 612 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -17884,10 +17709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -17898,10 +17723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 614 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -17912,10 +17737,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 615 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -17926,10 +17751,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 618 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17940,10 +17765,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 619 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -17955,10 +17780,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 620 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -17969,10 +17794,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 621 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -17983,10 +17808,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 622 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -17997,10 +17822,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 623 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18012,10 +17837,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 624 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -18026,10 +17851,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -18040,10 +17865,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.3552527156068805e-20 @@ -18054,10 +17879,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.332636185032189e-302 @@ -18068,10 +17893,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.562684646268003e-309 @@ -18084,10 +17909,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5.562684646268003e-309 @@ -18100,10 +17925,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 630 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8988465674311579538646525e283 @@ -18114,10 +17939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 631 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -18128,10 +17953,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -18142,10 +17967,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -18156,10 +17981,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -18170,10 +17995,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -18184,10 +18009,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -18198,10 +18023,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 645 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -18212,10 +18037,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 646 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -18226,10 +18051,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 647 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -18240,10 +18065,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 648 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -18254,10 +18079,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 649 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -18268,10 +18093,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 652 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -18282,10 +18107,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -18297,10 +18122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -18311,10 +18136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -18325,10 +18150,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -18339,10 +18164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -18354,10 +18179,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -18368,10 +18193,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -18382,10 +18207,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.3552527156068805e-20 @@ -18396,10 +18221,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 661 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -18410,10 +18235,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -18426,10 +18251,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -18442,10 +18267,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1701411834604692317316873e14 @@ -18456,10 +18281,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -18471,10 +18296,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -18486,10 +18311,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 678 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -18501,10 +18326,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -18516,10 +18341,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 680 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -18531,10 +18356,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 681 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -18546,10 +18371,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -18561,10 +18386,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -18576,10 +18401,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -18591,10 +18416,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -18606,10 +18431,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 686 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18621,10 +18446,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 689 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18636,10 +18461,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 690 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18651,10 +18476,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 691 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18667,10 +18492,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 692 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18682,10 +18507,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -18697,10 +18522,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18712,10 +18537,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18727,10 +18552,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18742,10 +18567,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18758,10 +18583,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18773,10 +18598,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -18788,10 +18613,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18803,10 +18628,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18818,10 +18643,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 702 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -18833,10 +18658,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 703 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -18848,10 +18673,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 704 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18863,10 +18688,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 705 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -18878,10 +18703,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 706 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -18894,10 +18719,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 707 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -18910,10 +18735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18925,10 +18750,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 709 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18941,10 +18766,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18956,10 +18781,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18972,10 +18797,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -18988,10 +18813,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19005,10 +18830,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1125369292536007e-308 @@ -19022,10 +18847,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 715 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -19039,10 +18864,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 716 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -19056,10 +18881,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 717 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -19071,10 +18896,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 718 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -19086,10 +18911,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -19101,10 +18926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 728 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -19116,10 +18941,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 729 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -19131,10 +18956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 730 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -19146,10 +18971,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 731 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -19161,10 +18986,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 732 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -19176,10 +19001,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 733 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -19191,10 +19016,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 734 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -19206,10 +19031,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 735 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -19221,10 +19046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 736 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19236,10 +19061,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 739 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19251,10 +19076,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 740 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19266,10 +19091,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19282,10 +19107,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19297,10 +19122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -19312,10 +19137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19327,10 +19152,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19342,10 +19167,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19357,10 +19182,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19373,10 +19198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 748 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19388,10 +19213,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 749 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -19403,10 +19228,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -19418,10 +19243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 751 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -19433,10 +19258,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 752 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19448,10 +19273,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19463,10 +19288,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -19478,10 +19303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19493,10 +19318,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -19509,10 +19334,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19525,10 +19350,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19540,10 +19365,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19556,10 +19381,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19571,10 +19396,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 761 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19587,10 +19412,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 762 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19603,10 +19428,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 763 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -19620,10 +19445,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 764 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -19637,10 +19462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 765 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -19654,10 +19479,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 766 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -19668,10 +19493,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -19682,10 +19507,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 779 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -19696,10 +19521,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 780 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -19710,10 +19535,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -19724,10 +19549,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -19738,10 +19563,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -19752,10 +19577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -19766,10 +19591,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -19780,10 +19605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -19794,10 +19619,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -19808,10 +19633,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 790 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19822,10 +19647,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 791 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -19838,10 +19663,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 792 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -19852,10 +19677,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 793 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -19866,10 +19691,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 794 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.313225746154785e-10 @@ -19880,10 +19705,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 795 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -9.313225746154785e-10 @@ -19894,10 +19719,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 796 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -19908,10 +19733,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 797 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -19922,10 +19747,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 798 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8 @@ -19936,10 +19761,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 799 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -19950,10 +19775,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -19964,10 +19789,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -19978,10 +19803,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -19992,10 +19817,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 811 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -20006,10 +19831,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 812 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -20020,10 +19845,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -20034,10 +19859,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -20048,10 +19873,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -20062,10 +19887,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -20076,10 +19901,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 817 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -20090,10 +19915,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 820 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -20104,10 +19929,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 821 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -20120,10 +19945,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 822 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -20134,10 +19959,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 823 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -20148,10 +19973,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 824 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.313225746154785e-10 @@ -20162,10 +19987,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 825 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -9.313225746154785e-10 @@ -20176,10 +20001,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 826 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -20190,10 +20015,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 827 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -20204,10 +20029,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 8 @@ -20218,10 +20043,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -20232,10 +20057,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -20246,10 +20071,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -20260,10 +20085,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -20274,10 +20099,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -20288,10 +20113,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -20302,10 +20127,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -20316,10 +20141,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -20330,10 +20155,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -20344,10 +20169,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 849 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -20358,10 +20183,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 850 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20372,10 +20197,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 853 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20386,10 +20211,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 854 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20402,10 +20227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 855 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20416,10 +20241,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20430,10 +20255,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 857 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20444,10 +20269,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 858 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20458,10 +20283,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -20472,10 +20297,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -20486,10 +20311,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -20500,10 +20325,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -20514,10 +20339,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -20528,10 +20353,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -20542,10 +20367,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -20556,10 +20381,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -20570,10 +20395,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20584,10 +20409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20598,10 +20423,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20614,10 +20439,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 870 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20628,10 +20453,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20642,10 +20467,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20656,10 +20481,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20670,10 +20495,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -20684,10 +20509,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -20698,10 +20523,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -20712,10 +20537,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -20726,10 +20551,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -20740,10 +20565,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -20754,10 +20579,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -20768,10 +20593,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -20782,10 +20607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -20796,10 +20621,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20810,10 +20635,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -20826,10 +20651,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -20840,10 +20665,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -20854,10 +20679,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -20868,10 +20693,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -20882,10 +20707,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -20896,10 +20721,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -20910,10 +20735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -20924,10 +20749,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -20938,10 +20763,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -20952,10 +20777,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -20966,10 +20791,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -20980,10 +20805,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -20994,10 +20819,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -21008,10 +20833,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 906 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -21022,10 +20847,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 907 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -21036,10 +20861,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 908 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -21050,10 +20875,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 909 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -21064,10 +20889,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 910 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -21078,10 +20903,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 911 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -21092,10 +20917,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 912 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -21106,10 +20931,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -21120,10 +20945,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -21134,10 +20959,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21148,10 +20973,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21162,10 +20987,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 919 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21178,10 +21003,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21192,10 +21017,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 921 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21206,10 +21031,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 922 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -21220,10 +21045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 923 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -21234,10 +21059,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -21248,10 +21073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -21262,10 +21087,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -21276,10 +21101,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -21290,10 +21115,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 928 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -21304,10 +21129,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -21318,10 +21143,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 930 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -21332,10 +21157,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 931 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -21346,10 +21171,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 932 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21360,10 +21185,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 933 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21374,10 +21199,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 934 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21390,10 +21215,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 935 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21404,10 +21229,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 936 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21418,10 +21243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 937 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -21432,10 +21257,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 938 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -21446,10 +21271,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 939 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -21460,10 +21285,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -21474,10 +21299,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -21488,10 +21313,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -21502,10 +21327,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -21516,10 +21341,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -21530,10 +21355,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -21544,10 +21369,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -21558,10 +21383,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21572,10 +21397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 948 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21586,10 +21411,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 949 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21602,10 +21427,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21616,10 +21441,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 951 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21630,10 +21455,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 952 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -21644,10 +21469,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -21658,10 +21483,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -21672,10 +21497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -21686,10 +21511,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -21700,10 +21525,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -21714,10 +21539,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 958 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -21728,10 +21553,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 959 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -21742,10 +21567,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -21756,10 +21581,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -21770,10 +21595,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -21784,10 +21609,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1073 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -21798,10 +21623,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1074 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -21812,10 +21637,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1075 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -21826,10 +21651,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1076 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -21840,10 +21665,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1077 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -21854,10 +21679,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -21868,10 +21693,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -21882,10 +21707,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -21896,10 +21721,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -21910,10 +21735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -21924,10 +21749,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -21938,10 +21763,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21952,10 +21777,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -21967,10 +21792,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1088 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -21981,10 +21806,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1089 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -21995,10 +21820,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1092 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -22009,10 +21834,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1093 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -22023,10 +21848,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1094 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -22037,10 +21862,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1095 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -22051,10 +21876,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1096 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -22065,10 +21890,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -22079,10 +21904,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -22093,10 +21918,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -22107,10 +21932,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -22121,10 +21946,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -22135,10 +21960,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -22149,10 +21974,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -22163,10 +21988,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -22177,10 +22002,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -22191,10 +22016,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -22205,10 +22030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -22219,10 +22044,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -22233,10 +22058,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.450580596923828e-09 @@ -22247,10 +22072,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -22261,10 +22086,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.00048828125 @@ -22275,10 +22100,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.0009765625 @@ -22289,10 +22114,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -22303,10 +22128,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -22317,10 +22142,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -22331,10 +22156,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -22345,10 +22170,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -22359,10 +22184,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -22373,10 +22198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -22387,10 +22212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -22401,10 +22226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -22415,10 +22240,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.350988701644575e-38 @@ -22429,10 +22254,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -22443,10 +22268,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -22457,10 +22282,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.450580596923828e-09 @@ -22471,10 +22296,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -22485,10 +22310,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.00048828125 @@ -22499,10 +22324,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.0009765625 @@ -22513,10 +22338,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 255.99993896484375 @@ -22527,10 +22352,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5033165 @@ -22541,10 +22366,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 421657440 @@ -22555,10 +22380,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2147483392 @@ -22569,10 +22394,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 68719476736 @@ -22583,10 +22408,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 549755813888 @@ -22597,10 +22422,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -22611,10 +22436,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -255.99993896484375 @@ -22625,10 +22450,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5033165 @@ -22639,10 +22464,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -421657440 @@ -22653,10 +22478,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2147483392 @@ -22667,10 +22492,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -68719476736 @@ -22681,10 +22506,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -549755813888 @@ -22695,10 +22520,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -22710,10 +22535,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -22724,10 +22549,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -22738,10 +22563,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -22752,10 +22577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -22766,10 +22591,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -22780,10 +22605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -22794,10 +22619,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -22808,10 +22633,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -22822,10 +22647,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -22836,10 +22661,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -22850,10 +22675,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -22864,10 +22689,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1168 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -22878,10 +22703,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -22892,10 +22717,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1170 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -22907,10 +22732,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -22921,10 +22746,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -22935,10 +22760,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -22949,10 +22774,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1182 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -22963,10 +22788,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -22977,10 +22802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -22991,10 +22816,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -23005,10 +22830,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -23019,10 +22844,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -23033,10 +22858,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -23047,10 +22872,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -23061,10 +22886,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -23075,10 +22900,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -23089,10 +22914,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23103,10 +22928,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -23118,10 +22943,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -23132,10 +22957,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -23146,10 +22971,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -23160,10 +22985,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -23174,10 +22999,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -23188,10 +23013,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -23202,10 +23027,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -23216,10 +23041,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -23230,10 +23055,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -23244,10 +23069,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -23258,10 +23083,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -23272,10 +23097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -23286,10 +23111,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -23300,10 +23125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -23314,10 +23139,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -23328,10 +23153,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -23342,10 +23167,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -23357,10 +23182,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -23371,10 +23196,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397214889526365 @@ -23385,10 +23210,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0397214889526365 @@ -23399,10 +23224,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397210121154785 @@ -23413,10 +23238,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0397214889526367 @@ -23427,10 +23252,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -23441,10 +23266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -23456,10 +23281,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4649454530587146735 @@ -23473,10 +23298,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4649454530587146736 @@ -23490,10 +23315,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4573606559926636463 @@ -23508,10 +23333,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4573606559926636462 @@ -23526,10 +23351,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4573929700241785646 @@ -23543,10 +23368,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4573929700241785645 @@ -23562,10 +23387,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4602685064124656555 @@ -23579,10 +23404,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4603836184166978885 @@ -23596,10 +23421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4605718951180848880 @@ -23613,10 +23438,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4605835761386121865 @@ -23630,10 +23455,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4610006203169397430 @@ -23647,10 +23472,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4610219797808568955 @@ -23664,10 +23489,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4619182163989041060 @@ -23681,10 +23506,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4622394943780502425 @@ -23698,10 +23523,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4622613550143616215 @@ -23715,10 +23540,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4622829325869063755 @@ -23732,10 +23557,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4645970351893354075 @@ -23749,10 +23574,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4647695036380671130 @@ -23766,10 +23591,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4819432143425896336 @@ -23783,10 +23608,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1354 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4819256221565452171 @@ -23800,10 +23625,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -23814,10 +23639,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -23828,10 +23653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -23842,10 +23667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -23856,10 +23681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -23870,10 +23695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -23884,10 +23709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -23898,10 +23723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -23912,10 +23737,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -23926,10 +23751,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -23940,10 +23765,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -23954,10 +23779,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -23968,10 +23793,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -23982,10 +23807,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -23996,10 +23821,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -24010,10 +23835,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1391 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -24025,10 +23850,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1392 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -24039,10 +23864,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 88.72283172607422 @@ -24053,10 +23878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 88.72283935546875 @@ -24069,10 +23894,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -103.97207641601562 @@ -24085,10 +23910,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -103.97208404541016 @@ -24101,10 +23926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465735614299774 @@ -24115,10 +23940,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465735912322998 @@ -24129,10 +23954,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.3465736210346222 @@ -24143,10 +23968,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -24157,10 +23982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -24171,10 +23996,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -24185,10 +24010,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -24199,10 +24024,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -24213,10 +24038,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -24227,10 +24052,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -24241,10 +24066,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -24255,10 +24080,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -24269,10 +24094,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -24283,10 +24108,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24297,10 +24122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24311,10 +24136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24325,10 +24150,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24339,10 +24164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24353,10 +24178,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24368,10 +24193,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24382,10 +24207,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507201e-308 @@ -24398,10 +24223,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.225073858507201e-308 @@ -24414,10 +24239,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -24428,10 +24253,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -24442,10 +24267,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -24456,10 +24281,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -24470,10 +24295,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -24484,10 +24309,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -24498,10 +24323,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -24512,10 +24337,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -24526,10 +24351,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -24540,10 +24365,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -24554,10 +24379,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -24568,10 +24393,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -24582,10 +24407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -24596,10 +24421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -24610,10 +24435,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -24624,10 +24449,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -24639,10 +24464,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -24653,10 +24478,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1459 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -24667,10 +24492,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -24681,10 +24506,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -24695,10 +24520,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -24709,10 +24534,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -24723,10 +24548,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -24737,10 +24562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -24751,10 +24576,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -24765,10 +24590,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -24779,10 +24604,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -24793,10 +24618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -24807,10 +24632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24821,10 +24646,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -24837,10 +24662,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -24851,10 +24676,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -24865,10 +24690,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -24879,10 +24704,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -24893,10 +24718,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -24907,10 +24732,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -24921,10 +24746,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -24935,10 +24760,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -24949,10 +24774,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1493 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -24963,10 +24788,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -24977,10 +24802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1495 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -24991,10 +24816,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1496 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -25005,10 +24830,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1497 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -25019,10 +24844,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -25033,10 +24858,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -25047,10 +24872,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -25061,10 +24886,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -25075,10 +24900,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -25089,10 +24914,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -25103,10 +24928,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -25117,10 +24942,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -25131,10 +24956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1514 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -25145,10 +24970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1515 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -25159,10 +24984,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25173,10 +24998,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -25189,10 +25014,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -25203,10 +25028,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -25217,10 +25042,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -25231,10 +25056,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -25245,10 +25070,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -25259,10 +25084,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -25273,10 +25098,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -25287,10 +25112,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -25301,10 +25126,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -25315,10 +25140,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -25329,10 +25154,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -25343,10 +25168,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -25357,10 +25182,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -25372,10 +25197,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1544 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -25387,10 +25212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1545 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -25402,10 +25227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1546 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -25417,10 +25242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1547 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -25432,10 +25257,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -25447,10 +25272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -25462,10 +25287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -25477,10 +25302,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -25492,10 +25317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -25507,10 +25332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -25522,10 +25347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -25537,10 +25362,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -25552,10 +25377,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1558 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -25567,10 +25392,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1559 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -25582,10 +25407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -25597,10 +25422,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -25612,10 +25437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -25627,10 +25452,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -25642,10 +25467,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25657,10 +25482,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -25672,10 +25497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25687,10 +25512,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -25702,10 +25527,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1568 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25718,10 +25543,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1569 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -25734,10 +25559,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1570 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -25750,10 +25575,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1571 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -25766,10 +25591,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1572 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -25781,10 +25606,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1573 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -25796,10 +25621,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1574 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -25811,10 +25636,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1583 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -25826,10 +25651,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1584 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -25841,10 +25666,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1585 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -25856,10 +25681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1586 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -25871,10 +25696,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1587 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -25886,10 +25711,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1588 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -25901,10 +25726,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1589 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -25916,10 +25741,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1590 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -25931,10 +25756,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1591 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -25946,10 +25771,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1592 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -25961,10 +25786,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1595 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -25976,10 +25801,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1596 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -25991,10 +25816,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1597 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -26006,10 +25831,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1598 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -26021,10 +25846,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1599 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -26036,10 +25861,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1600 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -26051,10 +25876,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1601 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -26066,10 +25891,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1602 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -26081,10 +25906,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1603 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26096,10 +25921,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1604 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26111,10 +25936,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1605 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26126,10 +25951,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26141,10 +25966,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26157,10 +25982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26173,10 +25998,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26189,10 +26014,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26205,10 +26030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1611 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26220,10 +26045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1612 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26235,10 +26060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -26249,10 +26074,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -26263,10 +26088,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -26277,10 +26102,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -26291,10 +26116,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -26305,10 +26130,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -26319,10 +26144,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1630 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -26333,10 +26158,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1631 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -26347,10 +26172,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1632 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -26361,10 +26186,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1633 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -26375,10 +26200,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1634 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26390,10 +26215,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1637 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26405,10 +26230,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1638 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -26419,10 +26244,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1639 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26433,10 +26258,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26447,10 +26272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26461,10 +26286,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26476,10 +26301,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26490,10 +26315,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -26505,10 +26330,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -26520,10 +26345,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -26534,10 +26359,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26548,10 +26373,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -26562,10 +26387,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26576,10 +26401,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26591,10 +26416,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26605,10 +26430,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -26620,10 +26445,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -26635,10 +26460,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -26649,10 +26474,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -26663,10 +26488,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1666 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -26677,10 +26502,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1667 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26691,10 +26516,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1668 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -26706,10 +26531,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1669 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -26720,10 +26545,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1670 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -26734,10 +26559,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -26748,10 +26573,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -26762,10 +26587,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -26776,10 +26601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -26790,10 +26615,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1686 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -26804,10 +26629,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1687 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -26818,10 +26643,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1688 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -26832,10 +26657,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1689 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -26846,10 +26671,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1690 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -26860,10 +26685,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1691 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -26875,10 +26700,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -26890,10 +26715,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -26904,10 +26729,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -26918,10 +26743,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -26932,10 +26757,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26946,10 +26771,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -26961,10 +26786,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -26975,10 +26800,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -26989,10 +26814,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -27003,10 +26828,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -27017,10 +26842,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -27031,10 +26856,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -27045,10 +26870,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -27059,10 +26884,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1715 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -27073,10 +26898,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1716 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -27087,10 +26912,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1717 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -27101,10 +26926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1718 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -27115,10 +26940,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1719 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27130,10 +26955,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27145,10 +26970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1723 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -27159,10 +26984,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1724 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27173,10 +26998,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1725 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27187,10 +27012,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1726 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27201,10 +27026,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27216,10 +27041,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1728 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27230,10 +27055,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1729 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -27244,10 +27069,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -27258,10 +27083,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -27272,10 +27097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -27286,10 +27111,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -27300,10 +27125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -27314,10 +27139,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -27328,10 +27153,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -27342,10 +27167,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1748 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -27356,10 +27181,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1749 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -27370,10 +27195,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -27384,10 +27209,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -27398,10 +27223,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -27412,10 +27237,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -27426,10 +27251,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -27441,10 +27266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27455,10 +27280,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27470,10 +27295,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -27484,10 +27309,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -27498,10 +27323,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1769 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -27512,10 +27337,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1770 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -27526,10 +27351,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1771 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -27540,10 +27365,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1772 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -27554,10 +27379,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1773 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -27568,10 +27393,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1774 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -27582,10 +27407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1775 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -27596,10 +27421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1776 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -27610,10 +27435,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1777 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -27624,10 +27449,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -27638,10 +27463,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -27652,10 +27477,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -27666,10 +27491,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -27680,10 +27505,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -27695,10 +27520,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27709,10 +27534,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -27724,10 +27549,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -27738,10 +27563,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1788 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -27754,10 +27579,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1789 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -27768,10 +27593,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1801 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -27782,10 +27607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1802 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -27796,10 +27621,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1803 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -27810,10 +27635,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1804 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -27824,10 +27649,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1805 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -27838,10 +27663,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1806 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -27852,10 +27677,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1807 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -27866,10 +27691,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -27880,10 +27705,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -27894,10 +27719,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -27909,10 +27734,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -27924,10 +27749,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -27938,10 +27763,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -27952,10 +27777,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -27966,10 +27791,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1817 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27980,10 +27805,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1818 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -27995,10 +27820,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1819 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28009,10 +27834,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1820 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -28023,10 +27848,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -28037,10 +27862,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1830 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -28051,10 +27876,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1831 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -28065,10 +27890,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -28079,10 +27904,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1833 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -28093,10 +27918,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1834 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -28107,10 +27932,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1835 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -28121,10 +27946,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1836 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -28135,10 +27960,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1837 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -28149,10 +27974,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1838 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -28164,10 +27989,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -28179,10 +28004,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -28193,10 +28018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -28207,10 +28032,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -28221,10 +28046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -28235,10 +28060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -28250,10 +28075,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -28264,10 +28089,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -28279,10 +28104,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -28294,10 +28119,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -28309,10 +28134,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -28324,10 +28149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -28339,10 +28164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -28354,10 +28179,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -28369,10 +28194,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -28384,10 +28209,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -28399,10 +28224,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -28414,10 +28239,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28429,10 +28254,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28444,10 +28269,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -28459,10 +28284,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -28474,10 +28299,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28489,10 +28314,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28504,10 +28329,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28519,10 +28344,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28535,10 +28360,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28550,10 +28375,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28565,10 +28390,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28580,10 +28405,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -28595,10 +28420,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -28610,10 +28435,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28625,10 +28450,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28640,10 +28465,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28655,10 +28480,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28671,10 +28496,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28686,10 +28511,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28701,10 +28526,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28716,10 +28541,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28731,10 +28556,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28747,10 +28572,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -28762,10 +28587,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28777,10 +28602,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28792,10 +28617,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28807,10 +28632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28823,10 +28648,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1898 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -28838,10 +28663,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1899 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -28853,10 +28678,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1900 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28868,10 +28693,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1901 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28883,10 +28708,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1902 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28899,10 +28724,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1903 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28914,10 +28739,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1904 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -28929,10 +28754,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1905 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28944,10 +28769,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1906 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28960,10 +28785,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1907 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -28975,10 +28800,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1908 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -28990,10 +28815,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1909 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29005,10 +28830,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1910 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29020,10 +28845,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1911 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29036,10 +28861,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1912 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29052,10 +28877,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1913 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29068,10 +28893,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1914 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -29083,10 +28908,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1915 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -29098,10 +28923,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1916 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -29113,10 +28938,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1917 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -29128,10 +28953,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1918 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -29143,10 +28968,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1919 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29158,10 +28983,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1920 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29174,10 +28999,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1921 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -29190,10 +29015,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1922 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -29206,10 +29031,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1923 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29222,10 +29047,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1924 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -29240,10 +29065,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1925 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -29255,10 +29080,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1926 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -29270,10 +29095,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1927 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -29285,10 +29110,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1928 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -29300,10 +29125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1929 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -29315,10 +29140,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1938 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -29330,10 +29155,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1939 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -29345,10 +29170,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1940 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -29360,10 +29185,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -29375,10 +29200,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -29390,10 +29215,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -29405,10 +29230,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -29420,10 +29245,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -29435,10 +29260,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -29450,10 +29275,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29465,10 +29290,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29480,10 +29305,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1951 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -29495,10 +29320,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1952 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -29510,10 +29335,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29525,10 +29350,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29540,10 +29365,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29555,10 +29380,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29571,10 +29396,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29586,10 +29411,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1958 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29601,10 +29426,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1959 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29616,10 +29441,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -29631,10 +29456,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -29646,10 +29471,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29661,10 +29486,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1963 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29676,10 +29501,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1964 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29691,10 +29516,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1965 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29707,10 +29532,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1966 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29722,10 +29547,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1967 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29737,10 +29562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1968 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29752,10 +29577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1969 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29767,10 +29592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1970 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29783,10 +29608,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1971 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -29798,10 +29623,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1972 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29813,10 +29638,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1973 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29828,10 +29653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1974 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29843,10 +29668,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1975 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29859,10 +29684,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1976 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -29874,10 +29699,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1977 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -29889,10 +29714,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1978 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29904,10 +29729,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1979 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29919,10 +29744,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1980 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29935,10 +29760,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1981 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -29950,10 +29775,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1982 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -29965,10 +29790,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1983 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29980,10 +29805,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1984 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -29996,10 +29821,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1985 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -30011,10 +29836,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1986 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30026,10 +29851,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1987 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30041,10 +29866,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1988 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30056,10 +29881,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1989 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30072,10 +29897,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1990 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30088,10 +29913,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1991 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30104,10 +29929,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1992 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -30119,10 +29944,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1993 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -30134,10 +29959,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1994 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -30149,10 +29974,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1995 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -30164,10 +29989,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1996 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -30179,10 +30004,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1997 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30194,10 +30019,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1998 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30210,10 +30035,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 1999 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -30226,10 +30051,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2000 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -30242,10 +30067,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2001 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30258,10 +30083,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2002 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -30276,10 +30101,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2003 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -30291,10 +30116,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2004 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -30306,10 +30131,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2005 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -30321,10 +30146,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2006 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -30336,10 +30161,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2007 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -30351,10 +30176,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2019 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -30366,10 +30191,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2020 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -30381,10 +30206,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2021 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -30396,10 +30221,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2022 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -30411,10 +30236,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2023 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -30426,10 +30251,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2024 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -30441,10 +30266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2025 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -30456,10 +30281,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2026 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -30471,10 +30296,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2027 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -30486,10 +30311,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2028 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30501,10 +30326,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2031 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30516,10 +30341,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2032 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30531,10 +30356,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2033 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30546,10 +30371,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2034 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30561,10 +30386,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2035 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30576,10 +30401,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2036 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30591,10 +30416,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2037 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30608,10 +30433,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2038 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30623,10 +30448,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2039 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30638,10 +30463,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2040 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30653,10 +30478,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2041 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -30668,10 +30493,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2042 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -30683,10 +30508,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2043 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30698,10 +30523,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2044 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30713,10 +30538,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2045 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30728,10 +30553,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2046 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30745,10 +30570,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2047 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30760,10 +30585,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2048 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30775,10 +30600,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2049 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30790,10 +30615,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2050 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30805,10 +30630,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2051 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30822,10 +30647,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2052 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -30837,10 +30662,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2053 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30852,10 +30677,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2054 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30867,10 +30692,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2055 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30882,10 +30707,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2056 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30899,10 +30724,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2057 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -30914,10 +30739,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2058 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -30929,10 +30754,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2059 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -30944,10 +30769,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2060 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30959,10 +30784,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2061 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -30976,10 +30801,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2062 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -30991,10 +30816,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2063 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -31006,10 +30831,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2064 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31021,10 +30846,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2065 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31038,10 +30863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2066 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -31053,10 +30878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2067 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31068,10 +30893,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2068 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31083,10 +30908,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2069 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31098,10 +30923,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2070 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31115,10 +30940,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2071 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31132,10 +30957,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2072 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31148,10 +30973,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2073 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -31163,10 +30988,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2074 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -31178,10 +31003,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2075 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -31193,10 +31018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2076 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -31208,10 +31033,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2077 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -31223,10 +31048,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31238,10 +31063,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31255,10 +31080,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -31272,10 +31097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -31289,10 +31114,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31306,10 +31131,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2083 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -31324,10 +31149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2084 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -31339,10 +31164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -31354,10 +31179,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -31369,10 +31194,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -31384,10 +31209,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2088 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -31399,10 +31224,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -31414,10 +31239,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -31429,10 +31254,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -31444,10 +31269,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -31459,10 +31284,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -31474,10 +31299,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -31489,10 +31314,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -31504,10 +31329,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -31519,10 +31344,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -31534,10 +31359,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31549,10 +31374,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31564,10 +31389,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31579,10 +31404,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31594,10 +31419,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31609,10 +31434,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31624,10 +31449,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31639,10 +31464,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31656,10 +31481,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -31671,10 +31496,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31686,10 +31511,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31701,10 +31526,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -31716,10 +31541,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -31731,10 +31556,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31746,10 +31571,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31761,10 +31586,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31776,10 +31601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -31793,10 +31618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -31808,10 +31633,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31823,10 +31648,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31838,10 +31663,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31853,10 +31678,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31870,10 +31695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -31885,10 +31710,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31900,10 +31725,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31915,10 +31740,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31930,10 +31755,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31947,10 +31772,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -31962,10 +31787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -31977,10 +31802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -31992,10 +31817,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32007,10 +31832,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32024,10 +31849,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32039,10 +31864,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32054,10 +31879,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32069,10 +31894,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32086,10 +31911,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32101,10 +31926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32116,10 +31941,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32131,10 +31956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32146,10 +31971,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32163,10 +31988,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32180,10 +32005,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32196,10 +32021,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -32211,10 +32036,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -32226,10 +32051,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32241,10 +32066,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -32256,10 +32081,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32271,10 +32096,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32286,10 +32111,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32303,10 +32128,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -32320,10 +32145,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -32337,10 +32162,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32354,10 +32179,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -32372,10 +32197,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -32387,10 +32212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -32402,10 +32227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -32417,10 +32242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -32432,10 +32257,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -32447,10 +32272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -32462,10 +32287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -32477,10 +32302,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2182 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -32492,10 +32317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -32507,10 +32332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -32522,10 +32347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -32537,10 +32362,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -32552,10 +32377,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -32567,10 +32392,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -32582,10 +32407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32597,10 +32422,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -32612,10 +32437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -32627,10 +32452,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -32642,10 +32467,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -32657,10 +32482,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -32672,10 +32497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -32687,10 +32512,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -32702,10 +32527,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -32717,10 +32542,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -32732,10 +32557,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32747,10 +32572,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32763,10 +32588,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -32778,10 +32603,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32793,10 +32618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -32808,10 +32633,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -32823,10 +32648,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -32838,10 +32663,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -32853,10 +32678,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -32868,10 +32693,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -32883,10 +32708,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -32898,10 +32723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -32913,10 +32738,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -32928,10 +32753,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32943,10 +32768,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2215 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -32959,10 +32784,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -32974,10 +32799,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -32989,10 +32814,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33004,10 +32829,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33019,10 +32844,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33035,10 +32860,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -33050,10 +32875,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33065,10 +32890,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33080,10 +32905,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33095,10 +32920,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33111,10 +32936,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -33126,10 +32951,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2227 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33141,10 +32966,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33156,10 +32981,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33171,10 +32996,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33187,10 +33012,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33202,10 +33027,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33217,10 +33042,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2233 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33232,10 +33057,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33248,10 +33073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33263,10 +33088,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2236 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33278,10 +33103,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33293,10 +33118,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33308,10 +33133,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2239 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33324,10 +33149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2240 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33340,10 +33165,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33356,10 +33181,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -33371,10 +33196,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33386,10 +33211,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33401,10 +33226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33416,10 +33241,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33431,10 +33256,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33446,10 +33271,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33462,10 +33287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -33478,10 +33303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -33494,10 +33319,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33510,10 +33335,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -33527,10 +33352,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2253 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -33542,10 +33367,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -33557,10 +33382,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -33572,10 +33397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -33587,10 +33412,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -33602,10 +33427,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -33617,10 +33442,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -33632,10 +33457,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2268 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -33647,10 +33472,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -33662,10 +33487,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -33677,10 +33502,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -33692,10 +33517,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -33707,10 +33532,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -33722,10 +33547,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -33737,10 +33562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -33752,10 +33577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -33767,10 +33592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -33782,10 +33607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -33797,10 +33622,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -33812,10 +33637,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -33827,10 +33652,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -33842,10 +33667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -33857,10 +33682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -33872,10 +33697,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -33887,10 +33712,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -33902,10 +33727,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -33918,10 +33743,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -33933,10 +33758,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -33948,10 +33773,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -33963,10 +33788,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -33978,10 +33803,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -33993,10 +33818,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34008,10 +33833,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34023,10 +33848,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -34038,10 +33863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -34053,10 +33878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -34068,10 +33893,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -34083,10 +33908,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34098,10 +33923,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34114,10 +33939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34129,10 +33954,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2303 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34144,10 +33969,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2304 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34159,10 +33984,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2305 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34174,10 +33999,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2306 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34190,10 +34015,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2307 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -34205,10 +34030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2308 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34220,10 +34045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34235,10 +34060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34250,10 +34075,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2311 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34266,10 +34091,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -34281,10 +34106,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34296,10 +34121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34311,10 +34136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34326,10 +34151,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34342,10 +34167,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34357,10 +34182,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34372,10 +34197,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2319 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34387,10 +34212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2320 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34403,10 +34228,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34418,10 +34243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34433,10 +34258,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34448,10 +34273,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34463,10 +34288,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34479,10 +34304,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2326 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34495,10 +34320,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2327 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34511,10 +34336,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2328 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -34526,10 +34351,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2329 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34541,10 +34366,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2330 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34556,10 +34381,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2331 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34571,10 +34396,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34586,10 +34411,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2333 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34601,10 +34426,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34617,10 +34442,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -34633,10 +34458,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -34649,10 +34474,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34665,10 +34490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -34682,10 +34507,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -34697,10 +34522,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -34712,10 +34537,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -34727,10 +34552,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -34742,10 +34567,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -34757,10 +34582,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2355 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -34772,10 +34597,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2356 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -34787,10 +34612,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2357 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -34802,10 +34627,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2358 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -34817,10 +34642,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2359 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -34832,10 +34657,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2360 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -34847,10 +34672,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2361 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -34862,10 +34687,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2362 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -34877,10 +34702,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2363 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -34892,10 +34717,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34907,10 +34732,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2367 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34922,10 +34747,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34937,10 +34762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34952,10 +34777,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2370 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34967,10 +34792,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34982,10 +34807,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2372 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -34997,10 +34822,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2373 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35012,10 +34837,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2374 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35027,10 +34852,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35042,10 +34867,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35057,10 +34882,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35072,10 +34897,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35087,10 +34912,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -35103,10 +34928,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35118,10 +34943,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35133,10 +34958,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35148,10 +34973,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35163,10 +34988,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35178,10 +35003,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35193,10 +35018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35208,10 +35033,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35223,10 +35048,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35238,10 +35063,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2389 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35254,10 +35079,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2390 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35269,10 +35094,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2391 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35285,10 +35110,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2392 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35300,10 +35125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2393 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -35316,10 +35141,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2394 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -35331,10 +35156,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2395 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35346,10 +35171,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2396 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35362,10 +35187,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35377,10 +35202,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35392,10 +35217,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35407,10 +35232,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -35422,10 +35247,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2401 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35437,10 +35262,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35453,10 +35278,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2403 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35468,10 +35293,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2404 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35483,10 +35308,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35498,10 +35323,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2406 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35513,10 +35338,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2407 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35528,10 +35353,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2408 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35544,10 +35369,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2409 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35559,10 +35384,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2410 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35574,10 +35399,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2411 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35589,10 +35414,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35604,10 +35429,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -35619,10 +35444,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35634,10 +35459,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35649,10 +35474,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35665,10 +35490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35680,10 +35505,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35695,10 +35520,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35710,10 +35535,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -35725,10 +35550,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35740,10 +35565,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2422 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35755,10 +35580,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2423 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35770,10 +35595,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2424 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35785,10 +35610,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2425 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35800,10 +35625,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2426 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35816,10 +35641,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -35831,10 +35656,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -35846,10 +35671,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -35862,10 +35687,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -35877,10 +35702,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -35892,10 +35717,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -35908,10 +35733,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -35923,10 +35748,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2434 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35938,10 +35763,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2435 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35953,10 +35778,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2436 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35969,10 +35794,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2437 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35984,10 +35809,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -35999,10 +35824,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2439 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36014,10 +35839,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2440 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36029,10 +35854,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2441 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36044,10 +35869,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36059,10 +35884,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36074,10 +35899,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36090,10 +35915,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36106,10 +35931,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36123,10 +35948,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36140,10 +35965,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36156,10 +35981,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36173,10 +35998,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36189,10 +36014,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36205,10 +36030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36221,10 +36046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -36237,10 +36062,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -36252,10 +36077,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -36267,10 +36092,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -36282,10 +36107,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -36297,10 +36122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2458 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -36312,10 +36137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2467 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -36327,10 +36152,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2468 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -36342,10 +36167,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2469 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -36357,10 +36182,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2470 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -36372,10 +36197,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -36387,10 +36212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -36402,10 +36227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -36417,10 +36242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -36432,10 +36257,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2475 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -36447,10 +36272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36462,10 +36287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36477,10 +36302,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2480 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36492,10 +36317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36507,10 +36332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36522,10 +36347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36537,10 +36362,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36552,10 +36377,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2485 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36567,10 +36392,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36582,10 +36407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36597,10 +36422,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36612,10 +36437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36627,10 +36452,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36642,10 +36467,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -36658,10 +36483,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36673,10 +36498,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2493 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36688,10 +36513,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36703,10 +36528,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2495 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36718,10 +36543,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2496 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36733,10 +36558,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2497 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36748,10 +36573,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2498 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36763,10 +36588,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2499 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36778,10 +36603,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2500 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36793,10 +36618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36809,10 +36634,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36824,10 +36649,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2503 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36840,10 +36665,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2504 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36855,10 +36680,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2505 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -36871,10 +36696,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -36886,10 +36711,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36901,10 +36726,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36917,10 +36742,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -36932,10 +36757,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -36947,10 +36772,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -36962,10 +36787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -36977,10 +36802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -36992,10 +36817,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2514 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37008,10 +36833,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2515 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37023,10 +36848,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2516 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37038,10 +36863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2517 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37053,10 +36878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37068,10 +36893,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37083,10 +36908,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37099,10 +36924,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37114,10 +36939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37129,10 +36954,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37144,10 +36969,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37159,10 +36984,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -37174,10 +36999,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37189,10 +37014,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37204,10 +37029,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37220,10 +37045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37235,10 +37060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37250,10 +37075,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37265,10 +37090,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -37280,10 +37105,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2533 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37295,10 +37120,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2534 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37310,10 +37135,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2535 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37325,10 +37150,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2536 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37340,10 +37165,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2537 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37355,10 +37180,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2538 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37371,10 +37196,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2539 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -37386,10 +37211,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2540 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -37401,10 +37226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2541 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -37417,10 +37242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2542 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -37432,10 +37257,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2543 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -37447,10 +37272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2544 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -37463,10 +37288,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2545 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -37478,10 +37303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2546 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37493,10 +37318,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2547 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37508,10 +37333,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2548 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37524,10 +37349,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2549 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37539,10 +37364,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2550 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37554,10 +37379,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2551 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37569,10 +37394,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2552 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37584,10 +37409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2553 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37599,10 +37424,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2554 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37614,10 +37439,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2555 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37629,10 +37454,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2556 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37645,10 +37470,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2557 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37661,10 +37486,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2558 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37678,10 +37503,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2559 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37695,10 +37520,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2560 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37711,10 +37536,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2561 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37728,10 +37553,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2562 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37744,10 +37569,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2563 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37760,10 +37585,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2564 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37776,10 +37601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2565 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -37792,10 +37617,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2566 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -37807,10 +37632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2567 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -37822,10 +37647,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2568 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -37837,10 +37662,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2569 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -37852,10 +37677,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2570 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/bindings/Math/random @@ -37877,21 +37702,20 @@ local.get $1 f64.const 0 f64.ge - local.tee $2 if (result i32) local.get $1 f64.const 1 f64.lt else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2579 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -37907,8 +37731,8 @@ block $~lib/math/NativeMathf.seedRandom|inlined.0 call $~lib/bindings/Math/random i64.reinterpret_f64 - local.set $3 - local.get $3 + local.set $2 + local.get $2 call $~lib/math/NativeMath.seedRandom end block $break|1 @@ -37923,25 +37747,24 @@ br_if $break|1 block call $~lib/math/NativeMathf.random - local.set $4 - local.get $4 + local.set $3 + local.get $3 f32.const 0 f32.ge - local.tee $2 if (result i32) - local.get $4 + local.get $3 f32.const 1 f32.lt else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2587 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -37962,10 +37785,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2601 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -37976,10 +37799,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2602 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -37990,10 +37813,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2603 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -38004,10 +37827,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2604 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -38018,10 +37841,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2605 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -38032,10 +37855,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2606 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -38046,10 +37869,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2607 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -38060,10 +37883,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2608 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -38074,10 +37897,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2609 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -38088,10 +37911,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2610 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -38102,10 +37925,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2613 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38116,10 +37939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2614 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38132,10 +37955,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2615 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -38146,10 +37969,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2616 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -38160,10 +37983,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2617 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -38174,10 +37997,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2618 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -38188,10 +38011,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2619 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -38202,10 +38025,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2620 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -38216,10 +38039,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2621 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -38230,10 +38053,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2622 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -38244,10 +38067,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2623 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -38258,10 +38081,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2624 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -38272,10 +38095,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2625 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -38286,10 +38109,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2626 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -38300,10 +38123,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2627 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -38314,10 +38137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2628 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -38328,10 +38151,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2629 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -38342,10 +38165,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2638 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -38356,10 +38179,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2639 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -38370,10 +38193,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2640 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -38384,10 +38207,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2641 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -38398,10 +38221,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2642 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -38412,10 +38235,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2643 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -38426,10 +38249,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2644 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -38440,10 +38263,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2645 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -38454,10 +38277,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2646 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -38468,10 +38291,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2647 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -38482,10 +38305,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2650 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38496,10 +38319,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2651 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38512,10 +38335,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2652 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -38526,10 +38349,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2653 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -38540,10 +38363,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2654 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -38554,10 +38377,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2655 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -38568,10 +38391,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2656 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -38582,10 +38405,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2657 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -38596,10 +38419,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2658 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -38610,10 +38433,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2659 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -38624,10 +38447,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2660 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -38638,10 +38461,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2661 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -38652,10 +38475,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2662 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -38666,10 +38489,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2663 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -38680,10 +38503,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2664 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -38694,10 +38517,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2665 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -38708,10 +38531,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2666 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -38722,10 +38545,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2677 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -38736,10 +38559,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2678 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -38750,10 +38573,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2679 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -38764,10 +38587,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2680 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -38778,10 +38601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2681 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -38792,10 +38615,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2682 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38806,10 +38629,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2683 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -38821,10 +38644,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2684 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -38835,10 +38658,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2685 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -38849,10 +38672,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2693 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -38863,10 +38686,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2694 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -38877,10 +38700,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2695 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -38891,10 +38714,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2696 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -38905,10 +38728,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2697 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -38919,10 +38742,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2698 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38933,10 +38756,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2699 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -38948,10 +38771,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2700 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -38962,10 +38785,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2701 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.4 (result i32) @@ -38988,10 +38811,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2707 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.5 (result i32) @@ -39014,10 +38837,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2708 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.6 (result i32) @@ -39040,10 +38863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2709 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.7 (result i32) @@ -39066,10 +38889,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2710 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.8 (result i32) @@ -39092,10 +38915,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2711 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.9 (result i32) @@ -39119,10 +38942,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2712 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.10 (result i32) @@ -39145,10 +38968,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2713 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMath.signbit|inlined.11 (result i32) @@ -39172,21 +38995,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2714 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.4 (result i32) f32.const 0 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39197,21 +39020,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2720 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.5 (result i32) f32.const -0 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39222,21 +39045,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2721 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.6 (result i32) f32.const 1 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39247,21 +39070,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2722 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.7 (result i32) f32.const -1 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39272,21 +39095,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2723 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.8 (result i32) f32.const nan:0x400000 - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39297,22 +39120,22 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2724 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.9 (result i32) f32.const nan:0x400000 f32.neg - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39323,21 +39146,21 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2725 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.10 (result i32) f32.const inf - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39348,22 +39171,22 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2726 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/math/NativeMathf.signbit|inlined.11 (result i32) f32.const inf f32.neg - local.set $4 - local.get $4 + local.set $3 + local.get $3 i32.reinterpret_f32 i32.const 31 i32.shr_u - local.get $4 - local.get $4 + local.get $3 + local.get $3 f32.eq i32.and end @@ -39374,10 +39197,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2727 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -39389,10 +39212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2738 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -39404,10 +39227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2739 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -39419,10 +39242,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2740 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -39434,10 +39257,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2741 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -39449,10 +39272,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2742 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.450045556060236 @@ -39464,10 +39287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2743 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.858890253041697 @@ -39479,10 +39302,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2744 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.792054511984896 @@ -39494,10 +39317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2745 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.615702673197924 @@ -39509,10 +39332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2746 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5587586823609152 @@ -39524,10 +39347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2747 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39539,10 +39362,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2750 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -39554,10 +39377,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2751 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -39569,10 +39392,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2752 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -39584,10 +39407,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2753 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39599,10 +39422,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2754 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39614,10 +39437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2755 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -39629,10 +39452,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2756 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -39644,10 +39467,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2757 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -39659,10 +39482,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2758 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -39674,10 +39497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2759 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39689,10 +39512,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2760 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39705,10 +39528,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2761 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -39720,10 +39543,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2762 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39735,10 +39558,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2763 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -39750,10 +39573,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2764 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -39765,10 +39588,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2765 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -39780,10 +39603,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2766 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -39795,10 +39618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2767 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -39810,10 +39633,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2768 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -39825,10 +39648,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2769 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -39840,10 +39663,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2770 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -39855,10 +39678,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2771 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -39870,10 +39693,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2772 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39885,10 +39708,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2773 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -39901,10 +39724,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2774 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -39916,10 +39739,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2775 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39931,10 +39754,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2776 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39946,10 +39769,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2777 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39961,10 +39784,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2778 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39977,10 +39800,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2779 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -39992,10 +39815,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2780 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40007,10 +39830,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2781 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40022,10 +39845,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2782 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40037,10 +39860,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2783 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40053,10 +39876,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2784 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -40068,10 +39891,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2785 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40083,10 +39906,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2786 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40098,10 +39921,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2787 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40113,10 +39936,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2788 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40129,10 +39952,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2789 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40144,10 +39967,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2790 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40159,10 +39982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2791 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40174,10 +39997,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2792 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40190,10 +40013,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2793 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40205,10 +40028,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2794 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40220,10 +40043,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2795 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40235,10 +40058,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2796 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40250,10 +40073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2797 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40266,10 +40089,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2798 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40282,10 +40105,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2799 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40298,10 +40121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2800 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -40313,10 +40136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2801 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40328,10 +40151,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2802 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40343,10 +40166,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2803 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40358,10 +40181,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2804 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40373,10 +40196,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2805 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40388,10 +40211,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2806 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40404,10 +40227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2807 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -40420,10 +40243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2808 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -40436,10 +40259,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2809 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40452,10 +40275,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2810 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -40469,10 +40292,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2811 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -40484,10 +40307,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2812 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -40499,10 +40322,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2813 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.75 @@ -40514,10 +40337,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2814 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.75 @@ -40529,10 +40352,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2815 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8e-323 @@ -40544,10 +40367,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2816 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -40559,10 +40382,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2825 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -40574,10 +40397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2826 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -40589,10 +40412,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2827 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -40604,10 +40427,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2828 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -40619,10 +40442,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2829 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.450045585632324 @@ -40634,10 +40457,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2830 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.858890056610107 @@ -40649,10 +40472,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2831 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.7920545339584351 @@ -40664,10 +40487,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2832 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6157026886940002 @@ -40679,10 +40502,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2833 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5587586760520935 @@ -40694,10 +40517,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2834 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -40709,10 +40532,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2837 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -40724,10 +40547,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2838 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -40739,10 +40562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2839 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -40754,10 +40577,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2840 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -40769,10 +40592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2841 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -40784,10 +40607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2842 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -40799,10 +40622,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2843 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -40814,10 +40637,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2844 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -40829,10 +40652,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2845 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -40844,10 +40667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2846 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -40859,10 +40682,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2847 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -40875,10 +40698,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2848 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -40890,10 +40713,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2849 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -40905,10 +40728,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2850 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -40920,10 +40743,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2851 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -40935,10 +40758,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2852 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -40950,10 +40773,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2853 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -40965,10 +40788,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2854 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -40980,10 +40803,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2855 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -40995,10 +40818,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2856 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -41010,10 +40833,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2857 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2 @@ -41025,10 +40848,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2858 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2 @@ -41040,10 +40863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2859 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41055,10 +40878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2860 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41071,10 +40894,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2861 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41086,10 +40909,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2862 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41101,10 +40924,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2863 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41116,10 +40939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2864 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41131,10 +40954,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2865 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41147,10 +40970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2866 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41162,10 +40985,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2867 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41177,10 +41000,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2868 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41192,10 +41015,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2869 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41207,10 +41030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2870 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41223,10 +41046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2871 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41238,10 +41061,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2872 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -41253,10 +41076,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2873 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41268,10 +41091,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2874 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41283,10 +41106,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2875 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41299,10 +41122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2876 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41314,10 +41137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2877 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41329,10 +41152,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2878 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41344,10 +41167,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2879 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41360,10 +41183,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2880 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41375,10 +41198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2881 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41390,10 +41213,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2882 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41405,10 +41228,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2883 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41420,10 +41243,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2884 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41436,10 +41259,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2885 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41452,10 +41275,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2886 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41468,10 +41291,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2887 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41483,10 +41306,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2888 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -41498,10 +41321,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2889 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41513,10 +41336,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2890 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -41528,10 +41351,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2891 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41543,10 +41366,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2892 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41558,10 +41381,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2893 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41574,10 +41397,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2894 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -41590,10 +41413,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2895 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -41606,10 +41429,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2896 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41622,10 +41445,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2897 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41639,10 +41462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2898 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -41654,10 +41477,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2899 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -41669,10 +41492,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2900 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.75 @@ -41684,10 +41507,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2901 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.75 @@ -41699,10 +41522,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2902 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -41714,10 +41537,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2903 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -41728,10 +41551,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2941 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -41742,10 +41565,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2942 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -41756,10 +41579,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2943 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -41770,10 +41593,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2944 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -41784,10 +41607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2945 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -41798,10 +41621,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2946 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -41812,10 +41635,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2947 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -41826,10 +41649,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2948 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -41840,10 +41663,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2949 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -41854,10 +41677,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2950 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -41868,10 +41691,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2953 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -41882,10 +41705,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2954 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41896,10 +41719,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2955 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -41911,10 +41734,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2956 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -41925,10 +41748,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2957 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -41939,10 +41762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2960 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -41953,10 +41776,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2961 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -41967,10 +41790,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2962 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -41981,10 +41804,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2963 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -41997,10 +41820,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2964 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -42013,10 +41836,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2965 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -42027,10 +41850,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2966 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -42041,10 +41864,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2967 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -42055,10 +41878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2968 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -42069,10 +41892,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2969 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -42083,10 +41906,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2970 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -42097,10 +41920,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2971 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1175870895385742e-08 @@ -42111,10 +41934,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2972 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4901161193847656e-08 @@ -42125,10 +41948,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2973 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -42139,10 +41962,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2974 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.0003662109375 @@ -42153,10 +41976,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2975 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -42167,10 +41990,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2976 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -42181,10 +42004,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2977 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -42195,10 +42018,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2978 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.350988701644575e-38 @@ -42209,10 +42032,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2979 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -42223,10 +42046,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2980 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -42237,10 +42060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2981 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1175870895385742e-08 @@ -42251,10 +42074,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2982 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.4901161193847656e-08 @@ -42265,10 +42088,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2983 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -42279,10 +42102,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2984 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.0003662109375 @@ -42293,10 +42116,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2985 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -42309,10 +42132,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2986 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -42325,10 +42148,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2987 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -42341,10 +42164,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2988 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -42357,10 +42180,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2989 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -42373,10 +42196,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2990 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -42389,10 +42212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2991 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -42405,10 +42228,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2992 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -42421,10 +42244,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2993 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -42437,10 +42260,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2994 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -42453,10 +42276,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2995 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -42469,10 +42292,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2996 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -42485,10 +42308,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 2997 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 255.99993896484375 @@ -42499,10 +42322,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3000 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5033165 @@ -42513,10 +42336,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3001 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 421657440 @@ -42527,10 +42350,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3002 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2147483392 @@ -42541,10 +42364,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3003 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 68719476736 @@ -42555,10 +42378,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3004 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 549755813888 @@ -42569,10 +42392,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3005 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -42583,10 +42406,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3006 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -255.99993896484375 @@ -42597,10 +42420,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3007 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5033165 @@ -42611,10 +42434,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3008 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -421657440 @@ -42625,10 +42448,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3009 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2147483392 @@ -42639,10 +42462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3010 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -68719476736 @@ -42653,10 +42476,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3011 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -549755813888 @@ -42667,10 +42490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3012 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -42682,10 +42505,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3013 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -42696,10 +42519,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3025 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -42710,10 +42533,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3026 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -42724,10 +42547,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3027 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -42738,10 +42561,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3028 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -42752,10 +42575,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3029 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -42766,10 +42589,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3030 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -42780,10 +42603,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3031 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -42794,10 +42617,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3032 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -42808,10 +42631,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3033 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -42822,10 +42645,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3034 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -42836,10 +42659,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3037 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -42850,10 +42673,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3038 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -42864,10 +42687,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3039 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -42880,10 +42703,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3040 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -42894,10 +42717,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3041 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -42908,10 +42731,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3050 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -42922,10 +42745,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3051 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -42936,10 +42759,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3052 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -42950,10 +42773,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3053 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -42964,10 +42787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3054 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -42978,10 +42801,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3055 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -42992,10 +42815,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3056 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -43006,10 +42829,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3057 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -43020,10 +42843,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3058 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -43034,10 +42857,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3059 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -43048,10 +42871,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3062 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -43062,10 +42885,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3063 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -43076,10 +42899,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3064 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -43092,10 +42915,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3065 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -43106,10 +42929,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3066 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -43120,10 +42943,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3078 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -43134,10 +42957,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3079 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -43148,10 +42971,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3080 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -43162,10 +42985,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3081 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -43176,10 +42999,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3082 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -43190,10 +43013,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3083 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -43204,10 +43027,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3084 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -43218,10 +43041,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3085 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -43232,10 +43055,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3086 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -43246,10 +43069,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3087 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -43260,10 +43083,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3090 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -43274,10 +43097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3091 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -43289,10 +43112,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3092 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -43303,10 +43126,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3093 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -43317,10 +43140,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3094 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -43331,10 +43154,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3095 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -43345,10 +43168,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3096 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4 @@ -43359,10 +43182,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3097 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-323 @@ -43373,10 +43196,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3098 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5e-323 @@ -43387,10 +43210,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3099 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 @@ -43401,10 +43224,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -5e-324 @@ -43415,10 +43238,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -43429,10 +43252,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.9999999999999998 @@ -43443,10 +43266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -43457,10 +43280,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.0000000000000004 @@ -43471,10 +43294,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000000000000002 @@ -43485,10 +43308,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 @@ -43499,10 +43322,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1797693134862315708145274e284 @@ -43513,10 +43336,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 @@ -43527,10 +43350,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 179769313486231490980915e285 @@ -43541,10 +43364,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862314111473026e284 @@ -43555,10 +43378,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862313313136902e284 @@ -43569,10 +43392,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862312514800778e284 @@ -43583,10 +43406,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862311716464655e284 @@ -43597,10 +43420,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862310918128531e284 @@ -43611,10 +43434,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862310119792407e284 @@ -43625,10 +43448,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862309321456283e284 @@ -43639,10 +43462,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862308523120159e284 @@ -43653,10 +43476,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862307724784036e284 @@ -43667,10 +43490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507203e-308 @@ -43681,10 +43504,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507205e-308 @@ -43695,10 +43518,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507207e-308 @@ -43709,10 +43532,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507209e-308 @@ -43723,10 +43546,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.225073858507211e-308 @@ -43737,10 +43560,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072127e-308 @@ -43751,10 +43574,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072147e-308 @@ -43765,10 +43588,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072167e-308 @@ -43779,10 +43602,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072187e-308 @@ -43793,10 +43616,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072207e-308 @@ -43807,10 +43630,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072226e-308 @@ -43821,10 +43644,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072246e-308 @@ -43835,10 +43658,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072266e-308 @@ -43849,10 +43672,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072286e-308 @@ -43863,10 +43686,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 92.35130391890645 @@ -43877,10 +43700,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 93.3599596388916 @@ -43891,10 +43714,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 95.42049628886124 @@ -43905,10 +43728,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 95.87916941885449 @@ -43919,10 +43742,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 96.84804174884022 @@ -43933,10 +43756,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.43639050883155 @@ -43947,10 +43770,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.50957979883047 @@ -43961,10 +43784,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 97.80496893882612 @@ -43975,10 +43798,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 98.2751822888192 @@ -43989,10 +43812,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 99.47293564880155 @@ -44003,10 +43826,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.57047130878539 @@ -44017,10 +43840,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.60954608878481 @@ -44031,10 +43854,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 100.67909109878379 @@ -44045,10 +43868,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 101.12268095877725 @@ -44059,10 +43882,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 101.3027691287746 @@ -44073,10 +43896,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.45932313565507e-307 @@ -44087,10 +43910,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.610957305180409e-307 @@ -44101,10 +43924,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5.8073887977408524e-307 @@ -44115,10 +43938,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.026137080471427e-307 @@ -44129,10 +43952,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 8.438697769194972e-307 @@ -44143,10 +43966,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1607792515836795e-306 @@ -44157,10 +43980,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.2827413827423193e-306 @@ -44171,10 +43994,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.7116604596087457e-306 @@ -44185,10 +44008,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.038173251686994e-306 @@ -44199,10 +44022,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.171572060856931e-306 @@ -44213,10 +44036,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.4681399631804094e-306 @@ -44227,10 +44050,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.5175533964200588e-306 @@ -44241,10 +44064,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.6461505468829625e-306 @@ -44255,10 +44078,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.8167076367720413e-306 @@ -44269,10 +44092,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.5743220778562766e-306 @@ -44283,10 +44106,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -44297,10 +44120,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3172 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -44311,10 +44134,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -44325,10 +44148,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -44339,10 +44162,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -44353,10 +44176,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3176 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -44367,10 +44190,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -44381,10 +44204,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3178 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -44395,10 +44218,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -44409,10 +44232,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -44423,10 +44246,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -44437,10 +44260,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3184 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -44451,10 +44274,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -44466,10 +44289,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -44480,10 +44303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -44494,10 +44317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3188 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -44508,10 +44331,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -44522,10 +44345,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4 @@ -44536,10 +44359,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -44550,10 +44373,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.203895392974451e-45 @@ -44564,10 +44387,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -44578,10 +44401,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -44592,10 +44415,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3402823466385288598117041e14 @@ -44606,10 +44429,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3402823466385288598117041e14 @@ -44620,10 +44443,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999998807907104 @@ -44634,10 +44457,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999999403953552 @@ -44648,10 +44471,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.999999761581421 @@ -44662,10 +44485,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.9999998807907104 @@ -44676,10 +44499,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000001192092896 @@ -44690,10 +44513,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.000000238418579 @@ -44704,10 +44527,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.000000238418579 @@ -44718,10 +44541,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.000000476837158 @@ -44732,10 +44555,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -44746,10 +44569,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -44760,10 +44583,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -44774,10 +44597,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -44788,10 +44611,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -44802,10 +44625,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -44816,10 +44639,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -44830,10 +44653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -44844,10 +44667,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -44858,10 +44681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -44872,10 +44695,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -44886,10 +44709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -44900,10 +44723,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -44914,10 +44737,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -44929,10 +44752,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -44943,10 +44766,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3259 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.862645149230957e-09 @@ -44957,10 +44780,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.862645149230957e-09 @@ -44971,10 +44794,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3263 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754943508222875e-38 @@ -44985,10 +44808,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754943508222875e-38 @@ -44999,10 +44822,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.401298464324817e-45 @@ -45015,10 +44838,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.401298464324817e-45 @@ -45031,10 +44854,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.175494490952134e-38 @@ -45045,10 +44868,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3268 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754946310819804e-38 @@ -45059,10 +44882,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509880009953429e-38 @@ -45073,10 +44896,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -45087,10 +44910,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.3509895424236536e-38 @@ -45101,10 +44924,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.70197740328915e-38 @@ -45115,10 +44938,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1175870895385742e-08 @@ -45129,10 +44952,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.4901161193847656e-08 @@ -45143,10 +44966,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3275 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.000244140625 @@ -45157,10 +44980,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.175494490952134e-38 @@ -45171,10 +44994,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754946310819804e-38 @@ -45185,10 +45008,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509880009953429e-38 @@ -45199,10 +45022,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.350988701644575e-38 @@ -45213,10 +45036,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.3509895424236536e-38 @@ -45227,10 +45050,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -4.70197740328915e-38 @@ -45241,10 +45064,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1175870895385742e-08 @@ -45255,10 +45078,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.4901161193847656e-08 @@ -45269,10 +45092,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.000244140625 @@ -45283,10 +45106,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3285 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.802596928649634e-45 @@ -45299,10 +45122,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.2611686178923354e-44 @@ -45315,10 +45138,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 2.938735877055719e-39 @@ -45331,10 +45154,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 5.877471754111438e-39 @@ -45347,10 +45170,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754940705625946e-38 @@ -45363,10 +45186,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.1754942106924411e-38 @@ -45379,10 +45202,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.802596928649634e-45 @@ -45395,10 +45218,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.2611686178923354e-44 @@ -45411,10 +45234,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3293 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -2.938735877055719e-39 @@ -45427,10 +45250,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -5.877471754111438e-39 @@ -45443,10 +45266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754940705625946e-38 @@ -45459,10 +45282,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.1754942106924411e-38 @@ -45475,10 +45298,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -45489,10 +45312,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3309 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -45503,10 +45326,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3310 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -45517,10 +45340,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3311 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -45531,10 +45354,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -45545,10 +45368,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3313 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -45559,10 +45382,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3314 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -45573,10 +45396,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3315 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -45587,10 +45410,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3316 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -45601,10 +45424,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3317 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -45615,10 +45438,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3318 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -45629,10 +45452,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3321 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -45643,10 +45466,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3322 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -45657,10 +45480,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3323 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -45672,10 +45495,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3324 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -45686,10 +45509,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3325 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -45700,10 +45523,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3334 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -45714,10 +45537,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3335 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -45728,10 +45551,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3336 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -45742,10 +45565,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3337 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -45756,10 +45579,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3338 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -45770,10 +45593,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3339 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -45784,10 +45607,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3340 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -45798,10 +45621,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3341 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -45812,10 +45635,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3342 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -45826,10 +45649,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3343 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -45840,10 +45663,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3346 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -45854,10 +45677,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3347 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -45868,10 +45691,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3348 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -45883,10 +45706,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3349 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -45897,10 +45720,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3350 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.06684839057968 @@ -45911,10 +45734,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3362 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.345239849338305 @@ -45925,10 +45748,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3363 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -8.38143342755525 @@ -45939,10 +45762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3364 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -6.531673581913484 @@ -45953,10 +45776,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3365 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9.267056966972586 @@ -45967,10 +45790,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3366 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.6619858980995045 @@ -45981,10 +45804,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3367 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.4066039223853553 @@ -45995,10 +45818,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3368 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5617597462207241 @@ -46009,10 +45832,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3369 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.7741522965913037 @@ -46023,10 +45846,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3370 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.6787637026394024 @@ -46037,10 +45860,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3371 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -46051,10 +45874,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3374 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -46065,10 +45888,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3375 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -46081,10 +45904,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3376 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -46095,10 +45918,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3377 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -46109,10 +45932,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3378 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -46123,10 +45946,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3379 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -46137,10 +45960,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3380 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -46151,10 +45974,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3381 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -46165,10 +45988,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3382 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.0000152587890625 @@ -46179,10 +46002,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3383 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.0000152587890625 @@ -46193,10 +46016,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3384 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999923706054688 @@ -46207,10 +46030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3385 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.9999923706054688 @@ -46221,10 +46044,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3386 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 7.888609052210118e-31 @@ -46235,10 +46058,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3387 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -7.888609052210118e-31 @@ -46249,10 +46072,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3388 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.066848754882812 @@ -46263,10 +46086,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3397 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 4.345239639282227 @@ -46277,10 +46100,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3398 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -8.381433486938477 @@ -46291,10 +46114,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3399 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -6.531673431396484 @@ -46305,10 +46128,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3400 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 9.267057418823242 @@ -46319,10 +46142,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3401 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.6619858741760254 @@ -46333,10 +46156,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3402 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.40660393238067627 @@ -46347,10 +46170,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3403 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5617597699165344 @@ -46361,10 +46184,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3404 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.7741522789001465 @@ -46375,10 +46198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3405 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.6787636876106262 @@ -46389,10 +46212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3406 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -46403,10 +46226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3409 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -46417,10 +46240,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3410 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -46433,10 +46256,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3411 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -46447,10 +46270,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3412 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -46461,10 +46284,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3413 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -46475,10 +46298,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3414 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -46489,10 +46312,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3415 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -46503,10 +46326,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3416 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -46517,10 +46340,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3417 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.0000152587890625 @@ -46531,10 +46354,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3418 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.0000152587890625 @@ -46545,10 +46368,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3419 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.9999923706054688 @@ -46559,10 +46382,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3420 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.9999923706054688 @@ -46573,10 +46396,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3421 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 7.888609052210118e-31 @@ -46587,10 +46410,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3422 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -7.888609052210118e-31 @@ -46601,10 +46424,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3423 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2 @@ -46615,10 +46438,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3427 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -46629,10 +46452,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3428 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2 @@ -46643,10 +46466,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3429 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295 @@ -46657,10 +46480,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3430 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967294 @@ -46671,10 +46494,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3431 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+60 @@ -46685,10 +46508,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3432 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+60 @@ -46699,10 +46522,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3433 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.e+60 @@ -46713,10 +46536,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3434 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+24 @@ -46727,10 +46550,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3435 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -46741,10 +46564,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3436 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -46755,10 +46578,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3437 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -46769,10 +46592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3438 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -46782,10 +46605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3442 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -46795,10 +46618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3443 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -46808,10 +46631,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3444 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -128 @@ -46821,10 +46644,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3445 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295 @@ -46834,10 +46657,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3446 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967295.5 @@ -46847,10 +46670,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3447 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967296 @@ -46860,10 +46683,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3448 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967297 @@ -46873,10 +46696,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3449 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -46886,10 +46709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3450 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -46899,10 +46722,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3451 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -46912,10 +46735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3452 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_SAFE_INTEGER @@ -46926,10 +46749,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3453 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -46939,10 +46762,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3454 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -46952,10 +46775,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3455 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -46966,10 +46789,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3456 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON @@ -46979,10 +46802,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3457 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -46993,10 +46816,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3461 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -47007,10 +46830,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3462 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -47021,10 +46844,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3463 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -47035,10 +46858,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3464 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -47049,10 +46872,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3466 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -47063,10 +46886,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3467 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -47077,10 +46900,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3468 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1 @@ -47091,10 +46914,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3469 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47105,10 +46928,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3471 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47119,10 +46942,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3472 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47133,10 +46956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3473 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 2 @@ -47147,10 +46970,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3474 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -47161,10 +46984,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3476 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -47175,10 +46998,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3477 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -47189,10 +47012,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3478 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 @@ -47203,10 +47026,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3479 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -47217,10 +47040,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3481 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -47231,10 +47054,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3482 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -47245,10 +47068,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3483 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -2 @@ -47259,10 +47082,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3484 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47273,10 +47096,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3486 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47287,10 +47110,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3487 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47301,10 +47124,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3488 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47315,10 +47138,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3489 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47329,10 +47152,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3490 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47343,10 +47166,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3491 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 3 @@ -47357,10 +47180,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3492 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 57055 @@ -47375,10 +47198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3494 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -47389,10 +47212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3498 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -47403,70 +47226,49 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3499 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isNaN|inlined.2 (result i32) - f32.const nan:0x400000 - i32.const 1 - call $~lib/math/ipow32f - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + i32.const 1 + call $~lib/math/ipow32f + call $~lib/builtins/isNaN i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3500 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isNaN|inlined.3 (result i32) - f32.const nan:0x400000 - i32.const -1 - call $~lib/math/ipow32f - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + i32.const -1 + call $~lib/math/ipow32f + call $~lib/builtins/isNaN i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3501 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/builtins/isNaN|inlined.4 (result i32) - f32.const nan:0x400000 - i32.const 2 - call $~lib/math/ipow32f - local.set $4 - local.get $4 - local.get $4 - f32.ne - end - i32.const 0 - i32.ne + f32.const nan:0x400000 + i32.const 2 + call $~lib/math/ipow32f + call $~lib/builtins/isNaN i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3502 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47477,10 +47279,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3503 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47491,10 +47293,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3504 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47506,10 +47308,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3505 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47522,10 +47324,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3506 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -47537,10 +47339,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3507 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -47551,10 +47353,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3508 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -47565,10 +47367,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3509 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MIN_VALUE @@ -47579,10 +47381,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3510 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f32.MAX_VALUE @@ -47593,10 +47395,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3511 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 10 @@ -47607,10 +47409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3512 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 10 @@ -47621,10 +47423,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3513 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -47635,10 +47437,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3517 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -47649,10 +47451,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3518 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -47662,10 +47464,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3519 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -47675,10 +47477,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3520 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -47688,10 +47490,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3521 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47702,10 +47504,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3522 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47716,10 +47518,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3523 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47731,10 +47533,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3524 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47747,10 +47549,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3525 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -47762,10 +47564,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3526 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -47776,10 +47578,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3527 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -47790,10 +47592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3528 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MIN_VALUE @@ -47804,10 +47606,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3529 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE @@ -47818,10 +47620,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3530 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 10 @@ -47832,10 +47634,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3531 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 10 @@ -47846,10 +47648,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 3532 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/mod.json b/tests/compiler/std/mod.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 57dbad1e71..e69838d63a 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -8,13 +8,11 @@ (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$v (func)) (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\14") + (data (i32.const 24) "s\00t\00d\00/\00m\00o\00d\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (export "mod" (func $std/mod/mod)) (start $start) (func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) @@ -22,10 +20,9 @@ (local $3 i64) (local $4 i64) (local $5 i64) - (local $6 i32) + (local $6 i64) (local $7 i64) (local $8 i64) - (local $9 i64) local.get $0 i64.reinterpret_f64 local.tee $2 @@ -45,30 +42,27 @@ local.get $2 i64.const 63 i64.shr_u - local.set $8 + local.set $7 local.get $3 i64.const 1 i64.shl - local.tee $7 + local.tee $6 i64.const 0 i64.eq - local.tee $6 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $4 i64.const 2047 i64.eq - local.set $6 end - local.get $6 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 local.get $1 f64.ne - local.set $6 end - local.get $6 if local.get $0 local.get $1 @@ -82,12 +76,12 @@ local.get $2 i64.const 1 i64.shl - local.tee $9 - local.get $7 + local.tee $8 + local.get $6 i64.le_u if - local.get $7 - local.get $9 + local.get $6 + local.get $8 i64.eq br_if $folding-inner0 local.get $0 @@ -149,7 +143,7 @@ local.get $2 local.get $3 i64.ge_u - if (result i64) + if local.get $2 local.get $3 i64.eq @@ -157,9 +151,9 @@ local.get $2 local.get $3 i64.sub - else - local.get $2 + local.set $2 end + local.get $2 i64.const 1 i64.shl local.set $2 @@ -194,27 +188,27 @@ local.get $4 local.get $3 i64.sub - local.tee $4 + local.tee $3 i64.const 0 i64.gt_s if (result i64) local.get $2 i64.const 4503599627370496 i64.sub - local.get $4 + local.get $3 i64.const 52 i64.shl i64.or else local.get $2 i64.const 0 - local.get $4 + local.get $3 i64.sub i64.const 1 i64.add i64.shr_u end - local.get $8 + local.get $7 i64.const 63 i64.shl i64.or @@ -253,22 +247,20 @@ f64.eq ) (func $std/mod/test_fmod (; 4 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod local.get $2 call $std/mod/check - local.tee $3 - if + if (result i32) local.get $0 local.get $1 call $std/mod/mod local.get $2 call $std/mod/check - local.set $3 + else + i32.const 0 end - local.get $3 ) (func $~lib/math/NativeMathf.mod (; 5 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) @@ -280,7 +272,7 @@ (local $8 i32) local.get $0 i32.reinterpret_f32 - local.tee $3 + local.tee $2 i32.const 23 i32.shr_u i32.const 255 @@ -288,38 +280,34 @@ local.set $4 local.get $1 i32.reinterpret_f32 - local.tee $5 + local.tee $3 i32.const 23 i32.shr_u i32.const 255 i32.and - local.set $6 - local.get $3 + local.set $5 + local.get $2 i32.const -2147483648 i32.and - local.set $8 - local.get $5 + local.set $7 + local.get $3 i32.const 1 i32.shl - local.tee $7 - i32.eqz - local.tee $2 - i32.eqz - if + local.tee $6 + if (result i32) local.get $4 i32.const 255 i32.eq - local.set $2 + else + i32.const 1 end - local.get $2 - i32.eqz - if + if (result i32) + i32.const 1 + else local.get $1 local.get $1 f32.ne - local.set $2 end - local.get $2 if local.get $0 local.get $1 @@ -330,15 +318,15 @@ return end block $folding-inner0 - local.get $3 + local.get $2 i32.const 1 i32.shl - local.tee $2 - local.get $7 + local.tee $8 + local.get $6 i32.le_u if - local.get $2 - local.get $7 + local.get $6 + local.get $8 i32.eq br_if $folding-inner0 local.get $0 @@ -346,16 +334,16 @@ end local.get $4 if (result i32) - local.get $3 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $3 + local.get $2 i32.const 1 local.get $4 - local.get $3 + local.get $2 i32.const 9 i32.shl i32.clz @@ -365,36 +353,36 @@ i32.shl end local.set $2 - local.get $6 + local.get $5 if (result i32) - local.get $5 + local.get $3 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $5 + local.get $3 i32.const 1 - local.get $6 local.get $5 + local.get $3 i32.const 9 i32.shl i32.clz i32.sub - local.tee $6 + local.tee $5 i32.sub i32.shl end local.set $3 loop $continue|0 local.get $4 - local.get $6 + local.get $5 i32.gt_s if local.get $2 local.get $3 i32.ge_u - if (result i32) + if local.get $2 local.get $3 i32.eq @@ -402,9 +390,9 @@ local.get $2 local.get $3 i32.sub - else - local.get $2 + local.set $2 end + local.get $2 i32.const 1 i32.shl local.set $2 @@ -439,25 +427,25 @@ local.get $4 local.get $3 i32.sub - local.tee $4 + local.tee $3 i32.const 0 i32.gt_s if (result i32) local.get $2 i32.const 8388608 i32.sub - local.get $4 + local.get $3 i32.const 23 i32.shl i32.or else local.get $2 i32.const 1 - local.get $4 + local.get $3 i32.sub i32.shr_u end - local.get $8 + local.get $7 i32.or f32.reinterpret_i32 return @@ -508,10 +496,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -521,10 +509,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -534,10 +522,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -547,10 +535,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.5 @@ -560,10 +548,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.5 @@ -573,10 +561,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3.5 @@ -586,10 +574,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3.5 @@ -599,10 +587,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -612,10 +600,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -625,10 +613,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -638,10 +626,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -651,10 +639,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -664,10 +652,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -677,10 +665,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -690,10 +678,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -703,10 +691,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -716,10 +704,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -729,10 +717,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -742,10 +730,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -755,10 +743,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -768,10 +756,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -781,10 +769,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.25 @@ -794,10 +782,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.25 @@ -807,10 +795,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -820,10 +808,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -833,10 +821,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -846,10 +834,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -859,10 +847,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -13 @@ -872,10 +860,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -885,10 +873,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -898,10 +886,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -911,10 +899,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -924,10 +912,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -937,10 +925,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -950,10 +938,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -963,10 +951,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -976,10 +964,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -989,10 +977,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1002,10 +990,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1015,10 +1003,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1028,10 +1016,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1041,10 +1029,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1054,10 +1042,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1067,10 +1055,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1080,10 +1068,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1093,10 +1081,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1106,10 +1094,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1119,10 +1107,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1132,10 +1120,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1145,10 +1133,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1158,10 +1146,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1171,10 +1159,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1184,10 +1172,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1197,10 +1185,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1210,10 +1198,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1223,10 +1211,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1236,10 +1224,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1249,10 +1237,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1262,10 +1250,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1275,10 +1263,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1288,10 +1276,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 82 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1301,10 +1289,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1314,10 +1302,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1327,10 +1315,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1340,10 +1328,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1353,10 +1341,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1366,10 +1354,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1379,10 +1367,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1392,10 +1380,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1405,10 +1393,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1418,10 +1406,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf @@ -1431,10 +1419,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1444,10 +1432,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1457,10 +1445,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1470,10 +1458,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1483,10 +1471,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1496,10 +1484,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1509,10 +1497,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.5 @@ -1522,10 +1510,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.5 @@ -1535,10 +1523,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3.5 @@ -1548,10 +1536,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3.5 @@ -1561,10 +1549,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1574,10 +1562,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1587,10 +1575,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1600,10 +1588,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1613,10 +1601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -1626,10 +1614,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -1639,10 +1627,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -1652,10 +1640,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -1665,10 +1653,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -1678,10 +1666,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -1691,10 +1679,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1704,10 +1692,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1717,10 +1705,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1730,10 +1718,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1743,10 +1731,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1756,10 +1744,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1769,10 +1757,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -1782,10 +1770,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -1795,10 +1783,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -1808,10 +1796,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -1821,10 +1809,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1834,10 +1822,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1847,10 +1835,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1860,10 +1848,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1873,10 +1861,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1886,10 +1874,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1899,10 +1887,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1912,10 +1900,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1925,10 +1913,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1938,10 +1926,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1951,10 +1939,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1964,10 +1952,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1977,10 +1965,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1990,10 +1978,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2003,10 +1991,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2016,10 +2004,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2029,10 +2017,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2042,10 +2030,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2055,10 +2043,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2068,10 +2056,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2081,10 +2069,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2094,10 +2082,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2107,10 +2095,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2120,10 +2108,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2133,10 +2121,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2146,10 +2134,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2159,10 +2147,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2172,10 +2160,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2185,10 +2173,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2198,10 +2186,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2211,10 +2199,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -inf @@ -2224,10 +2212,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2237,10 +2225,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2250,10 +2238,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index c5a358bdf2..3f997d2df9 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -1,37 +1,39 @@ (module (type $FUNCSIG$iddd (func (param f64 f64 f64) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$id (func (param f64) (result i32))) + (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$ifff (func (param f32 f32 f32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) - (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$if (func (param f32) (result i32))) + (type $FUNCSIG$iff (func (param f32 f32) (result i32))) (type $FUNCSIG$v (func)) (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/mod/js i32 (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "mod" (func $std/mod/mod)) (start $start) - (func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/builtins/isNaN (; 2 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $~lib/math/NativeMath.mod (; 3 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i64) (local $10 i64) - (local $11 i64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -61,45 +63,38 @@ local.get $7 i64.const 0 i64.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f64.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 f64.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f64.div return end local.get $2 i64.const 1 i64.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i64.le_u if - local.get $10 + local.get $9 local.get $7 i64.eq if @@ -235,13 +230,13 @@ i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i64.shl local.set $2 local.get $4 @@ -279,11 +274,6 @@ local.get $2 f64.reinterpret_i64 ) - (func $~lib/builtins/isNaN (; 3 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - local.get $0 - local.get $0 - f64.ne - ) (func $std/mod/check (; 4 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) local.get $1 call $~lib/builtins/isNaN @@ -311,19 +301,16 @@ f64.eq ) (func $std/mod/test_fmod (; 5 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - (local $3 i32) local.get $0 local.get $1 call $~lib/math/NativeMath.mod local.get $2 call $std/mod/check - local.tee $3 if (result i32) global.get $std/mod/js i32.eqz - local.tee $3 if (result i32) - local.get $3 + i32.const 1 else local.get $0 local.get $1 @@ -332,20 +319,24 @@ call $std/mod/check end else - local.get $3 + i32.const 0 end ) - (func $~lib/math/NativeMathf.mod (; 6 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/builtins/isNaN (; 6 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/math/NativeMathf.mod (; 7 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $8 f32) + (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.reinterpret_f32 local.set $2 @@ -375,45 +366,38 @@ local.get $7 i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f32.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 f32.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f32.div return end local.get $2 i32.const 1 i32.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i32.le_u if - local.get $10 + local.get $9 local.get $7 i32.eq if @@ -549,13 +533,13 @@ i32.const 8 i32.shl i32.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i32.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i32.shl local.set $2 local.get $4 @@ -591,11 +575,6 @@ local.get $2 f32.reinterpret_i32 ) - (func $~lib/builtins/isNaN (; 7 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - local.get $0 - local.get $0 - f32.ne - ) (func $std/mod/check (; 8 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32) local.get $1 call $~lib/builtins/isNaN @@ -637,10 +616,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -650,10 +629,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -663,10 +642,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -676,10 +655,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.5 @@ -689,10 +668,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3.5 @@ -702,10 +681,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3.5 @@ -715,10 +694,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3.5 @@ -728,10 +707,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -741,10 +720,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 3 @@ -754,10 +733,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -767,10 +746,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -3 @@ -780,10 +759,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -793,10 +772,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.5 @@ -806,10 +785,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -819,10 +798,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.5 @@ -832,10 +811,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -845,10 +824,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.5 @@ -858,10 +837,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 37 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -871,10 +850,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.5 @@ -884,10 +863,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -897,10 +876,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.25 @@ -910,10 +889,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.25 @@ -923,10 +902,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.25 @@ -936,10 +915,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -949,10 +928,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -962,10 +941,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -975,10 +954,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -988,10 +967,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -13 @@ -1001,10 +980,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1014,10 +993,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1027,10 +1006,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1040,10 +1019,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1053,10 +1032,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1066,10 +1045,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1079,10 +1058,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1092,10 +1071,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1105,10 +1084,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1118,10 +1097,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1131,10 +1110,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1144,10 +1123,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1157,10 +1136,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1170,10 +1149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1183,10 +1162,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1196,10 +1175,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1209,10 +1188,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1222,10 +1201,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1235,10 +1214,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1248,10 +1227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1261,10 +1240,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1274,10 +1253,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1287,10 +1266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1300,10 +1279,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -1314,10 +1293,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 @@ -1328,10 +1307,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1341,10 +1320,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1354,10 +1333,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 @@ -1368,10 +1347,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 @@ -1382,10 +1361,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1395,10 +1374,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 80 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1408,10 +1387,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 81 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1422,10 +1401,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 82 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1436,10 +1415,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1449,10 +1428,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1462,10 +1441,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1476,10 +1455,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1490,10 +1469,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1503,10 +1482,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1517,10 +1496,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1531,10 +1510,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1546,10 +1525,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 91 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1559,10 +1538,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf @@ -1573,10 +1552,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1586,10 +1565,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 @@ -1600,10 +1579,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1613,10 +1592,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1626,10 +1605,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1639,10 +1618,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1652,10 +1631,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.5 @@ -1665,10 +1644,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3.5 @@ -1678,10 +1657,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3.5 @@ -1691,10 +1670,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3.5 @@ -1704,10 +1683,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1717,10 +1696,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 3 @@ -1730,10 +1709,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1743,10 +1722,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -3 @@ -1756,10 +1735,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -1769,10 +1748,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0.5 @@ -1782,10 +1761,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -1795,10 +1774,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0.5 @@ -1808,10 +1787,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -1821,10 +1800,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1.5 @@ -1834,10 +1813,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1847,10 +1826,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1.5 @@ -1860,10 +1839,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1873,10 +1852,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1886,10 +1865,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -1899,10 +1878,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -1912,10 +1891,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -1925,10 +1904,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -1938,10 +1917,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -1951,10 +1930,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -1964,10 +1943,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1977,10 +1956,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -1990,10 +1969,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 135 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2003,10 +1982,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2016,10 +1995,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 137 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2029,10 +2008,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2042,10 +2021,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 139 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2055,10 +2034,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2068,10 +2047,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2081,10 +2060,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -2094,10 +2073,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -2107,10 +2086,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -2121,10 +2100,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -0 @@ -2135,10 +2114,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2148,10 +2127,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2161,10 +2140,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 1 @@ -2175,10 +2154,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 149 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const -1 @@ -2189,10 +2168,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2202,10 +2181,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2215,10 +2194,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2229,10 +2208,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2243,10 +2222,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2256,10 +2235,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2269,10 +2248,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2283,10 +2262,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2297,10 +2276,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2310,10 +2289,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 159 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2324,10 +2303,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2338,10 +2317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2353,10 +2332,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2366,10 +2345,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const inf @@ -2380,10 +2359,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2393,10 +2372,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const nan:0x400000 @@ -2407,10 +2386,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 166 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/std/new.json b/tests/compiler/std/new.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 b4c9d97f79..d7b579f78c 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,27 +1,55 @@ (module + (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$v (func)) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$i (func (result i32))) - (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00\1e") + (data (i32.const 80) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 112) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (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 $0 - i32.const 15 + 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 $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -29,8 +57,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -56,13 +84,70 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add ) - (func $std/new/AClass#constructor (; 1 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 264 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $std/new/AClass#constructor (; 4 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) - call $~lib/allocator/arena/__memory_allocate + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.tee $0 i32.const 1 i32.store @@ -80,15 +165,192 @@ f32.store offset=4 local.get $0 ) - (func $start (; 2 ;) (type $FUNCSIG$v) - i32.const 8 + (func $~lib/runtime/runtime.instanceof (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 112 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 112 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 112 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 112 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 112 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 112 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 80 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 12 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 80 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $start (; 13 ;) (type $FUNCSIG$v) + i32.const 264 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $null (; 3 ;) (type $FUNCSIG$v) + (func $null (; 14 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/new.ts b/tests/compiler/std/new.ts index 92f356eb46..2eecae5e88 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 49c3dd7520..f0193317ae 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -1,31 +1,50 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iif (func (param i32 f32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (memory $0 0) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\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 112) "\12\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/new/AClass.aStaticField (mut i32) (i32.const 0)) + (global $~lib/util/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 $std/new/AClass.aStaticField (mut i32) (i32.const 0)) + (global $~lib/util/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 8)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 112)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 264)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $start:~lib/allocator/arena (; 0 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -104,19 +123,73 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/memory/memory.allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $std/new/AClass#constructor (; 3 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $std/new/AClass#constructor (; 6 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 block (result i32) local.get $0 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -136,16 +209,223 @@ f32.store offset=4 local.get $0 ) - (func $start:std/new (; 4 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena + (func $start:std/new (; 7 ;) (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 i32.const 0 f32.const 3 call $std/new/AClass#constructor global.set $std/new/aClass ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 14 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 80 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 15 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 17 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 80 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 19 ;) (type $FUNCSIG$v) call $start:std/new ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/object-literal.json b/tests/compiler/std/object-literal.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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/std/object-literal.optimized.wat b/tests/compiler/std/object-literal.optimized.wat new file mode 100644 index 0000000000..811595e03f --- /dev/null +++ b/tests/compiler/std/object-literal.optimized.wat @@ -0,0 +1,486 @@ +(module + (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/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\16") + (data (i32.const 24) "h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") + (data (i32.const 48) "\10\00\00\00(") + (data (i32.const 64) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 104) "\10\00\00\00*") + (data (i32.const 120) "s\00t\00d\00/\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (data (i32.const 168) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08") + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (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/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + 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 + i32.const 16 + i32.add + ) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 336 + i32.le_u + if + i32.const 0 + i32.const 64 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 64 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/util/string/compareImpl (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 24 + local.set $2 + loop $continue|0 + local.get $1 + if (result i32) + local.get $0 + i32.load16_u + local.get $2 + i32.load16_u + i32.sub + local.tee $3 + i32.eqz + else + i32.const 0 + end + if + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $0 + i32.const 2 + i32.add + local.set $0 + local.get $2 + i32.const 2 + i32.add + local.set $2 + br $continue|0 + end + end + local.get $3 + ) + (func $~lib/string/String.__eq (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 24 + i32.eq + if + i32.const 1 + return + end + i32.const 0 + i32.const 1 + local.get $0 + select + if + i32.const 0 + return + end + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 12 + i32.load + i32.const 1 + i32.shr_u + i32.ne + if + i32.const 0 + return + end + local.get $0 + local.get $1 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $std/object-literal/bar (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 9 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:std/object-literal (; 7 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 336 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.tee $0 + i32.const 1 + i32.store + local.get $0 + i32.const 24 + i32.store offset=4 + local.get $0 + call $std/object-literal/bar + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.tee $0 + i32.const 2 + i32.store + local.get $0 + i32.load + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 26 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.tee $0 + i32.const 3 + i32.store + local.get $0 + i32.load + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 120 + i32.const 21 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 168 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 168 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 168 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 168 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + if (result i32) + local.get $2 + i32.const 168 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 168 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 14 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 15 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 16 ;) (type $FUNCSIG$v) + call $start:std/object-literal + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) +) 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 e9682c107c..3a5b8b46a5 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/std/object-literal.untouched.wat b/tests/compiler/std/object-literal.untouched.wat new file mode 100644 index 0000000000..b71be61893 --- /dev/null +++ b/tests/compiler/std/object-literal.untouched.wat @@ -0,0 +1,649 @@ +(module + (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)) + (type $FUNCSIG$vii (func (param i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\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) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 104) "\10\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") + (data (i32.const 168) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 168)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 336)) + (export "memory" (memory $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) + (start $start) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (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/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 64 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $~lib/collector/dummy/__ref_register + local.get $0 + ) + (func $~lib/string/String#get:length (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/string/compareImpl (; 8 ;) (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) + i32.const 0 + local.set $5 + local.get $0 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.set $6 + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $4 + if (result i32) + local.get $6 + i32.load16_u + local.get $7 + i32.load16_u + i32.sub + local.tee $5 + i32.eqz + else + i32.const 0 + end + if + block + local.get $4 + i32.const 1 + i32.sub + local.set $4 + local.get $6 + i32.const 2 + i32.add + local.set $6 + local.get $7 + i32.const 2 + i32.add + local.set $7 + end + br $continue|0 + end + end + end + local.get $5 + ) + (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $2 + local.get $1 + call $~lib/string/String#get:length + i32.ne + if + i32.const 0 + return + end + local.get $0 + i32.const 0 + local.get $1 + i32.const 0 + local.get $2 + call $~lib/util/string/compareImpl + i32.eqz + ) + (func $std/object-literal/bar (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 9 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 24 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 10 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $std/object-literal/bar2 (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + i32.const 2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 26 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $std/object-literal/Foo2#test (; 12 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.load + i32.const 3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 21 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + ) + (func $start:std/object-literal (; 13 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + 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 + block (result i32) + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $0 + local.get $0 + i32.const 1 + i32.store + local.get $0 + i32.const 24 + i32.store offset=4 + local.get $0 + end + call $std/object-literal/bar + block (result i32) + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.set $1 + local.get $1 + i32.const 2 + i32.store + local.get $1 + end + call $std/object-literal/bar2 + block (result i32) + i32.const 4 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.set $2 + local.get $2 + i32.const 3 + i32.store + local.get $2 + end + call $std/object-literal/Foo2#test + ) + (func $~lib/runtime/runtime.instanceof (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/collector/dummy/__ref_link (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/runtime/runtime.newArray (; 22 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 26 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 27 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 29 ;) (type $FUNCSIG$v) + call $start:std/object-literal + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT + ) + (func $null (; 30 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/std/operator-overloading.json b/tests/compiler/std/operator-overloading.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 180394a8c7..780ebff7cc 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,15 +1,20 @@ (module - (type $FUNCSIG$v (func)) + (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$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) - (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\006") + (data (i32.const 80) "s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") + (data (i32.const 136) "\10\00\00\00\1e") + (data (i32.const 152) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 184) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/operator-overloading/a1 (mut i32) (i32.const 0)) @@ -79,20 +84,40 @@ (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (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 $0 - i32.const 15 + 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 $1 + local.tee $0 current_memory local.tee $2 i32.const 16 @@ -100,8 +125,8 @@ i32.gt_u if local.get $2 - local.get $1 local.get $0 + local.get $1 i32.sub i32.const 65535 i32.add @@ -127,13 +152,70 @@ end end end - local.get $1 + local.get $0 global.set $~lib/allocator/arena/offset + local.get $1 + ) + (func $~lib/util/runtime/allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 352 + i32.le_u + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store local.get $0 ) - (func $std/operator-overloading/Tester#constructor (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - call $~lib/allocator/arena/__memory_allocate + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.tee $2 local.get $0 i32.store @@ -142,7 +224,7 @@ i32.store offset=4 local.get $2 ) - (func $~lib/math/NativeMath.scalbn (; 3 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 5 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) local.get $1 i32.const 1023 i32.gt_s @@ -219,10 +301,10 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 4 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) - (local $2 i32) + (func $~lib/math/NativeMath.pow (; 6 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (local $2 f64) (local $3 f64) - (local $4 f64) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 f64) @@ -251,7 +333,7 @@ local.tee $17 i32.const 2147483647 i32.and - local.set $5 + local.set $4 local.get $1 i64.reinterpret_f64 local.tee $16 @@ -272,46 +354,38 @@ f64.const 1 return end - local.get $5 + i32.const 1 + local.get $8 i32.const 2146435072 i32.gt_s - local.tee $2 - i32.eqz - if - local.get $5 + local.get $4 + i32.const 2146435072 + i32.gt_s + if (result i32) + i32.const 1 + else + local.get $19 + i32.const 0 + i32.ne + i32.const 0 + local.get $4 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $19 - i32.const 0 - i32.ne - local.set $2 - end - end - local.get $2 - i32.eqz - if - local.get $8 - i32.const 2146435072 - i32.gt_s - local.set $2 + select end - local.get $2 - i32.eqz - if + select + if (result i32) + i32.const 1 + else + local.get $6 + i32.const 0 + i32.ne + i32.const 0 local.get $8 i32.const 2146435072 i32.eq - local.tee $2 - if - local.get $6 - i32.const 0 - i32.ne - local.set $2 - end + select end - local.get $2 if local.get $0 local.get $1 @@ -344,8 +418,8 @@ i32.gt_s local.tee $13 select - local.tee $2 - local.get $2 + local.tee $5 + local.get $5 i32.const 52 i32.const 20 local.get $13 @@ -354,13 +428,13 @@ i32.sub local.tee $13 i32.shr_s - local.tee $2 + local.tee $5 local.get $13 i32.shl i32.eq if (result i32) i32.const 2 - local.get $2 + local.get $5 i32.const 1 i32.and i32.sub @@ -380,13 +454,13 @@ i32.const 2146435072 i32.eq if - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $19 i32.or if - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -457,66 +531,58 @@ end local.get $0 f64.abs - local.set $4 + local.set $3 local.get $19 i32.eqz if - local.get $5 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $5 - i32.const 2146435072 - i32.eq - local.set $2 - end - local.get $2 - i32.eqz - if - local.get $5 - i32.const 1072693248 - i32.eq - local.set $2 - end - local.get $2 + i32.const 1 + local.get $4 + i32.const 1072693248 + i32.eq + local.get $4 + i32.const 2146435072 + i32.eq + i32.const 1 + local.get $4 + select + select if f64.const 1 - local.get $4 + local.get $3 f64.div - local.get $4 + local.get $3 local.get $9 i32.const 0 i32.lt_s select - local.set $4 + local.set $3 local.get $17 i32.const 0 i32.lt_s if (result f64) - local.get $5 + local.get $4 i32.const 1072693248 i32.sub local.get $11 i32.or if (result f64) - local.get $4 + local.get $3 f64.neg - local.get $4 + local.get $3 local.get $11 i32.const 1 i32.eq select else - local.get $4 - local.get $4 + local.get $3 + local.get $3 f64.sub local.tee $0 local.get $0 f64.div end else - local.get $4 + local.get $3 end return end @@ -554,7 +620,7 @@ i32.const 1139802112 i32.gt_s if - local.get $5 + local.get $4 i32.const 1072693247 i32.le_s if @@ -566,7 +632,7 @@ select return end - local.get $5 + local.get $4 i32.const 1072693248 i32.ge_s if @@ -579,7 +645,7 @@ return end end - local.get $5 + local.get $4 i32.const 1072693247 i32.lt_s if @@ -601,7 +667,7 @@ end return end - local.get $5 + local.get $4 i32.const 1072693248 i32.gt_s if @@ -623,16 +689,16 @@ end return end - local.get $4 + local.get $3 f64.const 1 f64.sub - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul f64.const 0.5 - local.get $3 + local.get $2 f64.const 0.3333333333333333 - local.get $3 + local.get $2 f64.const 0.25 f64.mul f64.sub @@ -641,10 +707,10 @@ f64.mul local.set $0 f64.const 1.4426950216293335 - local.get $3 + local.get $2 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 f64.const 1.9259629911266175e-08 f64.mul local.get $0 @@ -660,50 +726,50 @@ local.set $10 local.get $0 local.get $10 - local.get $4 + local.get $3 f64.sub f64.sub else i32.const 0 local.set $6 - local.get $5 + local.get $4 i32.const 1048576 i32.lt_s if (result i32) - local.get $4 + local.get $3 f64.const 9007199254740992 f64.mul - local.tee $4 + local.tee $3 i64.reinterpret_f64 i64.const 32 i64.shr_u i32.wrap_i64 - local.set $5 + local.set $4 i32.const -53 else i32.const 0 end - local.get $5 + local.get $4 i32.const 20 i32.shr_s i32.const 1023 i32.sub i32.add local.set $6 - local.get $5 + local.get $4 i32.const 1048575 i32.and - local.tee $2 + local.tee $5 i32.const 1072693248 i32.or - local.set $5 - local.get $2 + local.set $4 + local.get $5 i32.const 235662 i32.le_s if (result i32) i32.const 0 else - local.get $2 + local.get $5 i32.const 767610 i32.lt_s if (result i32) @@ -713,38 +779,38 @@ i32.const 1 i32.add local.set $6 - local.get $5 + local.get $4 i32.const -1048576 i32.add - local.set $5 + local.set $4 i32.const 0 end end - local.set $2 - local.get $4 + local.set $5 + local.get $3 i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $5 + local.get $4 i64.extend_i32_s i64.const 32 i64.shl i64.or f64.reinterpret_i64 - local.tee $4 + local.tee $3 f64.const 1.5 f64.const 1 - local.get $2 + local.get $5 select local.tee $0 f64.sub local.tee $10 f64.const 1 - local.get $4 + local.get $3 local.get $0 f64.add f64.div - local.tee $3 + local.tee $2 f64.mul local.tee $18 i64.reinterpret_f64 @@ -752,15 +818,15 @@ i64.and f64.reinterpret_i64 local.set $14 + local.get $3 local.get $4 - local.get $5 i32.const 1 i32.shr_s i32.const 536870912 i32.or i32.const 524288 i32.add - local.get $2 + local.get $5 i32.const 18 i32.shl i32.add @@ -768,7 +834,7 @@ i64.const 32 i64.shl f64.reinterpret_i64 - local.tee $4 + local.tee $3 local.get $0 f64.sub f64.sub @@ -809,10 +875,10 @@ f64.mul f64.add f64.mul - local.get $3 + local.get $2 local.get $10 local.get $14 - local.get $4 + local.get $3 f64.mul f64.sub local.get $14 @@ -820,7 +886,7 @@ f64.mul f64.sub f64.mul - local.tee $3 + local.tee $2 local.get $14 local.get $18 f64.add @@ -834,8 +900,8 @@ f64.reinterpret_i64 local.tee $10 f64.mul - local.tee $4 - local.get $3 + local.tee $3 + local.get $2 local.get $10 f64.mul local.get $0 @@ -854,15 +920,15 @@ i64.const -4294967296 i64.and f64.reinterpret_i64 - local.tee $3 + local.tee $2 f64.mul local.tee $20 f64.const -7.028461650952758e-09 - local.get $3 + local.get $2 f64.mul local.get $0 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub f64.const 0.9617966939259756 @@ -870,16 +936,16 @@ f64.add f64.const 1.350039202129749e-08 f64.const 0 - local.get $2 + local.get $5 select f64.add - local.tee $3 + local.tee $2 f64.add f64.const 0.5849624872207642 f64.const 0 - local.get $2 + local.get $5 select - local.tee $4 + local.tee $3 f64.add local.get $6 f64.convert_i32_s @@ -890,17 +956,17 @@ i64.and f64.reinterpret_i64 local.set $10 - local.get $3 + local.get $2 local.get $10 local.get $0 f64.sub - local.get $4 + local.get $3 f64.sub local.get $20 f64.sub f64.sub end - local.set $4 + local.set $3 local.get $1 local.get $1 i64.reinterpret_f64 @@ -912,20 +978,20 @@ local.get $10 f64.mul local.get $1 - local.get $4 + local.get $3 f64.mul f64.add local.tee $1 local.get $0 local.get $10 f64.mul - local.tee $3 + local.tee $2 f64.add local.tee $0 i64.reinterpret_f64 local.tee $16 i32.wrap_i64 - local.set $2 + local.set $5 block $folding-inner1 block $folding-inner0 local.get $16 @@ -939,14 +1005,14 @@ local.get $12 i32.const 1083179008 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner0 local.get $1 f64.const 8.008566259537294e-17 f64.add local.get $0 - local.get $3 + local.get $2 f64.sub f64.gt br_if $folding-inner0 @@ -960,12 +1026,12 @@ local.get $12 i32.const -1064252416 i32.sub - local.get $2 + local.get $5 i32.or br_if $folding-inner1 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.le br_if $folding-inner1 @@ -979,7 +1045,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 0 local.set $6 local.get $13 @@ -987,7 +1053,7 @@ i32.gt_s if i32.const 1048576 - local.get $2 + local.get $5 i32.const 1 i32.add i32.shr_s @@ -1000,9 +1066,9 @@ i32.shr_s i32.const 1023 i32.sub - local.set $2 + local.set $5 i32.const 1048575 - local.get $2 + local.get $5 i32.shr_s i32.const -1 i32.xor @@ -1019,7 +1085,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $2 + local.get $5 i32.sub i32.shr_s local.set $6 @@ -1032,13 +1098,13 @@ i32.lt_s select local.set $6 - local.get $3 + local.get $2 local.get $0 f64.sub - local.set $3 + local.set $2 end local.get $1 - local.get $3 + local.get $2 f64.add i64.reinterpret_f64 i64.const -4294967296 @@ -1047,10 +1113,10 @@ local.tee $0 f64.const 0.6931471824645996 f64.mul - local.tee $4 + local.tee $3 local.get $1 local.get $0 - local.get $3 + local.get $2 f64.sub f64.sub f64.const 0.6931471805599453 @@ -1061,14 +1127,14 @@ f64.add local.tee $1 f64.add - local.tee $3 - local.get $3 + local.tee $2 + local.get $2 f64.mul local.set $0 local.get $7 f64.const 1 - local.get $3 - local.get $3 + local.get $2 + local.get $2 local.get $0 f64.const 0.16666666666666602 local.get $0 @@ -1096,17 +1162,17 @@ f64.sub f64.div local.get $1 + local.get $2 local.get $3 - local.get $4 f64.sub f64.sub local.tee $0 - local.get $3 + local.get $2 local.get $0 f64.mul f64.add f64.sub - local.get $3 + local.get $2 f64.sub f64.sub local.tee $0 @@ -1118,7 +1184,7 @@ i32.const 20 i32.shl i32.add - local.tee $2 + local.tee $5 i32.const 20 i32.shr_s i32.const 0 @@ -1132,7 +1198,7 @@ i64.reinterpret_f64 i64.const 4294967295 i64.and - local.get $2 + local.get $5 i64.extend_i32_s i64.const 32 i64.shl @@ -1155,7 +1221,7 @@ f64.const 1e-300 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load f64.convert_i32_s @@ -1174,11 +1240,38 @@ i32.trunc_f64_s call $std/operator-overloading/Tester#constructor ) - (func $start:std/operator-overloading (; 6 ;) (type $FUNCSIG$v) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + ) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + i32.const 8 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + local.tee $2 + local.get $0 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + ) + (func $start:std/operator-overloading (; 10 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - (local $2 i32) - i32.const 72 + i32.const 352 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -1208,22 +1301,21 @@ i32.load i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/a i32.load offset=4 i32.const 5 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 147 + i32.const 80 + i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1250,23 +1342,21 @@ global.set $std/operator-overloading/s global.get $std/operator-overloading/s i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/s i32.load offset=4 i32.const 6 i32.eq - else - local.get $0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 153 + i32.const 80 + i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1295,22 +1385,21 @@ i32.load i32.const 6 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/m i32.load offset=4 i32.const 10 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 159 + i32.const 80 + i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 6 @@ -1339,22 +1428,21 @@ i32.load i32.const 2 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/d i32.load offset=4 i32.const 5 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 165 + i32.const 80 + i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -1383,21 +1471,20 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/f i32.load offset=4 i32.eqz else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 171 + i32.const 80 + i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1416,22 +1503,21 @@ i32.load i32.const 16 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/p i32.load offset=4 i32.const 243 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 177 + i32.const 80 + i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -1460,22 +1546,21 @@ i32.load i32.const 15 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/n i32.load offset=4 i32.const 15 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 183 + i32.const 80 + i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3855 @@ -1504,22 +1589,21 @@ i32.load i32.const 65535 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/o i32.load offset=4 i32.const 255 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 189 + i32.const 80 + i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -1548,22 +1632,21 @@ i32.load i32.const 65535 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/x i32.load offset=4 i32.const 255 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 195 + i32.const 80 + i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1575,21 +1658,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/eq2 global.get $std/operator-overloading/eq1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/eq2 - local.tee $2 + local.tee $1 i32.load i32.eq - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.eq else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/eq global.get $std/operator-overloading/eq @@ -1597,10 +1679,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 201 + i32.const 80 + i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1612,75 +1694,72 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/eq4 global.get $std/operator-overloading/eq3 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/eq4 - local.tee $2 + local.tee $1 i32.load i32.eq - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.eq else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/eqf global.get $std/operator-overloading/eqf if i32.const 0 - i32.const 8 - i32.const 207 + i32.const 80 + i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/eq1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/eq2 - local.tee $2 + local.tee $1 i32.load i32.ne - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.ne else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/eq global.get $std/operator-overloading/eq if i32.const 0 - i32.const 8 - i32.const 211 + i32.const 80 + i32.const 209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/eq3 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/eq4 - local.tee $2 + local.tee $1 i32.load i32.ne - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.ne else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/eqf global.get $std/operator-overloading/eqf @@ -1688,10 +1767,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 215 + i32.const 80 + i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1703,21 +1782,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/gt2 global.get $std/operator-overloading/gt1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/gt2 - local.tee $2 + local.tee $1 i32.load i32.gt_s - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.gt_s else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/gt global.get $std/operator-overloading/gt @@ -1725,10 +1803,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 221 + i32.const 80 + i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -1740,21 +1818,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/gte2 global.get $std/operator-overloading/gte1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/gte2 - local.tee $2 + local.tee $1 i32.load i32.ge_s - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.ge_s else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/gte global.get $std/operator-overloading/gte @@ -1762,10 +1839,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 227 + i32.const 80 + i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 @@ -1777,21 +1854,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/le2 global.get $std/operator-overloading/le1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/le2 - local.tee $2 + local.tee $1 i32.load i32.lt_s - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.lt_s else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/le global.get $std/operator-overloading/le @@ -1799,10 +1875,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 233 + i32.const 80 + i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1814,21 +1890,20 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/leq2 global.get $std/operator-overloading/leq1 - local.tee $1 + local.tee $0 i32.load global.get $std/operator-overloading/leq2 - local.tee $2 + local.tee $1 i32.load i32.le_s - local.tee $0 if (result i32) - local.get $1 + local.get $0 i32.load offset=4 - local.get $2 + local.get $1 i32.load offset=4 i32.le_s else - local.get $0 + i32.const 0 end global.set $std/operator-overloading/leq global.get $std/operator-overloading/leq @@ -1836,10 +1911,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 239 + i32.const 80 + i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1861,22 +1936,21 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/sres i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 80 + i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -8 @@ -1898,22 +1972,21 @@ i32.load i32.const 536870911 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/ures i32.load offset=4 i32.const 536870910 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 249 + i32.const 80 + i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1935,22 +2008,21 @@ i32.load i32.const 8 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/sres i32.load offset=4 i32.const 16 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 254 + i32.const 80 + i32.const 252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -1969,7 +2041,6 @@ global.get $std/operator-overloading/pos i32.load i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/pres i32.load offset=4 @@ -1977,15 +2048,15 @@ i32.load offset=4 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 259 + i32.const 80 + i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 @@ -2010,7 +2081,6 @@ i32.load i32.sub i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/nres i32.load offset=4 @@ -2020,15 +2090,15 @@ i32.sub i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 264 + i32.const 80 + i32.const 262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 255 @@ -2053,7 +2123,6 @@ i32.const -1 i32.xor i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/res i32.load offset=4 @@ -2063,15 +2132,15 @@ i32.xor i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 269 + i32.const 80 + i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2079,39 +2148,33 @@ call $std/operator-overloading/Tester#constructor global.set $std/operator-overloading/excl global.get $std/operator-overloading/excl - local.tee $1 - i32.load - i32.eqz local.tee $0 + i32.load if (result i32) - local.get $1 - i32.load offset=4 - i32.eqz + i32.const 0 else local.get $0 + i32.load offset=4 + i32.eqz end global.set $std/operator-overloading/bres - global.get $std/operator-overloading/bres - local.set $1 global.get $std/operator-overloading/excl i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/excl i32.load offset=4 i32.eqz - else - local.get $0 end - local.get $1 + global.get $std/operator-overloading/bres i32.ne if i32.const 0 - i32.const 8 - i32.const 274 + i32.const 80 + i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/bres @@ -2119,10 +2182,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 275 + i32.const 80 + i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2148,22 +2211,21 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 281 + i32.const 80 + i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2183,23 +2245,21 @@ global.set $std/operator-overloading/incdec global.get $std/operator-overloading/incdec i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 i32.eq - else - local.get $0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 284 + i32.const 80 + i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2221,45 +2281,42 @@ global.set $std/operator-overloading/tmp global.get $std/operator-overloading/tmp i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 1 i32.eq - else - local.get $0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 289 + i32.const 80 + i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 290 + i32.const 80 + i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2279,48 +2336,45 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 293 + i32.const 80 + i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec i32.load - i32.eqz - local.tee $0 if (result i32) + i32.const 0 + else global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 i32.eq - else - local.get $0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 294 + i32.const 80 + i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.const 2 - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais1 global.get $std/operator-overloading/ais1 local.tee $0 @@ -2331,11 +2385,11 @@ i32.load offset=4 i32.const 1 i32.add - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais1 i32.const 2 i32.const 3 - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais2 global.get $std/operator-overloading/ais1 local.tee $0 @@ -2349,33 +2403,32 @@ local.get $1 i32.load offset=4 i32.add - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineStatic#constructor global.set $std/operator-overloading/ais global.get $std/operator-overloading/ais i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/ais i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 314 + i32.const 80 + i32.const 312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 i32.const 2 - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii1 global.get $std/operator-overloading/aii1 local.tee $0 @@ -2386,11 +2439,11 @@ i32.load offset=4 i32.const 1 i32.add - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii1 i32.const 2 i32.const 3 - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii2 global.get $std/operator-overloading/aii1 local.tee $0 @@ -2404,35 +2457,211 @@ local.get $1 i32.load offset=4 i32.add - call $std/operator-overloading/Tester#constructor + call $std/operator-overloading/TesterInlineInstance#constructor global.set $std/operator-overloading/aii global.get $std/operator-overloading/aii i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/aii i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 334 + i32.const 80 + i32.const 332 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 184 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 184 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 184 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 184 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 184 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 184 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 152 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 18 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 152 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 7 ;) (type $FUNCSIG$v) + (func $start (; 19 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 8 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/operator-overloading.ts b/tests/compiler/std/operator-overloading.ts index d2098158d4..d8cca19adc 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 9d76904f41..ddfe2feec2 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -1,18 +1,25 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result 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$ddd (func (param f64 f64) (result f64))) (type $FUNCSIG$ddi (func (param f64 i32) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\006\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 136) "\10\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 184) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/util/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/util/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)) (global $std/operator-overloading/a (mut i32) (i32.const 0)) @@ -80,23 +87,32 @@ (global $std/operator-overloading/aii1 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 68)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 184)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 352)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -177,15 +193,69 @@ ) (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $std/operator-overloading/Tester#constructor (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $std/operator-overloading/Tester#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -196,7 +266,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester.add (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.add (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -210,7 +280,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.sub (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.sub (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -224,7 +294,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mul (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mul (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -238,7 +308,7 @@ i32.mul call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.div (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.div (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -252,7 +322,7 @@ i32.div_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.mod (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mod (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -266,7 +336,7 @@ i32.rem_s call $std/operator-overloading/Tester#constructor ) - (func $~lib/math/NativeMath.scalbn (; 10 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 12 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (local $3 i32) (local $4 i32) @@ -357,7 +427,7 @@ f64.reinterpret_i64 f64.mul ) - (func $~lib/math/NativeMath.pow (; 11 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 13 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -440,44 +510,39 @@ local.get $7 i32.const 2146435072 i32.gt_s - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $4 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.gt_s end - local.tee $9 if (result i32) - local.get $9 + i32.const 1 else local.get $8 i32.const 2146435072 i32.eq - local.tee $9 if (result i32) local.get $6 i32.const 0 i32.ne else - local.get $9 + i32.const 0 end end if @@ -487,7 +552,7 @@ return end i32.const 0 - local.set $10 + local.set $9 local.get $3 i32.const 0 i32.lt_s @@ -497,7 +562,7 @@ i32.ge_s if i32.const 2 - local.set $10 + local.set $9 else local.get $8 i32.const 1072693248 @@ -508,21 +573,21 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 - local.get $11 + local.set $10 + local.get $10 i32.const 20 i32.gt_s - local.set $9 + local.set $11 i32.const 52 i32.const 20 - local.get $9 - select local.get $11 + select + local.get $10 i32.sub local.set $12 local.get $6 local.get $8 - local.get $9 + local.get $11 select local.set $13 local.get $13 @@ -540,7 +605,7 @@ i32.const 1 i32.and i32.sub - local.set $10 + local.set $9 end end end @@ -643,17 +708,15 @@ local.get $7 i32.const 0 i32.eq - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 2146435072 i32.eq end - local.tee $14 if (result i32) - local.get $14 + i32.const 1 else local.get $7 i32.const 1072693248 @@ -678,7 +741,7 @@ local.get $7 i32.const 1072693248 i32.sub - local.get $10 + local.get $9 i32.or i32.const 0 i32.eq @@ -692,7 +755,7 @@ f64.div local.set $16 else - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -712,7 +775,7 @@ i32.const 0 i32.lt_s if - local.get $10 + local.get $9 i32.const 0 i32.eq if @@ -725,7 +788,7 @@ f64.div return end - local.get $10 + local.get $9 i32.const 1 i32.eq if @@ -911,17 +974,17 @@ i32.le_s if i32.const 0 - local.set $11 + local.set $10 else local.get $28 i32.const 767610 i32.lt_s if i32.const 1 - local.set $11 + local.set $10 else i32.const 0 - local.set $11 + local.set $10 local.get $29 i32.const 1 i32.add @@ -945,7 +1008,7 @@ local.set $15 f64.const 1.5 f64.const 1 - local.get $11 + local.get $10 select local.set $35 local.get $15 @@ -977,7 +1040,7 @@ i32.or i32.const 524288 i32.add - local.get $11 + local.get $10 i32.const 18 i32.shl i32.add @@ -1100,7 +1163,7 @@ local.set $36 f64.const 1.350039202129749e-08 f64.const 0 - local.get $11 + local.get $10 select local.set $37 f64.const -7.028461650952758e-09 @@ -1118,7 +1181,7 @@ local.set $24 f64.const 0.5849624872207642 f64.const 0 - local.get $11 + local.get $10 select local.set $39 local.get $36 @@ -1263,7 +1326,7 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 i32.const 0 local.set $29 local.get $41 @@ -1272,7 +1335,7 @@ if local.get $28 i32.const 1048576 - local.get $11 + local.get $10 i32.const 1 i32.add i32.shr_s @@ -1285,12 +1348,12 @@ i32.shr_s i32.const 1023 i32.sub - local.set $11 + local.set $10 f64.const 0 local.set $24 local.get $29 i32.const 1048575 - local.get $11 + local.get $10 i32.shr_s i32.const -1 i32.xor @@ -1306,7 +1369,7 @@ i32.const 1048576 i32.or i32.const 20 - local.get $11 + local.get $10 i32.sub i32.shr_s local.set $29 @@ -1445,7 +1508,7 @@ local.get $16 f64.mul ) - (func $std/operator-overloading/Tester.pow (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1465,7 +1528,7 @@ i32.trunc_f64_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.and (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.and (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1479,7 +1542,7 @@ i32.and call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.or (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.or (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1493,7 +1556,7 @@ i32.or call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.xor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.xor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1507,14 +1570,12 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.equals (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $std/operator-overloading/Tester.equals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.eq - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1522,17 +1583,15 @@ i32.load offset=4 i32.eq else - local.get $2 + i32.const 0 end ) - (func $std/operator-overloading/Tester.notEquals (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $std/operator-overloading/Tester.notEquals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.ne - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1540,17 +1599,15 @@ i32.load offset=4 i32.ne else - local.get $2 + i32.const 0 end ) - (func $std/operator-overloading/Tester.greater (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $std/operator-overloading/Tester.greater (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.gt_s - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1558,17 +1615,15 @@ i32.load offset=4 i32.gt_s else - local.get $2 + i32.const 0 end ) - (func $std/operator-overloading/Tester.greaterEquals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $std/operator-overloading/Tester.greaterEquals (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.ge_s - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1576,17 +1631,15 @@ i32.load offset=4 i32.ge_s else - local.get $2 + i32.const 0 end ) - (func $std/operator-overloading/Tester.less (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $std/operator-overloading/Tester.less (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.lt_s - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1594,17 +1647,15 @@ i32.load offset=4 i32.lt_s else - local.get $2 + i32.const 0 end ) - (func $std/operator-overloading/Tester.lessEquals (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $std/operator-overloading/Tester.lessEquals (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $1 i32.load i32.le_s - local.tee $2 if (result i32) local.get $0 i32.load offset=4 @@ -1612,10 +1663,10 @@ i32.load offset=4 i32.le_s else - local.get $2 + i32.const 0 end ) - (func $std/operator-overloading/Tester.shr (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shr (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1627,7 +1678,7 @@ i32.shr_s call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shu (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shu (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1639,7 +1690,7 @@ i32.shr_u call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.shl (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shl (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1651,7 +1702,7 @@ i32.shl call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.pos (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.pos (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1659,7 +1710,7 @@ i32.load offset=4 call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.neg (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.neg (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 i32.const 0 local.get $0 @@ -1671,7 +1722,7 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.not (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.not (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1683,21 +1734,19 @@ i32.xor call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester.excl (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $std/operator-overloading/Tester.excl (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load i32.eqz - local.tee $1 if (result i32) local.get $0 i32.load offset=4 i32.eqz else - local.get $1 + i32.const 0 end ) - (func $std/operator-overloading/Tester#inc (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#inc (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1712,7 +1761,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#dec (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#dec (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 local.get $0 i32.load @@ -1727,7 +1776,7 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/Tester#postInc (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postInc (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1739,7 +1788,7 @@ i32.add call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/Tester#postDec (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#postDec (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 0 local.get $0 i32.load @@ -1751,12 +1800,14 @@ i32.sub call $std/operator-overloading/Tester#constructor ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1767,12 +1818,14 @@ i32.store offset=4 local.get $0 ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz if i32.const 8 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1783,10 +1836,19 @@ i32.store offset=4 local.get $0 ) - (func $start:std/operator-overloading (; 35 ;) (type $FUNCSIG$v) + (func $start:std/operator-overloading (; 37 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $start:~lib/allocator/arena + 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 i32.const 0 i32.const 1 i32.const 2 @@ -1805,22 +1867,21 @@ i32.load i32.const 3 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/a i32.load offset=4 i32.const 5 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 147 + i32.const 80 + i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1841,22 +1902,21 @@ i32.load i32.const 0 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/s i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 153 + i32.const 80 + i32.const 151 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1877,22 +1937,21 @@ i32.load i32.const 6 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/m i32.load offset=4 i32.const 10 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 159 + i32.const 80 + i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1913,22 +1972,21 @@ i32.load i32.const 2 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/d i32.load offset=4 i32.const 5 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 165 + i32.const 80 + i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1949,22 +2007,21 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/f i32.load offset=4 i32.const 0 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 171 + i32.const 80 + i32.const 169 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1985,22 +2042,21 @@ i32.load i32.const 16 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/p i32.load offset=4 i32.const 243 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 177 + i32.const 80 + i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2021,22 +2077,21 @@ i32.load i32.const 15 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/n i32.load offset=4 i32.const 15 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 183 + i32.const 80 + i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2057,22 +2112,21 @@ i32.load i32.const 65535 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/o i32.load offset=4 i32.const 255 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 189 + i32.const 80 + i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2093,22 +2147,21 @@ i32.load i32.const 65535 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/x i32.load offset=4 i32.const 255 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 195 + i32.const 80 + i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2131,10 +2184,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 201 + i32.const 80 + i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2157,10 +2210,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 207 + i32.const 80 + i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/eq1 @@ -2173,10 +2226,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 211 + i32.const 80 + i32.const 209 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/eq3 @@ -2189,10 +2242,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 215 + i32.const 80 + i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2215,10 +2268,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 221 + i32.const 80 + i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2241,10 +2294,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 227 + i32.const 80 + i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2267,10 +2320,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 233 + i32.const 80 + i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2293,10 +2346,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 239 + i32.const 80 + i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2312,22 +2365,21 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/sres i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 244 + i32.const 80 + i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2343,22 +2395,21 @@ i32.load i32.const 536870911 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/ures i32.load offset=4 i32.const 536870910 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 249 + i32.const 80 + i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2374,22 +2425,21 @@ i32.load i32.const 8 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/sres i32.load offset=4 i32.const 16 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 254 + i32.const 80 + i32.const 252 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2405,7 +2455,6 @@ global.get $std/operator-overloading/pos i32.load i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/pres i32.load offset=4 @@ -2413,15 +2462,15 @@ i32.load offset=4 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 259 + i32.const 80 + i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2439,7 +2488,6 @@ i32.load i32.sub i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/nres i32.load offset=4 @@ -2449,15 +2497,15 @@ i32.sub i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 264 + i32.const 80 + i32.const 262 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2475,7 +2523,6 @@ i32.const -1 i32.xor i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/res i32.load offset=4 @@ -2485,15 +2532,15 @@ i32.xor i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 269 + i32.const 80 + i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2508,22 +2555,21 @@ global.get $std/operator-overloading/excl i32.load i32.eqz - local.tee $0 if (result i32) global.get $std/operator-overloading/excl i32.load offset=4 i32.eqz else - local.get $0 + i32.const 0 end i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 274 + i32.const 80 + i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/bres @@ -2532,10 +2578,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 275 + i32.const 80 + i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2550,22 +2596,21 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 281 + i32.const 80 + i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec @@ -2575,22 +2620,21 @@ i32.load i32.const 0 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 284 + i32.const 80 + i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2610,44 +2654,42 @@ i32.load i32.const 0 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 1 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 289 + i32.const 80 + i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 290 + i32.const 80 + i32.const 288 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -2662,44 +2704,42 @@ i32.load i32.const 1 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/tmp i32.load offset=4 i32.const 2 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 293 + i32.const 80 + i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/operator-overloading/incdec i32.load i32.const 0 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/incdec i32.load offset=4 i32.const 1 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 294 + i32.const 80 + i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2729,19 +2769,19 @@ global.set $std/operator-overloading/ais2 block $std/operator-overloading/TesterInlineStatic.add|inlined.0 (result i32) global.get $std/operator-overloading/ais1 - local.set $0 - global.get $std/operator-overloading/ais2 local.set $1 + global.get $std/operator-overloading/ais2 + local.set $0 i32.const 0 - local.get $0 - i32.load local.get $1 i32.load - i32.add local.get $0 - i32.load offset=4 + i32.load + i32.add local.get $1 i32.load offset=4 + local.get $0 + i32.load offset=4 i32.add call $std/operator-overloading/TesterInlineStatic#constructor end @@ -2750,22 +2790,21 @@ i32.load i32.const 4 i32.eq - local.tee $1 if (result i32) global.get $std/operator-overloading/ais i32.load offset=4 i32.const 6 i32.eq else - local.get $1 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 314 + i32.const 80 + i32.const 312 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2775,13 +2814,13 @@ global.set $std/operator-overloading/aii1 block $std/operator-overloading/TesterInlineInstance#postInc|inlined.0 (result i32) global.get $std/operator-overloading/aii1 - local.set $1 + local.set $0 i32.const 0 - local.get $1 + local.get $0 i32.load i32.const 1 i32.add - local.get $1 + local.get $0 i32.load offset=4 i32.const 1 i32.add @@ -2816,28 +2855,225 @@ i32.load i32.const 4 i32.eq - local.tee $0 if (result i32) global.get $std/operator-overloading/aii i32.load offset=4 i32.const 6 i32.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 - i32.const 334 + i32.const 80 + i32.const 332 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 44 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 152 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 45 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 47 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 152 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable ) - (func $start (; 36 ;) (type $FUNCSIG$v) + (func $start (; 49 ;) (type $FUNCSIG$v) call $start:std/operator-overloading ) - (func $null (; 37 ;) (type $FUNCSIG$v) + (func $null (; 50 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/pointer.json b/tests/compiler/std/pointer.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index f2994003ef..e7fba8fbc6 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -3,11 +3,10 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1c") + (data (i32.const 24) "s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") (global $std/pointer/one (mut i32) (i32.const 0)) (global $std/pointer/two (mut i32) (i32.const 0)) (global $std/pointer/add (mut i32) (i32.const 0)) @@ -15,9 +14,8 @@ (global $std/pointer/nextOne (mut i32) (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $~lib/internal/memory/memset (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/memory/memory.fill (; 1 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) local.get $0 i32.const 0 @@ -61,915 +59,86 @@ i32.const 0 i32.store8 ) - (func $~lib/internal/memory/memcpy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.copy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) i32.const 8 - local.set $3 - loop $continue|0 + local.set $2 + block $~lib/util/memory/memmove|inlined.0 + local.get $0 local.get $1 - i32.const 3 - i32.and - local.get $3 - local.get $3 - select - if - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - br $continue|0 - end - end - local.get $0 - i32.const 3 - i32.and - i32.eqz - if - loop $continue|1 - local.get $3 - 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 $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|1 - end - end - local.get $3 - 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 $3 - 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 $3 - i32.const 2 - i32.and + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u 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 $3 - i32.const 1 - i32.and - if + i32.const 7 + i32.and local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - return - end - local.get $3 - i32.const 32 - i32.ge_u - if - block $break|2 - block $case2|2 - block $case1|2 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 local.get $0 - i32.const 3 + i32.const 7 i32.and - local.tee $2 - i32.const 1 - i32.ne if local.get $2 - i32.const 2 - i32.eq - br_if $case1|2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 local.get $2 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 3 - i32.sub - local.set $3 - loop $continue|3 + 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 - i32.const 17 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 1 - i32.add - i32.load - local.tee $2 - 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 $2 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 5 - i32.add - i32.load - local.tee $2 - i32.const 8 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 24 - i32.shr_u - local.get $1 - i32.const 9 - i32.add - i32.load - local.tee $2 - 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 $2 - 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 $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|3 - end + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 2 - i32.sub - local.set $3 - loop $continue|4 - local.get $3 - i32.const 18 + loop $continue|1 + local.get $2 + i32.const 8 i32.ge_u if local.get $0 local.get $1 - i32.const 2 - i32.add - i32.load - local.tee $2 - 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 + i64.load + i64.store local.get $2 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 6 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 i32.const 8 - i32.add - local.get $2 - i32.const 16 - i32.shr_u - local.get $1 - i32.const 10 - i32.add - i32.load - local.tee $2 - i32.const 16 - i32.shl - i32.or - i32.store + i32.sub + local.set $2 local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.const 14 + i32.const 8 i32.add - i32.load - local.tee $5 - i32.const 16 - i32.shl - local.get $2 - i32.const 16 - i32.shr_u - i32.or - i32.store + local.set $0 local.get $1 - i32.const 16 + i32.const 8 i32.add local.set $1 - local.get $0 - i32.const 16 - i32.add - local.set $0 - local.get $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|4 + br $continue|1 end end - br $break|2 end - local.get $1 - i32.load - local.set $5 - local.get $0 - local.tee $2 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 - i32.add - local.set $1 - local.get $2 - local.get $4 - i32.load8_u - i32.store8 - local.get $3 - i32.const 1 - i32.sub - local.set $3 - loop $continue|5 - local.get $3 - i32.const 19 - i32.ge_u - if - local.get $0 - local.get $1 - i32.const 3 - i32.add - i32.load - local.tee $2 - 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 $2 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 7 - i32.add - i32.load - local.tee $2 - i32.const 24 - i32.shl - i32.or - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.const 8 - i32.shr_u - local.get $1 - i32.const 11 - i32.add - i32.load - local.tee $2 - 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 $2 - 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 $3 - i32.const 16 - i32.sub - local.set $3 - br $continue|5 - end - end - end - end - local.get $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - 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 $2 - 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 $2 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $3 - i32.const 1 - i32.and - if - local.get $0 - local.get $1 - i32.load8_u - i32.store8 - end - ) - (func $~lib/internal/memory/memmove (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 8 - local.set $2 - local.get $0 - local.get $1 - i32.eq - if - return - end - local.get $1 - i32.const 8 - i32.add - local.get $0 - i32.le_u - local.tee $3 - if (result i32) - local.get $3 - else - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.le_u - end - if - local.get $0 - local.get $1 - 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 + loop $continue|2 + local.get $2 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 @@ -984,100 +153,71 @@ 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.const 1 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 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq 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 + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 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 + 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|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -1085,32 +225,15 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 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 $start:std/pointer (; 4 ;) (type $FUNCSIG$v) + (func $start:std/pointer (; 3 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 8 @@ -1122,10 +245,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 79 + i32.const 24 + i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -1133,10 +256,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 80 + i32.const 24 + i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -1152,10 +275,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 84 + i32.const 24 + i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -1164,10 +287,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 85 + i32.const 24 + i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -1179,10 +302,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 88 + i32.const 24 + i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -1194,10 +317,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 91 + i32.const 24 + i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -1205,28 +328,28 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 93 + i32.const 24 + i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one i32.const 8 i32.add - global.set $std/pointer/one - global.get $std/pointer/one local.tee $0 + global.set $std/pointer/one + local.get $0 global.set $std/pointer/nextOne global.get $std/pointer/nextOne - local.get $0 + global.get $std/pointer/one i32.ne if i32.const 0 - i32.const 8 - i32.const 95 + i32.const 24 + i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -1234,10 +357,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 96 + i32.const 24 + i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -1245,10 +368,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 98 + i32.const 24 + i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -1264,10 +387,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 101 + i32.const 24 + i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -1276,10 +399,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 102 + i32.const 24 + i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/two @@ -1288,10 +411,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 103 + i32.const 24 + i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -1301,20 +424,20 @@ if local.get $0 local.get $1 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy else local.get $0 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill end global.get $std/pointer/one global.get $std/pointer/two i32.eq if i32.const 0 - i32.const 8 - i32.const 106 + i32.const 24 + i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -1323,10 +446,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 107 + i32.const 24 + i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -1335,10 +458,10 @@ i32.ne if i32.const 0 - i32.const 8 - i32.const 108 + i32.const 24 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1357,10 +480,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 114 + i32.const 24 + i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -1371,10 +494,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 115 + i32.const 24 + i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -1383,10 +506,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 117 + i32.const 24 + i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -1397,10 +520,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 118 + i32.const 24 + i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1409,10 +532,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 120 + i32.const 24 + i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -1421,10 +544,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 121 + i32.const 24 + i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -1439,10 +562,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 124 + i32.const 24 + i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -1453,10 +576,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 125 + i32.const 24 + i32.const 124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -1465,10 +588,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 126 + i32.const 24 + i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -1480,10 +603,10 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 129 + i32.const 24 + i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1492,17 +615,17 @@ f32.ne if i32.const 0 - i32.const 8 - i32.const 130 + i32.const 24 + i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 5 ;) (type $FUNCSIG$v) + (func $start (; 4 ;) (type $FUNCSIG$v) call $start:std/pointer ) - (func $null (; 6 ;) (type $FUNCSIG$v) + (func $null (; 5 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/pointer.ts b/tests/compiler/std/pointer.ts index bece2e1879..b9605afd67 100644 --- a/tests/compiler/std/pointer.ts +++ b/tests/compiler/std/pointer.ts @@ -2,7 +2,6 @@ class Pointer { - // FIXME: does not inline, always yields a trampoline @inline constructor(offset: usize = 0) { return changetype>(offset); } diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 72b2e61eac..4e11a239fc 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -5,9 +5,9 @@ (type $FUNCSIG$viif (func (param i32 i32 f32))) (type $FUNCSIG$vif (func (param i32 f32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $std/pointer/one (mut i32) (i32.const 0)) @@ -16,1724 +16,491 @@ (global $std/pointer/sub (mut i32) (i32.const 0)) (global $std/pointer/nextOne (mut i32) (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) - (func $~lib/internal/memory/memset (; 1 ;) (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/memory/memcpy (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 1 ;) (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 $6 i64) + block $~lib/util/memory/memset|inlined.0 local.get $2 - i32.const 1 - i32.and + i32.eqz 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 + br $~lib/util/memory/memset|inlined.0 end - i32.load8_u + local.get $0 + local.get $1 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 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 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 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 end - i32.load8_u + local.get $0 + i32.const 1 + i32.add + local.get $1 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 + 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 - end - ) - (func $~lib/internal/memory/memmove (; 3 ;) (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 + i32.const 3 + i32.sub local.get $1 + i32.store8 + local.get $2 + i32.const 6 i32.le_u - end - if + if + br $~lib/util/memory/memset|inlined.0 + end local.get $0 + i32.const 3 + i32.add local.get $1 + i32.store8 + local.get $0 local.get $2 - call $~lib/internal/memory/memcpy - return - end - local.get $0 - local.get $1 - i32.lt_u - if + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 7 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 - i32.const 7 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 + end + ) + (func $~lib/memory/memory.copy (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 i32.eq if - block $break|0 - loop $continue|0 - local.get $0 - i32.const 7 - i32.and + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 - 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 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 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.const 1 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 + br $continue|2 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 + 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.const 1 - i32.sub - local.set $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + 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 - 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 + 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 - 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|4 end - br $continue|3 end end end - block $break|4 - loop $continue|4 + block $break|5 + loop $continue|5 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 + 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 - 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 $std/pointer/Pointer#set:value (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $std/pointer/Pointer#set:value (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) local.get $1 i32.const 0 i32.eq if local.get $0 - local.set $2 i32.const 0 - local.set $3 i32.const 8 - local.set $4 - local.get $2 - local.get $3 - local.get $4 - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill else local.get $0 - local.set $4 local.get $1 - local.set $3 i32.const 8 - local.set $2 - local.get $4 - local.get $3 - local.get $2 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy end ) - (func $std/pointer/Pointer#set (; 5 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $std/pointer/Pointer#set (; 4 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $0 local.get $1 i32.const 4 @@ -1742,21 +509,21 @@ local.get $2 f32.store ) - (func $std/pointer/Pointer#set:value (; 6 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $std/pointer/Pointer#set:value (; 5 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) local.get $0 local.get $1 f32.store ) - (func $start:std/pointer (; 7 ;) (type $FUNCSIG$v) + (func $start:std/pointer (; 6 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 f32) block $std/pointer/Pointer#constructor|inlined.0 (result i32) i32.const 0 - local.set $0 - i32.const 8 local.set $1 - local.get $1 + i32.const 8 + local.set $0 + local.get $0 end global.set $std/pointer/one block $std/pointer/Pointer#constructor|inlined.1 (result i32) @@ -1777,10 +544,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 79 + i32.const 24 + i32.const 78 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:offset|inlined.1 (result i32) @@ -1793,10 +560,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 80 + i32.const 24 + i32.const 79 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.0 (result i32) @@ -1827,10 +594,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 84 + i32.const 24 + i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.3 (result i32) @@ -1845,36 +612,36 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 85 + i32.const 24 + i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#add|inlined.0 (result i32) global.get $std/pointer/one - local.set $0 - global.get $std/pointer/two local.set $1 - local.get $0 + global.get $std/pointer/two + local.set $0 local.get $1 + local.get $0 i32.add end global.set $std/pointer/add block $std/pointer/Pointer#get:offset|inlined.2 (result i32) global.get $std/pointer/add - local.set $1 - local.get $1 + local.set $0 + local.get $0 end i32.const 32 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 88 + i32.const 24 + i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#sub|inlined.0 (result i32) @@ -1897,10 +664,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 91 + i32.const 24 + i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:offset|inlined.4 (result i32) @@ -1913,10 +680,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 93 + i32.const 24 + i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -1927,8 +694,9 @@ i32.const 8 i32.add end + local.tee $0 global.set $std/pointer/one - global.get $std/pointer/one + local.get $0 end global.set $std/pointer/nextOne global.get $std/pointer/nextOne @@ -1937,10 +705,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 95 + i32.const 24 + i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:offset|inlined.5 (result i32) @@ -1953,10 +721,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 96 + i32.const 24 + i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:offset|inlined.6 (result i32) @@ -1969,10 +737,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 98 + i32.const 24 + i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#dec|inlined.0 (result i32) @@ -2001,10 +769,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 101 + i32.const 24 + i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.4 (result i32) @@ -2019,10 +787,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 102 + i32.const 24 + i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.5 (result i32) @@ -2037,10 +805,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 103 + i32.const 24 + i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/one @@ -2065,10 +833,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 106 + i32.const 24 + i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.7 (result i32) @@ -2083,10 +851,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 107 + i32.const 24 + i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get:value|inlined.8 (result i32) @@ -2101,18 +869,18 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 108 + i32.const 24 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#constructor|inlined.0 (result i32) - i32.const 0 - local.set $0 i32.const 0 local.set $1 - local.get $1 + i32.const 0 + local.set $0 + local.get $0 end global.set $std/pointer/buf global.get $std/pointer/buf @@ -2140,19 +908,19 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 114 + i32.const 24 + i32.const 113 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get|inlined.1 (result f32) global.get $std/pointer/buf - local.set $0 - i32.const 1 local.set $1 - local.get $0 + i32.const 1 + local.set $0 local.get $1 + local.get $0 i32.const 4 i32.mul i32.add @@ -2163,10 +931,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 115 + i32.const 24 + i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get|inlined.2 (result f32) @@ -2186,19 +954,19 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 117 + i32.const 24 + i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get|inlined.3 (result f32) global.get $std/pointer/buf - local.set $0 - i32.const 1 local.set $1 - local.get $0 + i32.const 1 + local.set $0 local.get $1 + local.get $0 i32.const 4 i32.mul i32.add @@ -2209,10 +977,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 118 + i32.const 24 + i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2222,10 +990,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 120 + i32.const 24 + i32.const 119 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -2235,10 +1003,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 121 + i32.const 24 + i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#set|inlined.0 @@ -2258,11 +1026,11 @@ end block $std/pointer/Pointer#get|inlined.4 (result f32) global.get $std/pointer/buf - local.set $0 - i32.const 2 local.set $1 - local.get $0 + i32.const 2 + local.set $0 local.get $1 + local.get $0 i32.const 4 i32.mul i32.add @@ -2273,10 +1041,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 124 + i32.const 24 + i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $std/pointer/Pointer#get|inlined.5 (result f32) @@ -2296,10 +1064,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 125 + i32.const 24 + i32.const 124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -2309,10 +1077,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 126 + i32.const 24 + i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/pointer/buf @@ -2330,10 +1098,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 129 + i32.const 24 + i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2343,16 +1111,16 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 130 + i32.const 24 + i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 8 ;) (type $FUNCSIG$v) + (func $start (; 7 ;) (type $FUNCSIG$v) call $start:std/pointer ) - (func $null (; 9 ;) (type $FUNCSIG$v) + (func $null (; 8 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/polyfills.json b/tests/compiler/std/polyfills.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/polyfills.optimized.wat b/tests/compiler/std/polyfills.optimized.wat index 819523fe1b..f983ab5f0a 100644 --- a/tests/compiler/std/polyfills.optimized.wat +++ b/tests/compiler/std/polyfills.optimized.wat @@ -1,11 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\10\00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $start) + (data (i32.const 8) "\10\00\00\00 ") + (data (i32.const 24) "s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/std/polyfills.untouched.wat b/tests/compiler/std/polyfills.untouched.wat index 8a6f21d814..20f565deee 100644 --- a/tests/compiler/std/polyfills.untouched.wat +++ b/tests/compiler/std/polyfills.untouched.wat @@ -3,14 +3,12 @@ (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$jj (func (param i64) (result i64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $~lib/polyfills/bswap (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 @@ -184,8 +182,81 @@ i32.or return ) - (func $start:std/polyfills (; 11 ;) (type $FUNCSIG$v) - (local $0 i32) + (func $~lib/polyfills/bswap16 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + return + ) + (func $~lib/polyfills/bswap16 (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + return + ) + (func $~lib/polyfills/bswap16 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + local.get $0 + i32.const 65535 + i32.and + i32.const 8 + i32.shr_u + i32.const 255 + i32.and + i32.or + return + ) + (func $~lib/polyfills/bswap16 (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 8 + i32.shr_s + i32.const 255 + i32.and + i32.or + return + ) + (func $~lib/polyfills/bswap16 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + i32.const 65280 + i32.and + local.get $0 + i32.const 8 + i32.shr_u + i32.const 255 + i32.and + i32.or + local.get $0 + i32.const -65536 + i32.and + i32.or + return + ) + (func $~lib/polyfills/bswap16 (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 8 + i32.shl + i32.const 65280 + i32.and + local.get $0 + i32.const 8 + i32.shr_s + i32.const 255 + i32.and + i32.or + local.get $0 + i32.const -65536 + i32.and + i32.or + return + ) + (func $start:std/polyfills (; 17 ;) (type $FUNCSIG$v) i32.const 170 call $~lib/polyfills/bswap i32.const 255 @@ -195,10 +266,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 170 @@ -216,10 +287,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 43707 @@ -231,10 +302,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 43707 @@ -252,10 +323,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1430532899 @@ -265,10 +336,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1430532899 @@ -278,10 +349,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4822679907192029 @@ -291,10 +362,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4822679907192029 @@ -304,10 +375,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1430532899 @@ -317,10 +388,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1430532899 @@ -330,18 +401,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const 170 - local.set $0 - local.get $0 - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const 170 + call $~lib/polyfills/bswap16 i32.const 255 i32.and i32.const 170 @@ -349,18 +416,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const 170 - local.set $0 - local.get $0 - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const 170 + call $~lib/polyfills/bswap16 i32.const 24 i32.shl i32.const 24 @@ -374,26 +437,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const 43707 - local.set $0 - local.get $0 - i32.const 8 - i32.shl - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.or - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const 43707 + call $~lib/polyfills/bswap16 i32.const 65535 i32.and i32.const 48042 @@ -401,30 +452,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const 43707 - local.set $0 - local.get $0 - i32.const 8 - i32.shl - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - i32.const 8 - i32.shr_s - i32.const 255 - i32.and - i32.or - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const 43707 + call $~lib/polyfills/bswap16 i32.const 16 i32.shl i32.const 16 @@ -438,78 +473,42 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const -7820613 - local.set $0 - local.get $0 - i32.const 8 - i32.shl - i32.const 65280 - i32.and - local.get $0 - i32.const 8 - i32.shr_u - i32.const 255 - i32.and - i32.or - local.get $0 - i32.const -65536 - i32.and - i32.or - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const -7820613 + call $~lib/polyfills/bswap16 i32.const -7816278 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/polyfills/bswap16|inlined.0 (result i32) - i32.const -7820613 - local.set $0 - local.get $0 - i32.const 8 - i32.shl - i32.const 65280 - i32.and - local.get $0 - i32.const 8 - i32.shr_s - i32.const 255 - i32.and - i32.or - local.get $0 - i32.const -65536 - i32.and - i32.or - br $~lib/polyfills/bswap16|inlined.0 - end + i32.const -7820613 + call $~lib/polyfills/bswap16 i32.const -7816278 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 18 ;) (type $FUNCSIG$v) call $start:std/polyfills ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 19 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/runtime.json b/tests/compiler/std/runtime.json new file mode 100644 index 0000000000..b1da366ff4 --- /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 new file mode 100644 index 0000000000..d2566dc84d --- /dev/null +++ b/tests/compiler/std/runtime.optimized.wat @@ -0,0 +1,1988 @@ +(module + (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$vii (func (param i32 i32))) + (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/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\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) "\10\00\00\00\10") + (data (i32.const 72) "b\00a\00r\00r\00i\00e\00r\001") + (data (i32.const 88) "\10\00\00\00\10") + (data (i32.const 104) "b\00a\00r\00r\00i\00e\00r\002") + (data (i32.const 120) "\10\00\00\00\10") + (data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\003") + (data (i32.const 152) "\10\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) "\10\00\00\00(") + (data (i32.const 232) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (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)) + (global $std/runtime/header2 (mut i32) (i32.const 0)) + (global $std/runtime/ref3 (mut i32) (i32.const 0)) + (global $std/runtime/ref4 (mut i32) (i32.const 0)) + (global $std/runtime/header4 (mut i32) (i32.const 0)) + (global $std/runtime/ref5 (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $std/runtime/main)) + (func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (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 168 + i32.const 165 + i32.const 4 + call $~lib/builtins/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 (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + local.get $2 + i32.const 32 + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 189 + i32.const 4 + call $~lib/builtins/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 (; 4 ;) (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 168 + i32.const 110 + i32.const 4 + call $~lib/builtins/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 168 + i32.const 111 + i32.const 11 + call $~lib/builtins/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/fls (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 452 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + i32.const 31 + local.get $0 + i32.clz + i32.sub + ) + (func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $2 + i32.const 32 + i32.lt_u + i32.const 0 + local.get $1 + i32.const 22 + i32.lt_u + select + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 181 + i32.const 4 + call $~lib/builtins/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 (; 7 ;) (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 168 + i32.const 159 + i32.const 4 + call $~lib/builtins/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 (; 8 ;) (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 $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 276 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.tee $2 + i32.const 16 + i32.ge_u + if (result i32) + local.get $2 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 278 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 8 + i32.div_u + local.set $4 + i32.const 0 + else + local.get $2 + local.get $2 + call $~lib/allocator/tlsf/fls + local.tee $3 + i32.const 5 + i32.sub + i32.shr_u + i32.const 32 + i32.xor + local.set $4 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $1 + i32.load offset=8 + local.set $2 + local.get $1 + i32.load offset=4 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=8 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $3 + local.get $4 + call $~lib/allocator/tlsf/Root#getHead + local.get $1 + i32.eq + if + local.get $0 + local.get $3 + local.get $4 + local.get $2 + call $~lib/allocator/tlsf/Root#setHead + local.get $2 + i32.eqz + if + local.get $0 + local.get $3 + local.get $0 + local.get $3 + 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 $3 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (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 168 + i32.const 102 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 4 + i32.sub + i32.load + local.tee $0 + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 103 + i32.const 11 + call $~lib/builtins/abort + unreachable + end + local.get $0 + ) + (func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + i32.load + i32.const 1 + i32.and + if (result i32) + local.get $0 + call $~lib/allocator/tlsf/Block#get:right + local.get $1 + i32.eq + else + i32.const 0 + end + if (result i32) + local.get $1 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 352 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.sub + local.get $0 + i32.store + ) + (func $~lib/allocator/tlsf/Root#insert (; 11 ;) (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 168 + i32.const 211 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.tee $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 213 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $5 + i32.load + local.tee $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $4 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $2 + i32.add + local.tee $2 + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $5 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.tee $1 + i32.load + local.tee $3 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 231 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + i32.const -4 + i32.and + i32.const 8 + i32.add + local.get $3 + i32.add + local.tee $2 + i32.store + end + local.get $5 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $1 + local.get $5 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + i32.const -4 + i32.and + local.tee $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 244 + i32.const 4 + call $~lib/builtins/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 $4 + local.get $3 + call $~lib/allocator/tlsf/Root#getHead + local.set $2 + local.get $1 + i32.const 0 + i32.store offset=4 + local.get $1 + local.get $2 + i32.store offset=8 + local.get $2 + if + local.get $2 + local.get $1 + i32.store offset=4 + end + local.get $0 + local.get $4 + 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 $4 + i32.shl + i32.or + i32.store + local.get $0 + local.get $4 + local.get $0 + local.get $4 + 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 (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + local.get $2 + i32.le_u + select + select + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 399 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=2912 + local.tee $3 + if + local.get $1 + local.get $3 + i32.const 8 + i32.add + i32.lt_u + if + i32.const 0 + i32.const 168 + i32.const 408 + i32.const 6 + call $~lib/builtins/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 168 + i32.const 417 + i32.const 6 + call $~lib/builtins/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 + local.get $0 + local.get $2 + i32.store offset=2912 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#insert + ) + (func $~lib/allocator/tlsf/ffs (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 446 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.ctz + ) + (func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + 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 168 + i32.const 341 + i32.const 16 + call $~lib/builtins/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 (; 15 ;) (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 $3 + i32.const 1 + i32.and + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 370 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 24 + i32.ge_u + if + local.get $1 + local.get $3 + 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 $4 + 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 $3 + i32.const -2 + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.tee $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 (; 16 ;) (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 $2 + i32.gt_s + if (result i32) + i32.const 1 + local.get $2 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 272 + local.set $2 + i32.const 272 + global.set $~lib/allocator/tlsf/ROOT + i32.const 3184 + i32.const 0 + i32.store + i32.const 272 + i32.const 0 + i32.store + loop $repeat|0 + local.get $1 + i32.const 22 + i32.lt_u + if + i32.const 272 + 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 272 + 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 272 + i32.const 3192 + 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 + local.get $2 + local.get $0 + i32.const 7 + i32.add + i32.const -8 + i32.and + local.tee $0 + i32.const 16 + 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 + current_memory + local.tee $0 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $3 + local.get $0 + 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 + 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 168 + i32.const 507 + i32.const 12 + call $~lib/builtins/abort + unreachable + end + end + local.get $0 + i32.load + i32.const -4 + i32.and + local.get $1 + i32.lt_u + if + i32.const 0 + i32.const 168 + i32.const 510 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#use + ) + (func $~lib/util/runtime/allocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/tlsf/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + 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 + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.copy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/memory/memory.fill (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + end + ) + (func $~lib/allocator/tlsf/__mem_free (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + if + i32.const 0 + i32.const 168 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + 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 168 + i32.const 524 + i32.const 6 + call $~lib/builtins/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/util/runtime/reallocate (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.const 16 + i32.sub + local.tee $4 + i32.load offset=4 + local.tee $2 + local.get $1 + i32.lt_u + if + i32.const 1 + i32.const 32 + local.get $1 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $3 + local.set $5 + i32.const 1 + i32.const 32 + local.get $2 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 0 + local.get $0 + i32.const 272 + i32.gt_u + select + local.get $3 + i32.lt_u + if + local.get $5 + call $~lib/allocator/tlsf/__mem_allocate + local.tee $3 + local.get $4 + i32.load + i32.store + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + i32.const 0 + i32.store offset=12 + local.get $3 + i32.const 16 + i32.add + local.tee $5 + local.get $0 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + local.get $4 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 272 + i32.le_u + if + i32.const 0 + i32.const 232 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/allocator/tlsf/__mem_free + else + local.get $0 + global.set $std/runtime/register_ref + end + local.get $3 + local.set $4 + local.get $5 + local.set $0 + else + local.get $0 + local.get $2 + i32.add + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill + end + end + local.get $4 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/util/runtime/discard (; 22 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 272 + i32.le_u + if + i32.const 0 + i32.const 232 + i32.const 115 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 232 + i32.const 117 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $~lib/util/runtime/register (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.const 272 + i32.le_u + if + i32.const 0 + i32.const 232 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 232 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 17 + i32.store + local.get $0 + global.set $std/runtime/register_ref + ) + (func $start:std/runtime (; 24 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + loop $repeat|0 + local.get $0 + i32.const 9000 + i32.lt_s + if + i32.const 1 + i32.const 32 + local.get $0 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $1 + local.get $1 + i32.const 1 + i32.sub + i32.and + i32.eqz + i32.const 0 + local.get $1 + select + if + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|0 + else + i32.const 0 + i32.const 24 + i32.const 52 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + unreachable + end + end + i32.const 16 + global.set $std/runtime/barrier1 + global.get $std/runtime/barrier1 + i32.const 1 + i32.add + global.set $std/runtime/barrier2 + loop $continue|1 + i32.const 1 + i32.const 32 + global.get $std/runtime/barrier2 + i32.const 16 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.const 32 + global.get $std/runtime/barrier2 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.eq + if + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + global.set $std/runtime/barrier2 + br $continue|1 + end + end + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + global.set $std/runtime/barrier3 + loop $continue|2 + i32.const 1 + i32.const 32 + global.get $std/runtime/barrier3 + i32.const 16 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 1 + i32.const 32 + global.get $std/runtime/barrier3 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.eq + if + global.get $std/runtime/barrier3 + i32.const 1 + i32.add + global.set $std/runtime/barrier3 + br $continue|2 + end + end + i32.const 72 + i32.const 1 + global.get $std/runtime/barrier1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 104 + i32.const 1 + global.get $std/runtime/barrier2 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 136 + i32.const 1 + global.get $std/runtime/barrier3 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 1 + call $~lib/util/runtime/allocate + global.set $std/runtime/ref1 + global.get $std/runtime/ref1 + i32.const 16 + i32.sub + global.set $std/runtime/header1 + global.get $std/runtime/header1 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 67 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/header1 + i32.load offset=4 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 68 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref1 + local.tee $0 + local.get $0 + global.get $std/runtime/barrier1 + call $~lib/util/runtime/reallocate + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 69 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/barrier1 + global.get $std/runtime/header1 + i32.load offset=4 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 70 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref1 + global.get $std/runtime/barrier2 + call $~lib/util/runtime/reallocate + global.set $std/runtime/ref2 + global.get $std/runtime/ref1 + global.get $std/runtime/ref2 + i32.eq + if + i32.const 0 + i32.const 24 + i32.const 72 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref2 + i32.const 16 + i32.sub + global.set $std/runtime/header2 + global.get $std/runtime/barrier2 + global.get $std/runtime/header2 + i32.load offset=4 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 74 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref2 + call $~lib/util/runtime/discard + global.get $std/runtime/barrier2 + call $~lib/util/runtime/allocate + global.set $std/runtime/ref3 + global.get $std/runtime/ref1 + global.get $std/runtime/ref3 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 77 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/barrier1 + call $~lib/util/runtime/allocate + global.set $std/runtime/ref4 + global.get $std/runtime/ref4 + call $~lib/util/runtime/register + global.get $std/runtime/register_ref + global.get $std/runtime/ref4 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 81 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/register_ref + i32.const 16 + i32.sub + global.set $std/runtime/header4 + global.get $std/runtime/header4 + i32.load + i32.const 17 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 83 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/barrier1 + global.get $std/runtime/header4 + i32.load offset=4 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 84 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 10 + call $~lib/util/runtime/allocate + global.set $std/runtime/ref5 + global.get $std/runtime/ref5 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 87 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref5 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 24 + i32.const 88 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $std/runtime/main (; 25 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start:std/runtime + i32.const 1 + global.set $~lib/started + end + ) + (func $null (; 26 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/compiler/std/runtime.ts b/tests/compiler/std/runtime.ts new file mode 100644 index 0000000000..77d330f0ba --- /dev/null +++ b/tests/compiler/std/runtime.ts @@ -0,0 +1,88 @@ +import "allocator/tlsf"; +import { HEADER, HEADER_SIZE, HEADER_MAGIC, adjust, allocate, reallocate, discard, register } from "util/runtime"; +import { runtime, __runtime_id } from "runtime"; + +// @ts-ignore: decorator +@start +export function main(): void {} + +var register_ref: usize = 0; + +// @ts-ignore: decorator +@global +function __ref_register(ref: usize): void { + register_ref = ref; +} + +var link_ref: usize = 0; +var link_parentRef: usize = 0; + +// @ts-ignore: decorator +@global +function __ref_link(ref: usize, parentRef: usize): void { + link_ref = ref; + link_parentRef = parentRef; +} + +// @ts-ignore: decorator +@global +function __ref_unlink(ref: usize, parentRef: usize): void { +} + +// @ts-ignore: decorator +@global +function __ref_collect(): void { +} + +// @ts-ignore: decorator +@global +function __ref_mark(ref: usize): void { +} + +class A {} +class B {} +assert(__runtime_id() != __runtime_id()); + +function isPowerOf2(x: i32): bool { + return x != 0 && (x & (x - 1)) == 0; +} + +assert(adjust(0) > 0); +for (let i = 0; i < 9000; ++i) { + assert(isPowerOf2(adjust(i))); +} + +var barrier1 = adjust(0); +var barrier2 = barrier1 + 1; +while (adjust(barrier2 + 1) == adjust(barrier2)) ++barrier2; +var barrier3 = barrier2 + 1; +while (adjust(barrier3 + 1) == adjust(barrier3)) ++barrier3; + +trace("barrier1", 1, barrier1); +trace("barrier2", 1, barrier2); +trace("barrier3", 1, barrier3); + +var ref1 = allocate(1); +var header1 = changetype
(ref1 - HEADER_SIZE); +assert(header1.classId == HEADER_MAGIC); +assert(header1.payloadSize == 1); +assert(ref1 == reallocate(ref1, barrier1)); // same segment +assert(header1.payloadSize == barrier1); +var ref2 = reallocate(ref1, barrier2); +assert(ref1 != ref2); // moves +var header2 = changetype
(ref2 - HEADER_SIZE); +assert(header2.payloadSize == barrier2); +discard(ref2); +var ref3 = allocate(barrier2); +assert(ref1 == ref3); // reuses space of ref1 (free'd in realloc), ref2 (explicitly free'd) + +var ref4 = allocate(barrier1); +register(ref4, __runtime_id()); // should call __gc_register +assert(register_ref == ref4); +var header4 = changetype
(register_ref - HEADER_SIZE); +assert(header4.classId == __runtime_id()); +assert(header4.payloadSize == barrier1); + +var ref5 = allocate(10); +assert(changetype(ref5).byteLength == 10); +assert(changetype(ref5).length == 5); diff --git a/tests/compiler/std/runtime.untouched.wat b/tests/compiler/std/runtime.untouched.wat new file mode 100644 index 0000000000..7772d33566 --- /dev/null +++ b/tests/compiler/std/runtime.untouched.wat @@ -0,0 +1,2379 @@ +(module + (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$vii (func (param i32 i32))) + (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/builtins/abort (param i32 i32 i32 i32))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) + (memory $0 1) + (data (i32.const 8) "\10\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) "\10\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) "\10\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) "\10\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) "\10\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) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (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/util/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/util/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)) + (global $std/runtime/header2 (mut i32) (i32.const 0)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $std/runtime/ref3 (mut i32) (i32.const 0)) + (global $std/runtime/ref4 (mut i32) (i32.const 0)) + (global $std/runtime/header4 (mut i32) (i32.const 0)) + (global $std/runtime/ref5 (mut i32) (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 272)) + (export "memory" (memory $0)) + (export "main" (func $std/runtime/main)) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $std/runtime/isPowerOf2 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 0 + i32.ne + if (result i32) + local.get $0 + local.get $0 + i32.const 1 + i32.sub + i32.and + i32.const 0 + i32.eq + else + i32.const 0 + end + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $0 + local.get $1 + i32.store offset=2912 + ) + (func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 165 + i32.const 4 + call $~lib/builtins/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 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 189 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + 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) + local.get $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 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 110 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 8 + i32.add + local.get $0 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.tee $1 + i32.eqz + if (result i32) + i32.const 0 + i32.const 168 + i32.const 111 + i32.const 11 + call $~lib/builtins/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 168 + i32.const 452 + i32.const 2 + call $~lib/builtins/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 + i32.const 22 + i32.lt_u + if (result i32) + local.get $2 + i32.const 32 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 181 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 32 + 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 + i32.const 22 + i32.lt_u + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 159 + i32.const 4 + call $~lib/builtins/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 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 276 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 278 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $4 + local.get $3 + i32.const 8 + i32.div_u + local.set $5 + else + local.get $3 + call $~lib/allocator/tlsf/fls + local.set $4 + local.get $3 + local.get $4 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $5 + local.get $4 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $4 + end + local.get $1 + i32.load offset=4 + local.set $6 + local.get $1 + i32.load offset=8 + local.set $7 + local.get $6 + if + local.get $6 + local.get $7 + i32.store offset=8 + end + local.get $7 + if + local.get $7 + local.get $6 + i32.store offset=4 + end + local.get $1 + local.get $0 + local.get $4 + local.get $5 + call $~lib/allocator/tlsf/Root#getHead + i32.eq + if + local.get $0 + local.get $4 + local.get $5 + local.get $7 + call $~lib/allocator/tlsf/Root#setHead + local.get $7 + i32.eqz + if + local.get $0 + local.get $4 + call $~lib/allocator/tlsf/Root#getSLMap + local.set $8 + local.get $0 + local.get $4 + local.get $8 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $8 + call $~lib/allocator/tlsf/Root#setSLMap + local.get $8 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + 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 + i32.const 2 + i32.and + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 102 + i32.const 4 + call $~lib/builtins/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 168 + i32.const 103 + i32.const 11 + call $~lib/builtins/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 + i32.const 1 + i32.and + i32.const 0 + i32.ne + if (result i32) + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.get $2 + i32.eq + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.load + i32.const 2 + i32.and + i32.const 0 + i32.ne + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 352 + i32.const 4 + call $~lib/builtins/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 168 + i32.const 211 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 213 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $4 + i32.const 1 + i32.and + if + local.get $0 + local.get $3 + call $~lib/allocator/tlsf/Root#remove + local.get $1 + local.get $2 + i32.const 8 + local.get $4 + i32.const 3 + 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 $3 + local.get $3 + i32.load + local.set $4 + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + call $~lib/allocator/tlsf/Block#get:left + local.set $5 + local.get $5 + i32.load + local.set $6 + local.get $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 231 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#remove + local.get $5 + local.get $6 + i32.const 8 + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + i32.add + local.tee $6 + i32.store + local.get $5 + local.set $1 + local.get $6 + local.set $2 + end + local.get $3 + local.get $4 + i32.const 2 + i32.or + i32.store + local.get $0 + local.get $1 + local.get $3 + call $~lib/allocator/tlsf/Root#setJump + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $7 + local.get $7 + i32.const 16 + i32.ge_u + if (result i32) + local.get $7 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 244 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $7 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $8 + local.get $7 + i32.const 8 + i32.div_u + local.set $9 + else + local.get $7 + call $~lib/allocator/tlsf/fls + local.set $8 + local.get $7 + local.get $8 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $9 + local.get $8 + i32.const 8 + 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 + if (result i32) + local.get $1 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 399 + i32.const 4 + call $~lib/builtins/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 8 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 408 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 8 + i32.sub + local.get $3 + i32.eq + if + local.get $1 + i32.const 8 + i32.sub + local.set $1 + local.get $3 + i32.load + local.set $4 + end + else + local.get $1 + local.get $0 + i32.const 2916 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 417 + i32.const 6 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $5 + local.get $5 + i32.const 8 + i32.const 16 + i32.add + i32.const 8 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $5 + i32.const 2 + i32.const 8 + i32.mul + i32.sub + local.set $6 + local.get $1 + local.set $7 + local.get $7 + local.get $6 + i32.const 1 + i32.or + local.get $4 + i32.const 2 + 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 + i32.const 8 + i32.sub + local.set $8 + local.get $8 + i32.const 0 + i32.const 2 + 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 168 + i32.const 446 + i32.const 2 + call $~lib/builtins/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 168 + i32.const 446 + i32.const 2 + call $~lib/builtins/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 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 8 + i32.div_u + local.set $3 + else + local.get $1 + call $~lib/allocator/tlsf/fls + local.set $2 + local.get $1 + local.get $2 + i32.const 5 + i32.sub + i32.shr_u + i32.const 1 + i32.const 5 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + local.get $3 + i32.const 32 + i32.const 1 + i32.sub + i32.lt_u + if + local.get $3 + i32.const 1 + i32.add + local.set $3 + else + local.get $2 + i32.const 1 + i32.add + local.set $2 + i32.const 0 + local.set $3 + end + end + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.shl + i32.and + local.set $4 + local.get $4 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $6 + local.get $6 + i32.eqz + if + i32.const 0 + local.set $5 + else + local.get $6 + call $~lib/allocator/tlsf/ffs + local.set $2 + local.get $0 + local.get $2 + call $~lib/allocator/tlsf/Root#getSLMap + local.tee $7 + if (result i32) + local.get $7 + else + i32.const 0 + i32.const 168 + i32.const 341 + i32.const 16 + call $~lib/builtins/abort + unreachable + end + local.set $4 + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $5 + end + else + local.get $0 + local.get $2 + local.get $4 + call $~lib/allocator/tlsf/ffs + call $~lib/allocator/tlsf/Root#getHead + local.set $5 + end + local.get $5 + ) + (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 + i32.const 1 + i32.and + i32.const 0 + i32.ne + if (result i32) + local.get $2 + i32.const 7 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 370 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + call $~lib/allocator/tlsf/Root#remove + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $4 + local.get $4 + i32.const 8 + i32.const 16 + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 8 + i32.add + local.get $2 + i32.add + local.set $5 + local.get $5 + local.get $4 + i32.const 8 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $5 + call $~lib/allocator/tlsf/Root#insert + else + local.get $1 + local.get $3 + i32.const 1 + i32.const -1 + i32.xor + i32.and + i32.store + local.get $1 + call $~lib/allocator/tlsf/Block#get:right + local.set $5 + local.get $5 + local.get $5 + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + i32.store + end + local.get $1 + i32.const 8 + 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 $7 i32) + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + i32.eqz + if + 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 + i32.const 2916 + i32.add + i32.const 65535 + i32.add + i32.const 65535 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.shr_u + local.set $4 + local.get $4 + local.get $3 + i32.gt_s + if (result i32) + local.get $4 + local.get $3 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + 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 + i32.const 22 + 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 + i32.const 32 + 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 + i32.const 2916 + 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 + i32.const 1073741824 + 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 + i32.const 16 + 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 $2 + local.get $2 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + 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 168 + i32.const 507 + i32.const 12 + call $~lib/builtins/abort + unreachable + else + local.get $6 + end + local.set $7 + end + local.get $7 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $0 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 510 + i32.const 2 + call $~lib/builtins/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/util/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + 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/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/memory/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 + end + ) + (func $~lib/allocator/tlsf/__mem_free (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + if + local.get $0 + i32.const 7 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 519 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/allocator/tlsf/ROOT + local.set $1 + local.get $1 + if + local.get $0 + i32.const 8 + i32.sub + local.set $2 + local.get $2 + i32.load + local.set $3 + local.get $3 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 168 + i32.const 524 + i32.const 6 + call $~lib/builtins/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/memory/memory.free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/tlsf/__mem_free + ) + (func $std/runtime/__ref_register (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.set $std/runtime/register_ref + ) + (func $~lib/util/runtime/reallocate (; 29 ;) (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 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u + if + local.get $1 + call $~lib/util/runtime/adjust + local.set $4 + local.get $3 + call $~lib/util/runtime/adjust + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u + if + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load + i32.store + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + if + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 232 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/memory/memory.free + else + local.get $0 + call $std/runtime/__ref_register + end + local.get $5 + local.set $2 + local.get $6 + local.set $0 + else + local.get $0 + local.get $3 + i32.add + i32.const 0 + local.get $1 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + end + else + nop + end + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/util/runtime/discard (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 232 + i32.const 115 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 232 + i32.const 117 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free + ) + (func $~lib/util/runtime/register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 232 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 232 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + call $std/runtime/__ref_register + local.get $0 + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $start:std/runtime (; 34 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 17 + i32.const 18 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 44 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + call $~lib/util/runtime/adjust + i32.const 0 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 50 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + block $break|0 + i32.const 0 + local.set $0 + loop $repeat|0 + local.get $0 + i32.const 9000 + i32.lt_s + i32.eqz + br_if $break|0 + local.get $0 + call $~lib/util/runtime/adjust + call $std/runtime/isPowerOf2 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 52 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|0 + unreachable + end + unreachable + end + i32.const 0 + call $~lib/util/runtime/adjust + global.set $std/runtime/barrier1 + global.get $std/runtime/barrier1 + i32.const 1 + i32.add + global.set $std/runtime/barrier2 + block $break|1 + loop $continue|1 + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + call $~lib/util/runtime/adjust + global.get $std/runtime/barrier2 + call $~lib/util/runtime/adjust + i32.eq + if + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + global.set $std/runtime/barrier2 + br $continue|1 + end + end + end + global.get $std/runtime/barrier2 + i32.const 1 + i32.add + global.set $std/runtime/barrier3 + block $break|2 + loop $continue|2 + global.get $std/runtime/barrier3 + i32.const 1 + i32.add + call $~lib/util/runtime/adjust + global.get $std/runtime/barrier3 + call $~lib/util/runtime/adjust + i32.eq + if + global.get $std/runtime/barrier3 + i32.const 1 + i32.add + global.set $std/runtime/barrier3 + br $continue|2 + end + end + end + i32.const 72 + i32.const 1 + global.get $std/runtime/barrier1 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 104 + i32.const 1 + global.get $std/runtime/barrier2 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 136 + i32.const 1 + global.get $std/runtime/barrier3 + f64.convert_i32_u + f64.const 0 + f64.const 0 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 1 + call $~lib/util/runtime/allocate + global.set $std/runtime/ref1 + global.get $std/runtime/ref1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + global.set $std/runtime/header1 + global.get $std/runtime/header1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 67 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/header1 + i32.load offset=4 + i32.const 1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 68 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref1 + global.get $std/runtime/ref1 + global.get $std/runtime/barrier1 + call $~lib/util/runtime/reallocate + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 69 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/header1 + i32.load offset=4 + global.get $std/runtime/barrier1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 70 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref1 + global.get $std/runtime/barrier2 + call $~lib/util/runtime/reallocate + global.set $std/runtime/ref2 + global.get $std/runtime/ref1 + global.get $std/runtime/ref2 + i32.ne + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 72 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + global.set $std/runtime/header2 + global.get $std/runtime/header2 + i32.load offset=4 + global.get $std/runtime/barrier2 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 74 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref2 + call $~lib/util/runtime/discard + global.get $std/runtime/barrier2 + call $~lib/util/runtime/allocate + global.set $std/runtime/ref3 + global.get $std/runtime/ref1 + global.get $std/runtime/ref3 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 77 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/barrier1 + call $~lib/util/runtime/allocate + global.set $std/runtime/ref4 + global.get $std/runtime/ref4 + i32.const 17 + call $~lib/util/runtime/register + drop + global.get $std/runtime/register_ref + global.get $std/runtime/ref4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 81 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/register_ref + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + global.set $std/runtime/header4 + global.get $std/runtime/header4 + i32.load + i32.const 17 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 83 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/header4 + i32.load offset=4 + global.get $std/runtime/barrier1 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 84 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 10 + call $~lib/util/runtime/allocate + global.set $std/runtime/ref5 + global.get $std/runtime/ref5 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + i32.const 10 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 87 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + global.get $std/runtime/ref5 + call $~lib/string/String#get:length + i32.const 5 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 88 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $std/runtime/main (; 35 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $start (; 36 ;) (type $FUNCSIG$v) + call $start:std/runtime + ) + (func $null (; 37 ;) (type $FUNCSIG$v) + ) +) diff --git a/tests/compiler/std/set.json b/tests/compiler/std/set.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 1b5dbb5e51..8194d76daf 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,37 +1,46 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) - (type $FUNCSIG$vi (func (param i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (type $FUNCSIG$viiii (func (param i32 i32 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$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) (type $FUNCSIG$vij (func (param i32 i64))) (type $FUNCSIG$iif (func (param i32 f32) (result i32))) - (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$iifi (func (param i32 f32 i32) (result i32))) (type $FUNCSIG$vif (func (param i32 f32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) - (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iidi (func (param i32 f64 i32) (result i32))) (type $FUNCSIG$vid (func (param i32 f64))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\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") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00(") + (data (i32.const 24) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00&") + (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00\14") + (data (i32.const 136) "s\00t\00d\00/\00s\00e\00t\00.\00t\00s") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\1a\00\00\00\00\00\00\00\1a\00\00\00\00\00\00\00*\00\00\00\00\00\00\00*\00\00\00\00\00\00\00J\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -93,292 +102,323 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (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 56 - 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.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 3 ;) (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 + i32.store offset=4 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 + i32.store offset=8 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 + i32.store offset=12 local.get $1 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 + i32.const 16 i32.add - i32.const 0 - i32.store8 + ) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) 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.const 392 i32.le_u if - return + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end - i32.const 0 local.get $0 + i32.const 16 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 + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + ) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.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 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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.sub - local.set $1 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 + 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 end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - i32.const 1073741816 + i32.const 1073741808 i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 - call $~lib/env/abort + i32.const 80 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 + call $~lib/util/runtime/allocate + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill local.get $1 - i32.eqz - if - local.get $2 - i32.const 8 - i32.add - local.get $0 - call $~lib/internal/memory/memset - end - local.get $2 + i32.const 15 + call $~lib/util/runtime/register ) - (func $~lib/set/Set#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load + i32.ne + drop + local.get $0 + local.get $1 i32.store local.get $0 i32.const 3 i32.store offset=4 - local.get $0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load offset=8 + i32.ne + drop + local.get $0 + local.get $1 i32.store offset=8 local.get $0 i32.const 4 @@ -390,10 +430,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -416,7 +458,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/set/Set#find (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -426,42 +468,40 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=4 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load8_u local.get $1 i32.const 255 i32.and i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=4 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -477,7 +517,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -488,13 +528,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -502,13 +541,10 @@ local.tee $6 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -516,9 +552,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -546,14 +580,14 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=4 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -567,13 +601,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -583,7 +623,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -643,12 +683,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -670,14 +708,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=4 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -724,8 +762,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -735,16 +772,16 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 call $~lib/set/Set#rehash end ) - (func $std/set/test (; 12 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 13 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) call $~lib/set/Set#constructor @@ -759,10 +796,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -779,10 +816,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -794,10 +831,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -813,10 +850,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -833,10 +870,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -848,10 +885,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -867,10 +904,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -881,10 +918,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -902,10 +939,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -920,10 +957,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -935,10 +972,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -949,10 +986,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -970,10 +1007,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -982,14 +1019,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#has (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#constructor (; 14 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1003,7 +1068,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1014,13 +1079,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1028,13 +1092,10 @@ local.tee $6 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -1042,9 +1103,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -1072,14 +1131,14 @@ i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=4 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -1093,13 +1152,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -1109,7 +1174,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1167,12 +1232,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -1194,14 +1257,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=4 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1246,8 +1309,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -1257,19 +1319,19 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 call $~lib/set/Set#rehash end ) - (func $std/set/test (; 17 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 19 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -1281,10 +1343,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1301,10 +1363,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -1316,10 +1378,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -1335,10 +1397,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1355,10 +1417,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -1370,10 +1432,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1389,10 +1451,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1403,10 +1465,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1424,10 +1486,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1442,10 +1504,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1457,10 +1519,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1471,10 +1533,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -1492,10 +1554,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1504,14 +1566,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#find (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/set/Set#find (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -1521,42 +1611,40 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=4 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load16_u local.get $1 i32.const 65535 i32.and i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=4 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -1581,7 +1669,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1592,13 +1680,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $2 + local.set $6 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -1606,13 +1693,10 @@ local.tee $7 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -1620,9 +1704,7 @@ i32.shl i32.add local.set $8 - local.get $6 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -1642,14 +1724,14 @@ local.get $3 local.get $2 i32.load16_s - local.tee $4 + local.tee $5 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $4 + local.get $5 i32.const 8 i32.shr_u i32.xor @@ -1659,14 +1741,14 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $6 i32.add - local.tee $4 - i32.load offset=8 + local.tee $5 + i32.load i32.store offset=4 - local.get $4 + local.get $5 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -1680,13 +1762,19 @@ end end local.get $0 - local.get $5 + i32.load + drop + local.get $0 + local.get $6 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $6 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $7 @@ -1696,7 +1784,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1765,12 +1853,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -1792,14 +1878,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=4 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 22 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -1855,8 +1941,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -1866,19 +1951,19 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 call $~lib/set/Set#rehash end ) - (func $std/set/test (; 23 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 26 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -1890,10 +1975,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1910,10 +1995,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -1925,10 +2010,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -1944,10 +2029,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1964,10 +2049,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -1979,10 +2064,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -1998,10 +2083,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2012,10 +2097,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2033,10 +2118,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2051,10 +2136,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2066,10 +2151,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2080,10 +2165,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2101,10 +2186,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2113,14 +2198,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#constructor (; 27 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/set/Set#has (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 @@ -2143,7 +2256,7 @@ i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 29 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2154,13 +2267,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 - local.get $2 + local.set $6 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -2168,13 +2280,10 @@ local.tee $7 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $6 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -2182,9 +2291,7 @@ i32.shl i32.add local.set $8 - local.get $6 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -2204,14 +2311,14 @@ local.get $3 local.get $2 i32.load16_u - local.tee $4 + local.tee $5 i32.const 255 i32.and i32.const -2128831035 i32.xor i32.const 16777619 i32.mul - local.get $4 + local.get $5 i32.const 8 i32.shr_u i32.xor @@ -2221,14 +2328,14 @@ i32.and i32.const 2 i32.shl - local.get $5 + local.get $6 i32.add - local.tee $4 - i32.load offset=8 + local.tee $5 + i32.load i32.store offset=4 - local.get $4 + local.get $5 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -2242,13 +2349,19 @@ end end local.get $0 - local.get $5 + i32.load + drop + local.get $0 + local.get $6 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $6 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $7 @@ -2258,7 +2371,7 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2325,12 +2438,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -2352,14 +2463,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=4 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 @@ -2413,8 +2524,7 @@ i32.gt_u select i32.ge_u - local.tee $1 - if + if (result i32) local.get $0 i32.load offset=20 local.get $0 @@ -2424,19 +2534,19 @@ f64.mul i32.trunc_f64_s i32.lt_s - local.set $1 + else + i32.const 0 end - local.get $1 if local.get $0 local.get $2 call $~lib/set/Set#rehash end ) - (func $std/set/test (; 28 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 32 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -2448,10 +2558,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2468,10 +2578,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -2483,10 +2593,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -2502,10 +2612,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2522,10 +2632,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -2537,10 +2647,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2556,10 +2666,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2570,10 +2680,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2591,10 +2701,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -2609,10 +2719,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2624,10 +2734,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2638,10 +2748,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -2659,10 +2769,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -2671,14 +2781,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/hash/hash32 (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 33 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $~lib/util/hash/hash32 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -2709,7 +2847,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 30 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -2719,49 +2857,47 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=4 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load local.get $1 i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=4 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2772,13 +2908,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -2786,13 +2921,10 @@ local.tee $6 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -2800,9 +2932,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -2822,19 +2952,19 @@ local.get $3 local.get $2 i32.load - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=4 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -2848,13 +2978,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -2864,17 +3000,15 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 33 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 38 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - call $~lib/internal/hash/hash32 - local.tee $2 - local.set $3 local.get $0 local.get $1 - local.get $2 + local.get $1 + call $~lib/util/hash/hash32 + local.tee $3 call $~lib/set/Set#find i32.eqz if @@ -2917,12 +3051,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -2944,19 +3076,19 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=4 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#delete (; 39 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $1 i32.eqz @@ -2991,7 +3123,6 @@ i32.gt_u select i32.ge_u - local.tee $1 if (result i32) local.get $0 i32.load offset=20 @@ -3003,7 +3134,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $1 + i32.const 0 end if local.get $0 @@ -3011,10 +3142,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 35 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 40 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -3026,10 +3157,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3046,10 +3177,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3061,10 +3192,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -3080,10 +3211,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3100,10 +3231,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3115,10 +3246,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3134,10 +3265,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3148,10 +3279,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3169,10 +3300,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3187,10 +3318,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3202,10 +3333,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3216,10 +3347,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3237,10 +3368,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3249,17 +3380,45 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/set/test (; 36 ;) (type $FUNCSIG$v) + (func $~lib/set/Set#constructor (; 41 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $std/set/testNumeric (; 42 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -3271,10 +3430,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3291,10 +3450,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3306,10 +3465,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 50 @@ -3325,10 +3484,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3345,10 +3504,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3360,10 +3519,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3379,10 +3538,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3393,10 +3552,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3414,10 +3573,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -3432,10 +3591,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3447,10 +3606,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3461,10 +3620,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -3482,10 +3641,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3494,26 +3653,37 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 37 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 + (func $~lib/set/Set#clear (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load + i32.ne + drop + local.get $0 + local.get $1 i32.store local.get $0 i32.const 3 i32.store offset=4 - local.get $0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $1 + local.get $0 + i32.load offset=8 + i32.ne + drop + local.get $0 + local.get $1 i32.store offset=8 local.get $0 i32.const 4 @@ -3525,10 +3695,12 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 38 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/set/Set#constructor (; 44 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -3551,7 +3723,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash64 (; 39 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 45 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i32.wrap_i64 @@ -3617,7 +3789,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/set/Set#find (; 40 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 46 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -3627,49 +3799,47 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i64.load local.get $1 i64.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (; 41 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 47 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 48 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3680,13 +3850,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -3694,13 +3863,10 @@ local.tee $6 i32.const 4 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -3708,9 +3874,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -3730,19 +3894,19 @@ local.get $3 local.get $2 i64.load - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 16 i32.add @@ -3756,13 +3920,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -3772,17 +3942,15 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 43 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 49 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $1 - call $~lib/internal/hash/hash64 - local.tee $2 - local.set $3 local.get $0 local.get $1 - local.get $2 + local.get $1 + call $~lib/util/hash/hash64 + local.tee $3 call $~lib/set/Set#find i32.eqz if @@ -3825,12 +3993,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 4 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -3852,20 +4018,20 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 44 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#delete (; 50 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find local.tee $2 i32.eqz @@ -3900,7 +4066,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -3912,7 +4077,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -3920,7 +4085,7 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 45 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 51 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) call $~lib/set/Set#constructor @@ -3935,10 +4100,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -3955,10 +4120,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -3970,10 +4135,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 50 @@ -3989,10 +4154,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4009,10 +4174,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4024,10 +4189,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4043,10 +4208,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4057,10 +4222,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4078,10 +4243,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4096,10 +4261,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4111,10 +4276,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4125,10 +4290,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4146,10 +4311,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4158,17 +4323,45 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/set/test (; 46 ;) (type $FUNCSIG$v) + (func $~lib/set/Set#constructor (; 52 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear + local.get $0 + ) + (func $std/set/testNumeric (; 53 ;) (type $FUNCSIG$v) (local $0 i64) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -4180,10 +4373,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4200,10 +4393,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4215,10 +4408,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 50 @@ -4234,10 +4427,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4254,10 +4447,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4269,10 +4462,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4288,10 +4481,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4302,10 +4495,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4323,10 +4516,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 @@ -4341,10 +4534,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4356,10 +4549,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4370,10 +4563,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4391,10 +4584,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4403,19 +4596,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/hash/HASH (; 47 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + (func $~lib/set/Set#constructor (; 54 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear local.get $0 - i32.reinterpret_f32 - call $~lib/internal/hash/hash32 ) - (func $~lib/set/Set#find (; 48 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 55 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4425,49 +4641,48 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=4 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 f32.load local.get $1 f32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=4 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (; 49 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 56 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + i32.reinterpret_f32 + call $~lib/util/hash/hash32 call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 50 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4478,13 +4693,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -4492,13 +4706,10 @@ local.tee $6 i32.const 3 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -4506,9 +4717,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -4529,19 +4738,19 @@ local.get $2 f32.load i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=4 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 8 i32.add @@ -4555,13 +4764,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -4571,14 +4786,15 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 51 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 58 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + i32.reinterpret_f32 + call $~lib/util/hash/hash32 local.tee $3 call $~lib/set/Set#find i32.eqz @@ -4622,12 +4838,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 3 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -4649,21 +4863,21 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=4 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 52 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#delete (; 59 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 call $~lib/set/Set#find local.tee $2 i32.eqz @@ -4698,7 +4912,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4710,7 +4923,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -4718,10 +4931,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 53 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 60 ;) (type $FUNCSIG$v) (local $0 f32) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -4733,10 +4946,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4753,10 +4966,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4768,10 +4981,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 50 @@ -4787,10 +5000,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4807,10 +5020,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -4822,10 +5035,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -4841,10 +5054,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4855,10 +5068,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4876,10 +5089,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f32.const 0 @@ -4894,10 +5107,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4909,10 +5122,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4923,10 +5136,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -4944,10 +5157,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -4956,19 +5169,42 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/hash/HASH (; 54 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/set/Set#constructor (; 61 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + local.get $0 + call $~lib/set/Set#clear local.get $0 - i64.reinterpret_f64 - call $~lib/internal/hash/hash64 ) - (func $~lib/set/Set#find (; 55 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 62 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -4978,49 +5214,48 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 f64.load local.get $1 f64.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/set/Set#has (; 56 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 63 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5031,13 +5266,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -5045,13 +5279,10 @@ local.tee $6 i32.const 4 i32.shl - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -5059,9 +5290,7 @@ i32.shl i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -5082,19 +5311,19 @@ local.get $2 f64.load i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 16 i32.add @@ -5108,13 +5337,19 @@ end end local.get $0 - local.get $4 + i32.load + drop + local.get $0 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + i32.load offset=8 + drop + local.get $0 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -5124,14 +5359,15 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 58 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 65 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/HASH + i64.reinterpret_f64 + call $~lib/util/hash/hash64 local.tee $3 call $~lib/set/Set#find i32.eqz @@ -5175,12 +5411,10 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 4 i32.shl + local.get $2 i32.add local.tee $2 local.get $1 @@ -5202,21 +5436,21 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/set/Set#delete (; 59 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#delete (; 66 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) local.get $0 local.get $1 local.get $1 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 + call $~lib/util/hash/hash64 call $~lib/set/Set#find local.tee $2 i32.eqz @@ -5251,7 +5485,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -5263,7 +5496,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -5271,10 +5504,10 @@ call $~lib/set/Set#rehash end ) - (func $std/set/test (; 60 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 f64) (local $1 i32) - call $~lib/set/Set#constructor + call $~lib/set/Set#constructor local.set $1 loop $repeat|0 local.get $0 @@ -5286,10 +5519,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5306,10 +5539,10 @@ br $repeat|0 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -5321,10 +5554,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 50 @@ -5340,10 +5573,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5360,10 +5593,10 @@ br $repeat|1 else i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end unreachable @@ -5375,10 +5608,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -5394,10 +5627,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5408,10 +5641,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5429,10 +5662,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 @@ -5447,10 +5680,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5462,10 +5695,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5476,10 +5709,10 @@ call $~lib/set/Set#has if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -5497,10 +5730,10 @@ i32.ne if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -5509,30 +5742,201 @@ i32.load offset=20 if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 160 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 160 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 73 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + if (result i32) + local.get $2 + i32.const 160 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 160 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end + local.get $2 ) - (func $start (; 61 ;) (type $FUNCSIG$v) - i32.const 144 + (func $~lib/runtime/runtime.retain (; 74 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 75 ;) (type $FUNCSIG$v) + nop + ) + (func $start (; 76 ;) (type $FUNCSIG$v) + i32.const 392 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - ) - (func $null (; 62 ;) (type $FUNCSIG$v) - nop + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 28 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT ) ) diff --git a/tests/compiler/std/set.ts b/tests/compiler/std/set.ts index 353ff8051c..d31b40cdc5 100644 --- a/tests/compiler/std/set.ts +++ b/tests/compiler/std/set.ts @@ -1,6 +1,6 @@ -import "allocator/arena"; +import "collector/dummy"; -function test(): void { +function testNumeric(): void { var set = new Set(); // insert new @@ -42,13 +42,13 @@ function test(): void { assert(set.size == 0); } -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); -test(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); +testNumeric(); diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 29f1bc64dd..02b1cb552b 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,50 +1,63 @@ (module (type $FUNCSIG$v (func)) (type $FUNCSIG$ii (func (param i32) (result 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$viiii (func (param i32 i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iij (func (param i32 i64) (result i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$iiji (func (param i32 i64 i32) (result i32))) (type $FUNCSIG$vij (func (param i32 i64))) (type $FUNCSIG$iif (func (param i32 f32) (result i32))) - (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$iifi (func (param i32 f32 i32) (result i32))) (type $FUNCSIG$vif (func (param i32 f32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) - (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iidi (func (param i32 f64 i32) (result i32))) (type $FUNCSIG$vid (func (param i32 f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\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") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (data (i32.const 160) "\1c\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\1a\00\00\00\00\00\00\00\1a\00\00\00\00\00\00\00*\00\00\00\00\00\00\00*\00\00\00\00\00\00\00J\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00J\00\00\00\00\00\00\00\8a\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $~lib/util/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/memory/HEAP_BASE i32 (i32.const 144)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 160)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 392)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $start:~lib/allocator/arena (; 1 ;) (type $FUNCSIG$v) - global.get $~lib/memory/HEAP_BASE - i32.const 7 + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -125,349 +138,387 @@ ) (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/internal/arraybuffer/computeSize (; 4 ;) (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/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 56 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 6 ;) (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 + i32.store offset=4 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub + i32.const 0 + i32.store offset=8 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 3 - i32.sub + i32.const 0 + i32.store offset=12 local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 + global.get $~lib/util/runtime/HEADER_SIZE i32.add - local.get $1 - i32.store8 + ) + (func $~lib/collector/dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - return + i32.const 0 + i32.const 24 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 24 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + local.get $1 i32.store - i32.const 24 local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 + call $~lib/collector/dummy/__ref_register 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 + ) + (func $~lib/memory/memory.fill (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 - br $continue|0 end end end ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (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) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $1 - i32.const 1073741816 + global.get $~lib/util/runtime/MAX_BYTELENGTH i32.gt_u if i32.const 0 - i32.const 8 - i32.const 47 - i32.const 40 - call $~lib/env/abort + i32.const 80 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort unreachable end local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 + call $~lib/util/runtime/allocate + local.set $2 local.get $2 i32.const 0 - i32.ne - i32.eqz - if - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $1 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $3 + local.get $1 + call $~lib/memory/memory.fill + local.get $2 + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop ) - (func $~lib/set/Set#clear (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/set/Set#clear (; 11 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -475,10 +526,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -490,13 +560,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -522,25 +594,15 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash8 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash8 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const -2128831035 local.get $0 i32.xor i32.const 16777619 i32.mul ) - (func $~lib/internal/hash/HASH (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/internal/hash/hash8 - return - ) - (func $~lib/set/Set#find (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -550,7 +612,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -562,7 +624,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load8_s @@ -573,7 +634,7 @@ i32.shr_s i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -593,16 +654,26 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -622,7 +693,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -637,13 +707,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -655,8 +722,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -679,13 +744,13 @@ local.get $9 i32.load8_s i32.store8 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load8_s local.set $11 local.get $11 - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -698,11 +763,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -721,14 +786,54 @@ end end end - local.get $0 - local.get $3 + local.get $0 + local.tee $9 + local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -738,20 +843,29 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -785,10 +899,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -804,8 +916,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store8 local.get $0 @@ -816,7 +928,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -824,27 +936,27 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 - local.get $3 - i32.store offset=8 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 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.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 @@ -852,8 +964,8 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -893,7 +1005,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -905,7 +1016,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -914,7 +1025,7 @@ end i32.const 1 ) - (func $std/set/test (; 18 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 20 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -937,10 +1048,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -952,10 +1063,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -975,10 +1086,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -997,10 +1108,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1012,10 +1123,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1035,10 +1146,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -1057,10 +1168,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1074,10 +1185,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1097,10 +1208,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -1120,10 +1231,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1135,10 +1246,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1152,10 +1263,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1175,10 +1286,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1190,19 +1301,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -1210,10 +1343,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -1225,13 +1377,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1257,16 +1411,8 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 255 - i32.and - call $~lib/internal/hash/hash8 - return - ) - (func $~lib/set/Set#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -1276,7 +1422,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -1288,7 +1434,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load8_u @@ -1297,7 +1442,7 @@ i32.and i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1317,16 +1462,24 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 255 + i32.and + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1346,7 +1499,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -1361,13 +1513,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -1379,8 +1528,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -1403,13 +1550,13 @@ local.get $9 i32.load8_u i32.store8 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load8_u local.set $11 local.get $11 - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -1422,11 +1569,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -1446,13 +1593,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -1462,20 +1649,27 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 25 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 255 + i32.and + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -1509,10 +1703,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -1528,8 +1720,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store8 local.get $0 @@ -1540,7 +1732,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -1548,34 +1740,34 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 - local.get $3 - i32.store offset=8 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.const 255 i32.and - call $~lib/internal/hash/hash8 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash8 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -1615,7 +1807,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -1627,7 +1818,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -1636,7 +1827,7 @@ end i32.const 1 ) - (func $std/set/test (; 28 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 29 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -1659,10 +1850,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1674,10 +1865,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1697,10 +1888,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -1719,10 +1910,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1734,10 +1925,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1757,10 +1948,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -1779,10 +1970,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1796,10 +1987,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1819,10 +2010,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -1842,10 +2033,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1857,10 +2048,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1874,10 +2065,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -1897,10 +2088,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -1912,19 +2103,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 30 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -1932,10 +2145,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -1947,13 +2179,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1979,7 +2213,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash16 (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash16 (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -2001,18 +2235,8 @@ local.set $1 local.get $1 ) - (func $~lib/internal/hash/HASH (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/internal/hash/hash16 - return - ) (func $~lib/set/Set#find (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -2022,7 +2246,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -2034,7 +2258,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load16_s @@ -2045,7 +2268,7 @@ i32.shr_s i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -2066,10 +2289,20 @@ i32.const 0 ) (func $~lib/set/Set#has (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne @@ -2094,7 +2327,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -2109,13 +2341,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -2127,8 +2356,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -2151,13 +2378,13 @@ local.get $9 i32.load16_s i32.store16 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load16_s local.set $11 local.get $11 - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -2170,11 +2397,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -2194,13 +2421,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -2215,15 +2482,24 @@ (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -2257,10 +2533,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -2276,8 +2550,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store16 local.get $0 @@ -2288,7 +2562,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -2296,13 +2570,13 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 - local.get $3 - i32.store offset=8 + local.get $4 + i32.store end ) (func $~lib/set/Set#get:size (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -2316,7 +2590,7 @@ (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 @@ -2324,8 +2598,8 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -2365,7 +2639,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -2377,7 +2650,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -2386,7 +2659,7 @@ end i32.const 1 ) - (func $std/set/test (; 39 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 39 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -2409,10 +2682,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2424,10 +2697,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2447,10 +2720,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -2469,10 +2742,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2484,10 +2757,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2507,10 +2780,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -2529,10 +2802,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2546,10 +2819,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2569,10 +2842,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -2592,10 +2865,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2607,10 +2880,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2624,10 +2897,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -2647,10 +2920,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -2662,19 +2935,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) (func $~lib/set/Set#clear (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -2682,10 +2977,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -2703,7 +3017,9 @@ i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -2729,16 +3045,8 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - i32.const 65535 - i32.and - call $~lib/internal/hash/hash16 - return - ) - (func $~lib/set/Set#find (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 42 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -2748,7 +3056,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -2760,7 +3068,6 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load16_u @@ -2769,7 +3076,7 @@ i32.and i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -2789,16 +3096,24 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2818,7 +3133,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -2833,13 +3147,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -2851,8 +3162,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -2875,13 +3184,13 @@ local.get $9 i32.load16_u i32.store16 - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load16_u local.set $11 local.get $11 - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -2894,11 +3203,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -2918,13 +3227,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -2934,20 +3283,27 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 46 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.const 65535 + i32.and + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -2981,10 +3337,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -3000,8 +3354,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store16 local.get $0 @@ -3012,7 +3366,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -3020,34 +3374,34 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 - local.get $3 - i32.store offset=8 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 47 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 46 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.const 65535 i32.and - call $~lib/internal/hash/hash16 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash16 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -3087,7 +3441,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -3099,7 +3452,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -3108,7 +3461,7 @@ end i32.const 1 ) - (func $std/set/test (; 49 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 48 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3131,10 +3484,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3146,10 +3499,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3169,10 +3522,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -3191,10 +3544,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3206,10 +3559,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3229,10 +3582,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -3251,10 +3604,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3268,10 +3621,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3291,10 +3644,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -3314,10 +3667,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3329,10 +3682,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3346,10 +3699,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3369,10 +3722,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3384,19 +3737,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 50 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 49 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -3404,10 +3779,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -3419,13 +3813,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -3451,7 +3847,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -3493,14 +3889,8 @@ local.set $1 local.get $1 ) - (func $~lib/internal/hash/HASH (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/internal/hash/hash32 - return - ) - (func $~lib/set/Set#find (; 54 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 52 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -3510,7 +3900,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -3522,14 +3912,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -3549,16 +3938,22 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 56 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 54 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3578,7 +3973,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -3593,13 +3987,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -3611,8 +4002,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -3635,13 +4024,13 @@ local.get $9 i32.load i32.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -3654,11 +4043,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -3678,13 +4067,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -3694,20 +4123,25 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 57 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 55 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -3741,10 +4175,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -3760,8 +4192,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store local.get $0 @@ -3772,7 +4204,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -3780,32 +4212,32 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 - local.get $3 - i32.store offset=8 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 58 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -3845,7 +4277,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -3857,7 +4288,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -3866,7 +4297,7 @@ end i32.const 1 ) - (func $std/set/test (; 60 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 58 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -3889,10 +4320,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3904,10 +4335,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3927,10 +4358,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -3949,10 +4380,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -3964,10 +4395,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3987,10 +4418,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -4009,10 +4440,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4026,10 +4457,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4049,10 +4480,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -4072,10 +4503,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4087,10 +4518,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4104,10 +4535,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4127,10 +4558,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4142,19 +4573,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 61 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 59 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -4162,10 +4615,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -4177,13 +4649,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 62 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 60 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -4209,14 +4683,8 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/internal/hash/hash32 - return - ) - (func $~lib/set/Set#find (; 64 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -4226,7 +4694,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -4238,14 +4706,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -4265,16 +4732,22 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 62 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 66 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 63 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4294,7 +4767,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -4309,13 +4781,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -4327,8 +4796,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -4351,13 +4818,13 @@ local.get $9 i32.load i32.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -4370,11 +4837,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=4 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -4394,13 +4861,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $12 + local.get $9 + i32.load + local.tee $11 + i32.ne + if (result i32) + local.get $11 + if + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $11 + local.get $9 + i32.load offset=8 + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store offset=8 local.get $0 local.get $4 @@ -4410,20 +4917,25 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 67 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 64 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -4457,10 +4969,8 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $2 + local.get $2 block (result i32) local.get $0 local.get $0 @@ -4476,8 +4986,8 @@ end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i32.store local.get $0 @@ -4488,7 +4998,7 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and @@ -4496,32 +5006,32 @@ i32.mul i32.add local.set $5 - local.get $3 + local.get $4 local.get $5 - i32.load offset=8 + i32.load i32.store offset=4 local.get $5 - local.get $3 - i32.store offset=8 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 65 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 69 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -4561,7 +5071,6 @@ i32.gt_u select i32.ge_u - local.tee $2 if (result i32) local.get $0 i32.load offset=20 @@ -4573,7 +5082,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $2 + i32.const 0 end if local.get $0 @@ -4582,7 +5091,7 @@ end i32.const 1 ) - (func $std/set/test (; 70 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 67 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4605,10 +5114,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4620,10 +5129,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4643,10 +5152,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -4665,10 +5174,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4680,10 +5189,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4703,10 +5212,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -4725,10 +5234,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4742,10 +5251,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4765,10 +5274,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -4788,10 +5297,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4803,10 +5312,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4820,10 +5329,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -4843,10 +5352,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -4858,19 +5367,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 71 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 68 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -4878,10 +5409,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -4893,13 +5443,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -4925,7 +5477,7 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/hash64 (; 73 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/hash/hash64 (; 70 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5013,14 +5565,8 @@ local.set $3 local.get $3 ) - (func $~lib/internal/hash/HASH (; 74 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) - local.get $0 - call $~lib/internal/hash/hash64 - return - ) - (func $~lib/set/Set#find (; 75 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 71 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -5030,7 +5576,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -5042,14 +5588,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i64.load local.get $1 i64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -5069,16 +5614,22 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 76 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 72 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 77 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 73 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5099,7 +5650,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -5114,13 +5664,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -5132,8 +5679,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -5156,13 +5701,13 @@ local.get $9 i64.load i64.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i64.load local.set $11 local.get $11 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -5175,11 +5720,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=8 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -5199,13 +5744,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -5215,20 +5800,26 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 78 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) - (local $2 i32) + (func $~lib/set/Set#add (; 74 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + (local $6 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -5262,27 +5853,25 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $5 + local.get $5 block (result i32) local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $6 end block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) i32.const 16 end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i64.store local.get $0 @@ -5293,28 +5882,28 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 - local.get $3 - local.get $5 - i32.load offset=8 - i32.store offset=8 - local.get $5 - local.get $3 + local.set $6 + local.get $4 + local.get $6 + i32.load i32.store offset=8 + local.get $6 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 80 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 76 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -5322,12 +5911,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -5367,7 +5956,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -5379,7 +5967,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -5388,7 +5976,7 @@ end i32.const 1 ) - (func $std/set/test (; 81 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 77 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5411,10 +5999,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5426,10 +6014,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5449,10 +6037,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -5471,10 +6059,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5486,10 +6074,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5509,10 +6097,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -5531,10 +6119,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5548,10 +6136,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5571,10 +6159,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -5594,10 +6182,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5609,10 +6197,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5626,10 +6214,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -5649,10 +6237,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5664,19 +6252,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 82 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 78 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -5684,10 +6294,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -5699,13 +6328,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -5731,14 +6362,8 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 84 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) - local.get $0 - call $~lib/internal/hash/hash64 - return - ) - (func $~lib/set/Set#find (; 85 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 80 ;) (type $FUNCSIG$iiji) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -5748,7 +6373,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -5760,14 +6385,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i64.load local.get $1 i64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -5787,16 +6411,22 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 86 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 81 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (local $2 i64) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 82 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5817,7 +6447,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -5832,13 +6461,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -5850,8 +6476,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -5874,13 +6498,13 @@ local.get $9 i64.load i64.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 i64.load local.set $11 local.get $11 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -5893,11 +6517,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=8 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -5917,13 +6541,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -5933,20 +6597,26 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 88 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) - (local $2 i32) + (func $~lib/set/Set#add (; 83 ;) (type $FUNCSIG$vij) (param $0 i32) (param $1 i64) + (local $2 i64) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + (local $6 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -5980,27 +6650,25 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $5 + local.get $5 block (result i32) local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $6 end block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) i32.const 16 end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 i64.store local.get $0 @@ -6011,28 +6679,28 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 - local.get $3 - local.get $5 - i32.load offset=8 - i32.store offset=8 - local.get $5 - local.get $3 + local.set $6 + local.get $4 + local.get $6 + i32.load i32.store offset=8 + local.get $6 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 89 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 84 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 90 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 85 ;) (type $FUNCSIG$iij) (param $0 i32) (param $1 i64) (result i32) (local $2 i64) (local $3 i32) (local $4 i32) @@ -6040,12 +6708,12 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -6085,7 +6753,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -6097,7 +6764,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -6106,7 +6773,7 @@ end i32.const 1 ) - (func $std/set/test (; 91 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 86 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6129,10 +6796,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6144,10 +6811,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6167,10 +6834,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -6189,10 +6856,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6204,10 +6871,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6227,10 +6894,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -6249,10 +6916,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6266,10 +6933,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6289,10 +6956,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -6312,10 +6979,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6327,10 +6994,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6344,10 +7011,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6367,10 +7034,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6382,19 +7049,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 92 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 87 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -6402,10 +7091,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 32 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -6417,13 +7125,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 88 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -6449,15 +7159,8 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 94 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) - local.get $0 - i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - return - ) - (func $~lib/set/Set#find (; 95 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 89 ;) (type $FUNCSIG$iifi) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -6467,7 +7170,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -6479,14 +7182,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 f32.load local.get $1 f32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -6506,16 +7208,23 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 96 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 90 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (local $2 f32) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 97 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6536,7 +7245,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -6551,13 +7259,10 @@ i32.const 8 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -6569,8 +7274,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -6593,14 +7296,14 @@ local.get $9 f32.load f32.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 f32.load local.set $11 local.get $11 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -6613,11 +7316,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=4 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 8 @@ -6637,13 +7340,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -6653,20 +7396,27 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 98 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) - (local $2 i32) + (func $~lib/set/Set#add (; 92 ;) (type $FUNCSIG$vif) (param $0 i32) (param $1 f32) + (local $2 f32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + (local $6 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i32.reinterpret_f32 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -6700,27 +7450,25 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $5 + local.get $5 block (result i32) local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $6 end block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) i32.const 8 end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 f32.store local.get $0 @@ -6731,28 +7479,28 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 - local.get $3 - local.get $5 - i32.load offset=8 + local.set $6 + local.get $4 + local.get $6 + i32.load i32.store offset=4 - local.get $5 - local.get $3 - i32.store offset=8 + local.get $6 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 93 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 100 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 94 ;) (type $FUNCSIG$iif) (param $0 i32) (param $1 f32) (result i32) (local $2 f32) (local $3 i32) (local $4 i32) @@ -6760,13 +7508,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i32.reinterpret_f32 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -6806,7 +7554,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -6818,7 +7565,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -6827,7 +7574,7 @@ end i32.const 1 ) - (func $std/set/test (; 101 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 95 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6850,10 +7597,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6865,10 +7612,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6888,10 +7635,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -6910,10 +7657,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6925,10 +7672,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -6948,10 +7695,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -6970,10 +7717,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6987,10 +7734,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7010,10 +7757,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -7033,10 +7780,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7048,10 +7795,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7065,10 +7812,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7088,10 +7835,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7103,19 +7850,41 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/set/Set#clear (; 102 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/set/Set#clear (; 96 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) local.get $0 + local.tee $1 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $2 + local.get $1 + i32.load + local.tee $3 + i32.ne + if (result i32) + local.get $3 + if + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $2 + else + local.get $2 + end i32.store local.get $0 i32.const 4 @@ -7123,10 +7892,29 @@ i32.sub i32.store offset=4 local.get $0 + local.tee $1 i32.const 0 i32.const 64 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor + local.tee $3 + local.get $1 + i32.load offset=8 + local.tee $2 + i32.ne + if (result i32) + local.get $2 + if + local.get $2 + local.get $1 + call $~lib/collector/dummy/__ref_unlink + end + local.get $3 + local.get $1 + call $~lib/collector/dummy/__ref_link + local.get $3 + else + local.get $3 + end i32.store offset=8 local.get $0 i32.const 4 @@ -7138,13 +7926,15 @@ i32.const 0 i32.store offset=20 ) - (func $~lib/set/Set#constructor (; 103 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 97 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block (result i32) local.get $0 i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -7170,15 +7960,8 @@ call $~lib/set/Set#clear local.get $0 ) - (func $~lib/internal/hash/HASH (; 104 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) - local.get $0 - i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - return - ) - (func $~lib/set/Set#find (; 105 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 98 ;) (type $FUNCSIG$iidi) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -7188,7 +7971,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -7200,14 +7983,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 f64.load local.get $1 f64.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -7227,16 +8009,23 @@ end i32.const 0 ) - (func $~lib/set/Set#has (; 106 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 99 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (local $2 f64) local.get $0 local.get $1 - local.get $1 - call $~lib/internal/hash/HASH + block $~lib/util/hash/HASH|inlined.0 (result i32) + local.get $1 + local.set $2 + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.0 + end call $~lib/set/Set#find i32.const 0 i32.ne ) - (func $~lib/set/Set#rehash (; 107 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 100 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7257,7 +8046,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -7272,13 +8060,10 @@ i32.const 16 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -7290,8 +8075,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -7314,14 +8097,14 @@ local.get $9 f64.load f64.store - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $9 f64.load local.set $11 local.get $11 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.2 end local.get $1 i32.and @@ -7334,11 +8117,11 @@ local.set $13 local.get $10 local.get $13 - i32.load offset=8 + i32.load i32.store offset=8 local.get $13 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/set/ENTRY_SIZE|inlined.3 (result i32) i32.const 16 @@ -7358,13 +8141,53 @@ end end local.get $0 + local.tee $9 local.get $3 + local.tee $13 + local.get $9 + i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $13 + else + local.get $13 + end i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 + local.tee $9 local.get $5 + local.tee $12 + local.get $9 + i32.load offset=8 + local.tee $13 + i32.ne + if (result i32) + local.get $13 + if + local.get $13 + local.get $9 + call $~lib/collector/dummy/__ref_unlink + end + local.get $12 + local.get $9 + call $~lib/collector/dummy/__ref_link + local.get $12 + else + local.get $12 + end i32.store offset=8 local.get $0 local.get $4 @@ -7374,20 +8197,27 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/set/Set#add (; 108 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) - (local $2 i32) + (func $~lib/set/Set#add (; 101 ;) (type $FUNCSIG$vid) (param $0 i32) (param $1 f64) + (local $2 f64) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $1 - call $~lib/internal/hash/HASH - local.set $2 + (local $6 i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) + local.get $1 + local.set $2 + local.get $2 + i64.reinterpret_f64 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.1 + end + local.set $3 local.get $0 local.get $1 - local.get $2 - call $~lib/set/Set#find - local.set $3 local.get $3 + call $~lib/set/Set#find + local.set $4 + local.get $4 i32.eqz if local.get $0 @@ -7421,27 +8251,25 @@ end local.get $0 i32.load offset=8 - local.set $4 - local.get $4 - i32.const 8 - i32.add + local.set $5 + local.get $5 block (result i32) local.get $0 local.get $0 i32.load offset=16 - local.tee $5 + local.tee $6 i32.const 1 i32.add i32.store offset=16 - local.get $5 + local.get $6 end block $~lib/set/ENTRY_SIZE|inlined.5 (result i32) i32.const 16 end i32.mul i32.add - local.set $3 - local.get $3 + local.set $4 + local.get $4 local.get $1 f64.store local.get $0 @@ -7452,28 +8280,28 @@ i32.store offset=20 local.get $0 i32.load - local.get $2 + local.get $3 local.get $0 i32.load offset=4 i32.and i32.const 4 i32.mul i32.add - local.set $5 - local.get $3 - local.get $5 - i32.load offset=8 - i32.store offset=8 - local.get $5 - local.get $3 + local.set $6 + local.get $4 + local.get $6 + i32.load i32.store offset=8 + local.get $6 + local.get $4 + i32.store end ) - (func $~lib/set/Set#get:size (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.load offset=20 ) - (func $~lib/set/Set#delete (; 110 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 103 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 f64) (local $3 i32) (local $4 i32) @@ -7481,13 +8309,13 @@ (local $6 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 i64.reinterpret_f64 - call $~lib/internal/hash/hash64 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash64 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/set/Set#find local.set $3 @@ -7527,7 +8355,6 @@ i32.gt_u select i32.ge_u - local.tee $5 if (result i32) local.get $0 i32.load offset=20 @@ -7539,7 +8366,7 @@ i32.trunc_f64_s i32.lt_s else - local.get $5 + i32.const 0 end if local.get $0 @@ -7548,7 +8375,7 @@ end i32.const 1 ) - (func $std/set/test (; 111 ;) (type $FUNCSIG$v) + (func $std/set/testNumeric (; 104 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -7571,10 +8398,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 8 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7586,10 +8413,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 10 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7609,10 +8436,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 12 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|1 @@ -7631,10 +8458,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 16 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7646,10 +8473,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 18 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7669,10 +8496,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 20 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|2 @@ -7691,10 +8518,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 24 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7708,10 +8535,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 26 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7731,10 +8558,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 28 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $break|3 @@ -7754,10 +8581,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 32 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7769,10 +8596,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 34 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7786,10 +8613,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 36 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -7809,10 +8636,10 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 38 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7824,29 +8651,266 @@ i32.eqz if i32.const 0 - i32.const 120 + i32.const 136 i32.const 42 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $start:std/set (; 105 ;) (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 + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + call $std/set/testNumeric + ) + (func $~lib/runtime/runtime.instanceof (; 106 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 107 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 109 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 110 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 111 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 112 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 113 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 28 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 114 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 115 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 116 ;) (type $FUNCSIG$v) + nop ) - (func $start:std/set (; 112 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test - call $std/set/test + (func $~lib/runtime/runtime.collect (; 117 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect ) - (func $start (; 113 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime#constructor (; 118 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 119 ;) (type $FUNCSIG$v) call $start:std/set + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 114 ;) (type $FUNCSIG$v) + (func $null (; 120 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/simd.json b/tests/compiler/std/simd.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/simd.optimized.wat b/tests/compiler/std/simd.optimized.wat index 587c7142d7..bb456a1172 100644 --- a/tests/compiler/std/simd.optimized.wat +++ b/tests/compiler/std/simd.optimized.wat @@ -1,10 +1,7 @@ (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/std/simd.untouched.wat b/tests/compiler/std/simd.untouched.wat index 2f0347c4aa..9f14327565 100644 --- a/tests/compiler/std/simd.untouched.wat +++ b/tests/compiler/std/simd.untouched.wat @@ -4,9 +4,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/ASC_FEATURE_SIMD i32 (i32.const 0)) - (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/std/static-array.json b/tests/compiler/std/static-array.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 5c605936bb..8c54411ad7 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -1,33 +1,78 @@ (module - (type $FUNCSIG$v (func)) + (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))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$ji (func (param i32) (result i64))) + (type $FUNCSIG$fi (func (param i32) (result f32))) + (type $FUNCSIG$di (func (param i32) (result f64))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 24) "\08\00\00\00\02") - (data (i32.const 32) "\10\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04") - (data (i32.const 64) " \00\00\00\02") - (data (i32.const 72) "\08") - (data (i32.const 82) "\c0?\00\00 @") - (data (i32.const 88) "H\00\00\00\02") - (data (i32.const 96) "\10") - (data (i32.const 110) "\f4?\00\00\00\00\00\00\02@") - (data (i32.const 128) "`\00\00\00\02") - (data (i32.const 136) "\13\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 184) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 216) "\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 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\0f\00\00\00\08") + (data (i32.const 24) "\01\00\00\00\02") + (data (i32.const 32) "\11\00\00\00\10") + (data (i32.const 48) "\18\00\00\00\18\00\00\00\08\00\00\00\02") + (data (i32.const 64) "\0f\00\00\00\10") + (data (i32.const 80) "\03\00\00\00\00\00\00\00\04") + (data (i32.const 96) "\12\00\00\00\10") + (data (i32.const 112) "P\00\00\00P\00\00\00\10\00\00\00\02") + (data (i32.const 128) "\0f\00\00\00\08") + (data (i32.const 146) "\c0?\00\00 @") + (data (i32.const 152) "\13\00\00\00\10") + (data (i32.const 168) "\90\00\00\00\90\00\00\00\08\00\00\00\02") + (data (i32.const 184) "\0f\00\00\00\10") + (data (i32.const 206) "\f4?\00\00\00\00\00\00\02@") + (data (i32.const 216) "\14\00\00\00\10") + (data (i32.const 232) "\c8\00\00\00\c8\00\00\00\10\00\00\00\02") + (data (i32.const 248) "\10\00\00\00&") + (data (i32.const 264) "s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 304) "\10\00\00\00\1a") + (data (i32.const 320) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 352) "\10\00\00\00(") + (data (i32.const 368) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 408) "\10\00\00\00\1e") + (data (i32.const 424) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 456) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e") (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/allocator/arena/__mem_free)) + (export "$.release" (func $~lib/allocator/arena/__mem_free)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/array/Array#__get (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 56 + i32.load + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 320 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + i32.const 52 + i32.load + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -89,240 +134,89 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (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 216 - 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 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - loop $continue|0 + block $~lib/util/memory/memmove|inlined.0 + local.get $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 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u 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 + i32.const 7 + i32.and 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 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 local.get $0 - i32.const 3 + i32.const 7 i32.and - local.tee $3 - i32.const 1 - i32.ne if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 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 + 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 - 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 @@ -332,1595 +226,1032 @@ i32.load8_u i32.store8 local.get $2 - i32.const 3 + i32.const 1 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 + br $continue|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 + 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.const 18 - i32.ge_u + i32.add + i32.const 7 + i32.and if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 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 + local.get $2 i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 + 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.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 + i32.sub + local.tee $2 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 + i32.add + i64.load + i64.store 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 $2 + i32.const 1 + i32.sub + local.tee $2 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 + i32.add + i32.load8_u + i32.store8 br $continue|5 end end end end - local.get $2 - i32.const 16 - i32.and - if - local.get $0 + ) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.0 local.get $1 - i32.load8_u - i32.store8 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 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.const 0 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.sub + i32.const 0 i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 i32.const 1 i32.add - local.tee $1 - i32.load8_u + i32.const 0 i32.store8 local.get $0 - i32.const 1 - i32.add - local.tee $0 - local.get $1 - i32.const 1 + i32.const 2 i32.add - local.tee $1 - i32.load8_u + i32.const 0 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 + 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 $0 - i32.const 1 - i32.add - local.tee $0 local.get $1 - i32.const 1 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 3 i32.add - local.tee $1 - i32.load8_u + i32.const 0 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.const 4 + i32.sub + i32.const 0 i32.store8 - local.get $0 - i32.const 1 - i32.add - local.tee $0 local.get $1 - i32.const 1 - i32.add + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and local.tee $1 - i32.load8_u - i32.store8 + i32.sub + local.set $2 local.get $0 - i32.const 1 - i32.add - local.tee $0 local.get $1 - i32.const 1 i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + i32.const -4 + i32.and local.tee $1 - i32.load8_u - i32.store8 local.get $0 - i32.const 1 i32.add - local.tee $0 + i32.const 4 + i32.sub + i32.const 0 + i32.store local.get $1 - i32.const 1 - i32.add - local.tee $1 - i32.load8_u - i32.store8 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 local.get $0 - i32.const 1 + i32.const 4 i32.add - local.tee $0 - local.get $1 - i32.const 1 + i32.const 0 + i32.store + local.get $0 + i32.const 8 i32.add - local.tee $1 - i32.load8_u - i32.store8 + i32.const 0 + i32.store local.get $0 - i32.const 1 + local.get $1 i32.add - local.tee $0 + 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 1 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 i32.add - local.tee $1 - i32.load8_u - i32.store8 + i32.const 0 + i32.store local.get $0 - i32.const 1 + i32.const 16 i32.add - local.tee $0 - local.get $1 - i32.const 1 + i32.const 0 + i32.store + local.get $0 + i32.const 20 i32.add - local.tee $1 - i32.load8_u - i32.store8 + i32.const 0 + i32.store local.get $0 - i32.const 1 + i32.const 24 i32.add - local.tee $3 - i32.const 1 + i32.const 0 + i32.store + local.get $0 + local.get $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.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 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.const 4 + i32.and + i32.const 24 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.tee $2 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 (; 4 ;) (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 + i32.sub + local.set $1 + loop $continue|0 + local.get $1 + i32.const 32 + i32.ge_u if local.get $0 - local.tee $3 - i32.const 1 - i32.add - local.set $0 - local.get $1 - local.tee $4 - i32.const 1 + i64.const 0 + i64.store + local.get $0 + i32.const 8 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 + i64.const 0 + i64.store local.get $0 - local.get $2 + i32.const 16 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 + i64.const 0 + i64.store local.get $0 + i32.const 24 i32.add + i64.const 0 + i64.store local.get $1 - local.get $2 + i32.const 32 + i32.sub + local.set $1 + local.get $0 + i32.const 32 i32.add - i32.load8_u - i32.store8 - br $continue|5 + local.set $0 + br $continue|0 end end end ) - (func $~lib/internal/memory/memset (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/allocator/arena/__mem_free (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/reallocate (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result 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 $3 i32) + (local $4 i32) + (local $5 i32) 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 $3 + i32.load offset=4 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 + i32.lt_u + if + i32.const 1 + i32.const 32 local.get $1 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $4 + local.set $5 + i32.const 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 + local.get $2 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 0 + local.get $0 + i32.const 624 + i32.gt_u + select + local.get $4 + i32.lt_u + if + local.get $5 + call $~lib/allocator/arena/__mem_allocate + local.tee $4 + local.get $3 + i32.load + i32.store + local.get $4 i32.const 16 i32.add - i64.const 0 - i64.store + local.tee $5 local.get $0 - i32.const 24 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 i32.add - i64.const 0 - i64.store local.get $1 - i32.const 32 + local.get $2 i32.sub - local.set $1 + call $~lib/memory/memory.fill + local.get $3 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 624 + i32.le_u + if + i32.const 0 + i32.const 368 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + end + local.get $4 + local.set $3 + local.get $5 + local.set $0 + else local.get $0 - i32.const 32 + local.get $2 i32.add - local.set $0 - br $continue|0 + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill end end + local.get $3 + local.get $1 + i32.store offset=4 + local.get $0 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/ensureCapacity (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - local.get $1 + i32.const 1 local.get $0 - i32.load - local.tee $2 - i32.gt_s + i32.load offset=8 + local.get $1 + i32.shr_u + i32.gt_u if + i32.const 1 + i32.const 1073741808 local.get $1 - i32.const 1073741816 - i32.gt_s + i32.shr_u + i32.gt_u if i32.const 0 - i32.const 216 - i32.const 40 - i32.const 4 - call $~lib/env/abort + i32.const 320 + i32.const 14 + i32.const 64 + call $~lib/builtins/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 + i32.load + local.tee $2 + i32.const 1 local.get $1 - local.get $2 - i32.sub - call $~lib/internal/memory/memset - else + i32.shl + local.tee $3 + call $~lib/util/runtime/reallocate + local.set $1 local.get $1 local.get $2 - i32.lt_s + i32.ne if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 216 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $0 local.get $1 i32.store + local.get $0 + local.get $1 + i32.store offset=4 end + local.get $0 + local.get $3 + i32.store offset=8 end - local.get $0 ) - (func $~lib/array/Array#__set (; 7 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 8 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 - i32.const 24 + i32.const 60 i32.load - local.tee $0 + local.set $0 + i32.const 48 + i32.const 2 + call $~lib/array/ensureCapacity + i32.const 52 i32.load i32.const 2 - i32.shr_u - i32.ge_u + i32.store + i32.const 0 + local.get $0 + i32.ge_s if - i32.const 24 - local.get $0 - i32.const 4 - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $0 - i32.store - i32.const 28 + i32.const 60 i32.const 1 i32.store end - local.get $0 - i32.const 2 - i32.store offset=8 ) - (func $~lib/array/Array#__set (; 8 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 0 - i32.const 64 - i32.load - local.tee $0 + (func $~lib/array/Array#__get (; 9 ;) (type $FUNCSIG$ji) (param $0 i32) (result i64) + local.get $0 + i32.const 120 i32.load i32.const 3 i32.shr_u i32.ge_u if - i32.const 64 - local.get $0 - i32.const 8 - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $0 - i32.store - i32.const 68 - i32.const 1 - i32.store + i32.const 0 + i32.const 320 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable end + i32.const 116 + i32.load local.get $0 - i64.const 4 - i64.store offset=8 + i32.const 3 + i32.shl + i32.add + i64.load ) - (func $~lib/array/Array#__set (; 9 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 10 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 - i32.const 88 + i32.const 124 i32.load - local.tee $0 + local.set $0 + i32.const 112 + i32.const 3 + call $~lib/array/ensureCapacity + i32.const 116 + i32.load + i64.const 4 + i64.store + i32.const 0 + local.get $0 + i32.ge_s + if + i32.const 124 + i32.const 1 + i32.store + end + ) + (func $~lib/array/Array#__get (; 11 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + local.get $0 + i32.const 176 i32.load i32.const 2 i32.shr_u i32.ge_u if - i32.const 88 - local.get $0 - i32.const 4 - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $0 - i32.store - i32.const 92 - i32.const 1 - i32.store + i32.const 0 + i32.const 320 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable end + i32.const 172 + i32.load local.get $0 - f32.const 2.5 - f32.store offset=8 + i32.const 2 + i32.shl + i32.add + f32.load ) - (func $~lib/array/Array#__set (; 10 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 12 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 - i32.const 128 + i32.const 180 i32.load - local.tee $0 + local.set $0 + i32.const 168 + i32.const 2 + call $~lib/array/ensureCapacity + i32.const 172 + i32.load + f32.const 2.5 + f32.store + i32.const 0 + local.get $0 + i32.ge_s + if + i32.const 180 + i32.const 1 + i32.store + end + ) + (func $~lib/array/Array#__get (; 13 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + local.get $0 + i32.const 240 i32.load i32.const 3 i32.shr_u i32.ge_u if - i32.const 128 - local.get $0 - i32.const 8 - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $0 - i32.store - i32.const 132 - i32.const 1 - i32.store + i32.const 0 + i32.const 320 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable end + i32.const 236 + i32.load local.get $0 - f64.const 2.25 - f64.store offset=8 + i32.const 3 + i32.shl + i32.add + f64.load ) - (func $start:std/static-array (; 11 ;) (type $FUNCSIG$v) + (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 280 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset - i32.const 28 + i32.const 244 + i32.load + local.set $0 + i32.const 232 + i32.const 3 + call $~lib/array/ensureCapacity + i32.const 236 + i32.load + f64.const 2.25 + f64.store + i32.const 0 + local.get $0 + i32.ge_s + if + i32.const 244 + i32.const 1 + i32.store + end + ) + (func $start:std/static-array (; 15 ;) (type $FUNCSIG$v) + i32.const 60 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 136 - i32.const 8 + i32.const 264 + i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - i32.const 24 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 136 - i32.const 9 + i32.const 264 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 - i32.const 24 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 136 - i32.const 10 + i32.const 264 + i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 624 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset call $~lib/array/Array#__set i32.const 0 - i32.const 24 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 136 - i32.const 12 - i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 68 - i32.load + call $~lib/array/Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 136 - i32.const 14 + i32.const 264 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 - i32.const 64 - i32.load - local.tee $0 + i32.const 124 i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result i64) - local.get $0 - i64.load offset=8 - else + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 264 + i32.const 12 + i32.const 0 + call $~lib/builtins/abort unreachable end + i32.const 0 + call $~lib/array/Array#__get i64.const 3 i64.ne if i32.const 0 - i32.const 136 - i32.const 15 + i32.const 264 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 - i32.const 64 - i32.load - local.tee $0 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result i64) - local.get $0 - i32.const 8 - i32.add - i64.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i64.const 4 i64.ne if i32.const 0 - i32.const 136 - i32.const 16 + i32.const 264 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/array/Array#__set i32.const 0 - i32.const 64 - i32.load - local.tee $0 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result i64) - local.get $0 - i64.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i64.const 4 i64.ne if i32.const 0 - i32.const 136 - i32.const 18 + i32.const 264 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 92 + i32.const 180 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 136 - i32.const 20 + i32.const 264 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - i32.const 88 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $0 - f32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get f32.const 1.5 f32.ne if i32.const 0 - i32.const 136 - i32.const 21 + i32.const 264 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 - i32.const 88 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $0 - i32.const 4 - i32.add - f32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get f32.const 2.5 f32.ne if i32.const 0 - i32.const 136 - i32.const 22 + i32.const 264 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $~lib/array/Array#__set i32.const 0 - i32.const 88 - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result f32) - local.get $0 - f32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get f32.const 2.5 f32.ne if i32.const 0 - i32.const 136 - i32.const 24 + i32.const 264 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 132 + i32.const 244 i32.load i32.const 2 i32.ne if i32.const 0 - i32.const 136 - i32.const 26 + i32.const 264 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - i32.const 128 - i32.load - local.tee $0 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $0 - f64.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get f64.const 1.25 f64.ne if i32.const 0 - i32.const 136 - i32.const 27 + i32.const 264 + i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 - i32.const 128 - i32.load - local.tee $0 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) - local.get $0 - i32.const 8 - i32.add - f64.load offset=8 - else + call $~lib/array/Array#__get + f64.const 2.25 + f64.ne + if + i32.const 0 + i32.const 264 + i32.const 26 + i32.const 0 + call $~lib/builtins/abort unreachable end + call $~lib/array/Array#__set + i32.const 0 + call $~lib/array/Array#__get f64.const 2.25 f64.ne if i32.const 0 - i32.const 136 + i32.const 264 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/array/Array#__set - i32.const 0 - i32.const 128 + ) + (func $~lib/runtime/runtime.instanceof (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub i32.load local.tee $0 - i32.load - i32.const 3 - i32.shr_u - i32.lt_u - if (result f64) + if (result i32) + local.get $0 + i32.const 456 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 456 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) local.get $0 - f64.load offset=8 + i32.const 456 + i32.load + i32.gt_u else + i32.const 1 + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 456 + i32.add + i32.load end - f64.const 2.25 - f64.ne + ) + (func $~lib/util/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 15 + i32.add + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate + local.tee $1 + i32.const -1520547049 + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add + ) + (func $~lib/util/runtime/register (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + i32.const 624 + i32.le_u if i32.const 0 - i32.const 136 - i32.const 30 + i32.const 368 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if i32.const 0 - call $~lib/env/abort + i32.const 368 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + block (result i32) + local.get $0 + call $~lib/util/runtime/allocate + end + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 456 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 456 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 424 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end + local.get $0 + ) + (func $~lib/runtime/runtime.collect (; 24 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 424 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 12 ;) (type $FUNCSIG$v) + (func $start (; 25 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 13 ;) (type $FUNCSIG$v) + (func $null (; 26 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/static-array.ts b/tests/compiler/std/static-array.ts index 535d3d8aee..4fee0db3e0 100644 --- a/tests/compiler/std/static-array.ts +++ b/tests/compiler/std/static-array.ts @@ -1,5 +1,3 @@ -import "allocator/arena"; // needed just because std/Array#[]= calls __grow conditionally - 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 266fc608ab..be3f14d951 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1,9 +1,8 @@ (module - (type $FUNCSIG$v (func)) + (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))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$viij (func (param i32 i32 i64))) @@ -11,81 +10,84 @@ (type $FUNCSIG$viif (func (param i32 i32 f32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$viid (func (param i32 i32 f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 24) "\08\00\00\00\02\00\00\00") - (data (i32.const 32) "\10\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 64) " \00\00\00\02\00\00\00") - (data (i32.const 72) "\08\00\00\00\00\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 88) "H\00\00\00\02\00\00\00") - (data (i32.const 96) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\f4?\00\00\00\00\00\00\02@\00\00\00\00\00\00\00\00") - (data (i32.const 128) "`\00\00\00\02\00\00\00") - (data (i32.const 136) "\13\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 184) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 216) "\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") + (data (i32.const 8) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 32) "\11\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\18\00\00\00\18\00\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 64) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00") + (data (i32.const 96) "\12\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00P\00\00\00P\00\00\00\10\00\00\00\02\00\00\00") + (data (i32.const 128) "\0f\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00\00\00\c0?\00\00 @") + (data (i32.const 152) "\13\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\90\00\00\00\90\00\00\00\08\00\00\00\02\00\00\00") + (data (i32.const 184) "\0f\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\f4?\00\00\00\00\00\00\02@") + (data (i32.const 216) "\14\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\c8\00\00\00\c8\00\00\00\10\00\00\00\02\00\00\00") + (data (i32.const 248) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 304) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 352) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 408) "\10\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 456) "\14\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\89\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/static-array/i i32 (i32.const 48)) + (global $std/static-array/I i32 (i32.const 112)) + (global $std/static-array/f i32 (i32.const 168)) + (global $std/static-array/F i32 (i32.const 232)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/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 $std/static-array/i i32 (i32.const 24)) - (global $std/static-array/I i32 (i32.const 64)) - (global $std/static-array/f i32 (i32.const 88)) - (global $std/static-array/F i32 (i32.const 128)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 276)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 456)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 624)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (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/array/Array#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 ) - (func $~lib/array/Array#__get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__unchecked_get (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array#__get (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 320 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -93,7 +95,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -172,2212 +174,884 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 216 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $1 - local.get $1 + (func $~lib/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.store - local.get $1 + call $~lib/allocator/arena/__mem_allocate + return ) - (func $~lib/internal/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (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 + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 - block (result i32) + block $break|0 + loop $continue|0 local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + br $continue|0 + end end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 + 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 - i32.load8_u - i32.store8 + end + end + block $break|2 + loop $continue|2 local.get $2 - i32.const 1 - i32.sub - local.set $2 + 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|2 + end 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 + 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 - i32.const 8 + local.get $2 i32.add - local.get $1 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + 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.add - i32.load - i32.store + 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 - i32.const 12 - i32.add - local.get $1 - i32.const 12 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 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 + i32.add + i32.load8_u + i32.store8 + br $continue|5 end - br $continue|1 end end end + end + ) + (func $~lib/memory/memory.fill (; 8 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 local.get $2 - i32.const 8 - i32.and + i32.eqz 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 + br $~lib/util/memory/memset|inlined.0 end + local.get $0 + local.get $1 + i32.store8 + local.get $0 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 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 local.get $2 i32.const 2 - i32.and + i32.le_u 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 + br $~lib/util/memory/memset|inlined.0 end - local.get $2 + local.get $0 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.add + local.get $1 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 + local.get $0 + i32.const 2 + i32.add + local.get $1 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 + local.get $0 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 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 + local.get $0 + local.get $2 + i32.add + i32.const 3 + i32.sub + local.get $1 i32.store8 - block (result i32) - local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + local.get $2 + i32.const 6 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 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 (; 7 ;) (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.const 3 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 + i32.store8 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 $2 + i32.add + i32.const 4 + i32.sub local.get $1 - i32.const 7 + i32.store8 + local.get $2 + i32.const 8 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + end + i32.const 0 + local.get $0 + i32.sub + i32.const 3 i32.and + local.set $5 local.get $0 - i32.const 7 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + i32.sub + local.set $2 + local.get $2 + i32.const -4 i32.and - i32.eq + 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 - 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 + br $~lib/util/memory/memset|inlined.0 end - end - ) - (func $~lib/allocator/arena/__memory_free (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) - nop - ) - (func $~lib/internal/memory/memset (; 9 ;) (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 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 - br $continue|0 end end end ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/arena/__mem_free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/memory/memory.free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/util/runtime/reallocate (; 11 ;) (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 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub local.set $2 - local.get $1 local.get $2 - i32.gt_s + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u if local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz - if - i32.const 0 - i32.const 216 - 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 + call $~lib/util/runtime/adjust + local.set $4 + local.get $3 + call $~lib/util/runtime/adjust + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u if - local.get $0 - local.get $1 + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load i32.store - else + local.get $5 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 + local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 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 $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + if local.get $0 - i32.const 8 - i32.add - local.set $5 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.free|inlined.0 - local.get $0 - local.set $6 - local.get $6 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 + call $~lib/memory/memory.free + else + nop end - local.get $3 + local.get $5 + local.set $2 + local.get $6 local.set $0 - end - block $~lib/memory/memory.fill|inlined.0 + else local.get $0 - i32.const 8 - i32.add - local.get $2 + local.get $3 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 + i32.sub + call $~lib/memory/memory.fill 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 216 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $1 - i32.store - end + nop end + local.get $2 + local.get $1 + i32.store offset=4 local.get $0 ) - (func $~lib/array/Array#__set (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/ensureCapacity (; 12 ;) (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 $1 local.get $0 - i32.load - local.set $3 - local.get $3 - i32.load - i32.const 2 + i32.load offset=8 + local.get $2 i32.shr_u - local.set $4 - local.get $1 - local.get $4 - i32.ge_u + i32.gt_u if local.get $1 - i32.const 268435454 - i32.ge_u + global.get $~lib/util/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u + i32.gt_u if i32.const 0 - i32.const 184 - i32.const 107 - i32.const 41 - call $~lib/env/abort + i32.const 320 + i32.const 14 + i32.const 64 + call $~lib/builtins/abort unreachable end - local.get $3 + local.get $0 + i32.load + local.set $3 local.get $1 - i32.const 1 - i32.add - i32.const 2 + local.get $2 i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 + local.set $4 local.get $3 - i32.store + local.get $4 + call $~lib/util/runtime/reallocate + local.set $5 + local.get $5 + local.get $3 + i32.ne + if + local.get $0 + local.get $5 + i32.store + local.get $0 + local.get $5 + i32.store offset=4 + end + local.get $0 + local.get $4 + i32.store offset=8 + end + ) + (func $~lib/array/Array#__unchecked_set (; 13 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store + ) + (func $~lib/array/Array#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=12 + local.set $3 + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + call $~lib/array/ensureCapacity + local.get $0 + local.get $1 + local.get $2 + call $~lib/array/Array#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s + if 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 + i32.store offset=12 end ) - (func $~lib/array/Array#__get (; 12 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 16 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - i32.load + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__get (; 17 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 3 i32.shr_u - i32.lt_u - if (result i64) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - i64.load offset=8 - else + i32.const 320 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $~lib/array/Array#__unchecked_set (; 18 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store ) - (func $~lib/array/Array#__set (; 13 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 19 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i64) - (local $8 i32) local.get $0 - i32.load + i32.load offset=12 local.set $3 - local.get $3 - i32.load + local.get $0 + local.get $1 + i32.const 1 + i32.add i32.const 3 - i32.shr_u - local.set $4 + call $~lib/array/ensureCapacity + local.get $0 local.get $1 - local.get $4 - i32.ge_u + local.get $2 + call $~lib/array/Array#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s if - local.get $1 - i32.const 134217727 - i32.ge_u - if - i32.const 0 - i32.const 184 - 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 3 - 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 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - i64.store offset=8 + i32.store offset=12 end ) - (func $~lib/array/Array#__get (; 14 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 21 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - i32.load + i32.const 2 + i32.shl + i32.add + f32.load + ) + (func $~lib/array/Array#__get (; 22 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result f32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - f32.load offset=8 - else + i32.const 320 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $~lib/array/Array#__unchecked_set (; 23 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store ) - (func $~lib/array/Array#__set (; 15 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/array/Array#__set (; 24 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 f32) - (local $8 i32) local.get $0 - i32.load + i32.load offset=12 local.set $3 - local.get $3 - i32.load + local.get $0 + local.get $1 + i32.const 1 + i32.add i32.const 2 - i32.shr_u - local.set $4 + call $~lib/array/ensureCapacity + local.get $0 local.get $1 - local.get $4 - i32.ge_u + local.get $2 + call $~lib/array/Array#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s if - local.get $1 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 184 - 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 - f32.store offset=8 + i32.store offset=12 end ) - (func $~lib/array/Array#__get (; 16 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 26 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - i32.load + i32.const 3 + i32.shl + i32.add + f64.load + ) + (func $~lib/array/Array#__get (; 27 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 3 i32.shr_u - i32.lt_u - if (result f64) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - else + i32.const 320 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get + ) + (func $~lib/array/Array#__unchecked_set (; 28 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store ) - (func $~lib/array/Array#__set (; 17 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/array/Array#__set (; 29 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 f64) - (local $8 i32) local.get $0 - i32.load + i32.load offset=12 local.set $3 - local.get $3 - i32.load + local.get $0 + local.get $1 + i32.const 1 + i32.add i32.const 3 - i32.shr_u - local.set $4 + call $~lib/array/ensureCapacity + local.get $0 local.get $1 - local.get $4 - i32.ge_u + local.get $2 + call $~lib/array/Array#__unchecked_set + local.get $1 + local.get $3 + i32.ge_s if - local.get $1 - i32.const 134217727 - i32.ge_u - if - i32.const 0 - i32.const 184 - 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 3 - 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 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $7 - f64.store offset=8 + i32.store offset=12 end ) - (func $start:std/static-array (; 18 ;) (type $FUNCSIG$v) - (local $0 i32) - call $start:~lib/allocator/arena - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/static-array/i - local.set $0 - local.get $0 - i32.load offset=4 - end + (func $start:std/static-array (; 30 ;) (type $FUNCSIG$v) + global.get $std/static-array/i + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 - i32.const 8 + i32.const 264 + i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/i @@ -2388,10 +1062,10 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 9 + i32.const 264 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/i @@ -2402,12 +1076,22 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 10 + i32.const 264 + i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + 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 global.get $std/static-array/i i32.const 0 i32.const 2 @@ -2420,27 +1104,23 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 12 + i32.const 264 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/static-array/I - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/static-array/I + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 - i32.const 14 + i32.const 264 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/I @@ -2451,10 +1131,10 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 15 + i32.const 264 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/I @@ -2465,10 +1145,10 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 16 + i32.const 264 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/I @@ -2483,27 +1163,23 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 18 + i32.const 264 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/static-array/f - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/static-array/f + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 - i32.const 20 + i32.const 264 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/f @@ -2514,10 +1190,10 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 21 + i32.const 264 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/f @@ -2528,10 +1204,10 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 22 + i32.const 264 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/f @@ -2546,27 +1222,23 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 24 + i32.const 264 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/array/Array#get:length|inlined.0 (result i32) - global.get $std/static-array/F - local.set $0 - local.get $0 - i32.load offset=4 - end + global.get $std/static-array/F + call $~lib/array/Array#get:length i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 136 - i32.const 26 + i32.const 264 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/F @@ -2577,10 +1249,10 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 27 + i32.const 264 + i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/F @@ -2591,10 +1263,10 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 28 + i32.const 264 + i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/static-array/F @@ -2609,16 +1281,266 @@ i32.eqz if i32.const 0 - i32.const 136 - i32.const 30 + i32.const 264 + i32.const 28 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/util/runtime/allocate (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC + i32.store + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + ) + (func $~lib/util/runtime/register (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 368 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if i32.const 0 - call $~lib/env/abort + i32.const 368 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort unreachable end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/runtime/runtime.newObject (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 39 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 424 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 40 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 41 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 42 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 424 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable ) - (func $start (; 19 ;) (type $FUNCSIG$v) + (func $start (; 44 ;) (type $FUNCSIG$v) call $start:std/static-array ) - (func $null (; 20 ;) (type $FUNCSIG$v) + (func $null (; 45 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string-utf8.json b/tests/compiler/std/string-utf8.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 d1c6bb54de..f7a404ca08 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1,29 +1,47 @@ (module - (type $FUNCSIG$v (func)) (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))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") - (data (i32.const 72) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 104) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 160) "\02\00\00\00\01\d87\dc") - (data (i32.const 168) "\02\00\00\00h\00i") - (data (i32.const 176) "\02\00\00\00R\d8b\df") - (data (i32.const 184) "\01") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0c") + (data (i32.const 24) "\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 40) "\10\00\00\00$") + (data (i32.const 56) "s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") + (data (i32.const 96) "\10") + (data (i32.const 112) "\10\00\00\00\1c") + (data (i32.const 128) "~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") + (data (i32.const 160) "\10\00\00\00(") + (data (i32.const 176) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 216) "\10\00\00\00\04") + (data (i32.const 232) "\01\d87\dc") + (data (i32.const 240) "\10\00\00\00\04") + (data (i32.const 256) "h\00i") + (data (i32.const 264) "\10\00\00\00\04") + (data (i32.const 280) "R\d8b\df") + (data (i32.const 288) "\10\00\00\00\02") + (data (i32.const 312) "\10\00\00\00\1e") + (data (i32.const 328) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 360) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e") + (global $std/string-utf8/str (mut i32) (i32.const 24)) + (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/str (mut i32) (i32.const 8)) - (global $std/string-utf8/len (mut i32) (i32.const 0)) (global $std/string-utf8/ptr (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/allocator/arena/__mem_free)) + (export "$.release" (func $~lib/allocator/arena/__mem_free)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) (func $~lib/string/String#get:lengthUTF8 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -33,11 +51,15 @@ i32.const 1 local.set $1 local.get $0 - i32.load - local.set $4 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $3 loop $continue|0 local.get $2 - local.get $4 + local.get $3 i32.lt_u if local.get $2 @@ -45,8 +67,8 @@ i32.shl local.get $0 i32.add - i32.load16_u offset=4 - local.tee $3 + i32.load16_u + local.tee $4 i32.const 128 i32.lt_u if (result i32) @@ -58,7 +80,7 @@ i32.const 1 i32.add else - local.get $3 + local.get $4 i32.const 2048 i32.lt_u if (result i32) @@ -70,22 +92,19 @@ i32.const 1 i32.add else + local.get $2 + i32.const 1 + i32.add local.get $3 + i32.lt_u + i32.const 0 + local.get $4 i32.const 64512 i32.and i32.const 55296 i32.eq - local.tee $3 - if - local.get $2 - i32.const 1 - i32.add - local.get $4 - i32.lt_u - local.set $3 - end - local.get $3 - if + select + if (result i32) local.get $2 i32.const 1 i32.add @@ -93,14 +112,14 @@ i32.shl local.get $0 i32.add - i32.load16_u offset=4 + i32.load16_u i32.const 64512 i32.and i32.const 56320 i32.eq - local.set $3 + else + i32.const 0 end - local.get $3 if (result i32) local.get $1 i32.const 4 @@ -126,7 +145,7 @@ end local.get $1 ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -198,116 +217,115 @@ (local $7 i32) local.get $0 call $~lib/string/String#get:lengthUTF8 - call $~lib/allocator/arena/__memory_allocate - local.set $6 + call $~lib/allocator/arena/__mem_allocate + local.set $5 local.get $0 - i32.load - local.set $7 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $6 loop $continue|0 - local.get $2 - local.get $7 + local.get $4 + local.get $6 i32.lt_u if - local.get $2 + local.get $4 i32.const 1 i32.shl local.get $0 i32.add - i32.load16_u offset=4 - local.tee $4 + i32.load16_u + local.tee $1 i32.const 128 i32.lt_u - if - local.get $1 - local.get $6 + if (result i32) + local.get $2 + local.get $5 i32.add - local.get $4 - i32.store8 local.get $1 + i32.store8 + local.get $2 i32.const 1 i32.add - local.set $1 else - local.get $4 + local.get $1 i32.const 2048 i32.lt_u - if - local.get $1 - local.get $6 + if (result i32) + local.get $2 + local.get $5 i32.add local.tee $3 - local.get $4 + local.get $1 i32.const 6 i32.shr_u i32.const 192 i32.or i32.store8 local.get $3 - local.get $4 + local.get $1 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=1 - local.get $1 + local.get $2 i32.const 2 i32.add - local.set $1 else - local.get $1 - local.get $6 + local.get $2 + local.get $5 i32.add - local.set $5 + local.set $3 local.get $4 + i32.const 1 + i32.add + local.get $6 + i32.lt_u + i32.const 0 + local.get $1 i32.const 64512 i32.and i32.const 55296 i32.eq - local.tee $3 - if - local.get $2 - i32.const 1 - i32.add - local.get $7 - i32.lt_u - local.set $3 - end - local.get $3 + select if - local.get $2 + local.get $4 i32.const 1 i32.add i32.const 1 i32.shl local.get $0 i32.add - i32.load16_u offset=4 - local.tee $3 + i32.load16_u + local.tee $7 i32.const 64512 i32.and i32.const 56320 i32.eq if - local.get $5 - local.get $4 + local.get $3 + local.get $1 i32.const 1023 i32.and i32.const 10 i32.shl i32.const 65536 i32.add - local.get $3 + local.get $7 i32.const 1023 i32.and i32.add - local.tee $3 + local.tee $1 i32.const 18 i32.shr_u i32.const 240 i32.or i32.store8 - local.get $5 local.get $3 + local.get $1 i32.const 12 i32.shr_u i32.const 63 @@ -315,8 +333,8 @@ i32.const 128 i32.or i32.store8 offset=1 - local.get $5 local.get $3 + local.get $1 i32.const 6 i32.shr_u i32.const 63 @@ -324,33 +342,33 @@ i32.const 128 i32.or i32.store8 offset=2 - local.get $5 local.get $3 + local.get $1 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=3 - local.get $1 + local.get $2 i32.const 4 i32.add - local.set $1 - local.get $2 + local.set $2 + local.get $4 i32.const 2 i32.add - local.set $2 + local.set $4 br $continue|0 end end - local.get $5 - local.get $4 + local.get $3 + local.get $1 i32.const 12 i32.shr_u i32.const 224 i32.or i32.store8 - local.get $5 - local.get $4 + local.get $3 + local.get $1 i32.const 6 i32.shr_u i32.const 63 @@ -358,273 +376,137 @@ i32.const 128 i32.or i32.store8 offset=1 - local.get $5 - local.get $4 + local.get $3 + local.get $1 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=2 - local.get $1 + local.get $2 i32.const 3 i32.add - local.set $1 end end - local.get $2 + local.set $2 + local.get $4 i32.const 1 i32.add - local.set $2 + local.set $4 br $continue|0 end end - local.get $1 - local.get $6 + local.get $2 + local.get $5 i32.add i32.const 0 i32.store8 - local.get $6 + local.get $5 ) - (func $~lib/internal/string/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if - local.get $0 - i32.const 536870910 - i32.le_s - local.set $1 - end - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 104 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 i32.const 1 - i32.shl - i32.const 4 + i32.const 32 + local.get $0 + i32.const 15 i32.add - call $~lib/allocator/arena/__memory_allocate + i32.clz + i32.sub + i32.shl + call $~lib/allocator/arena/__mem_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + i32.const 16 + i32.add ) - (func $~lib/internal/memory/memcpy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - loop $continue|0 + block $~lib/util/memory/memmove|inlined.0 + local.get $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 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u if - local.get $0 - local.get $1 - i32.load16_u - i32.store16 local.get $1 - i32.const 2 - i32.add - local.set $1 + i32.const 7 + i32.and 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 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 local.get $0 - i32.const 3 + i32.const 7 i32.and - local.tee $3 - i32.const 1 - i32.ne if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 - i32.const 2 - i32.eq - br_if $case1|2 - local.get $3 - i32.const 3 - i32.eq - br_if $case2|2 - br $break|2 + local.get $4 + i32.load8_u + i32.store8 + br $continue|0 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 + 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 - 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 @@ -634,836 +516,122 @@ i32.load8_u i32.store8 local.get $2 - i32.const 3 + i32.const 1 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 + br $continue|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 + 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.const 18 - i32.ge_u + i32.add + i32.const 7 + i32.and if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + local.get $2 + i32.const 1 + i32.sub + local.tee $2 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 + local.get $2 i32.add - i32.load - local.tee $3 - i32.const 16 - i32.shl - i32.or - i32.store - local.get $0 + 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.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 + i32.sub + local.tee $2 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 + i32.add + i64.load + i64.store 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 $2 + i32.const 1 + i32.sub + local.tee $2 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 + local.get $2 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 + i32.load8_u + i32.store8 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 (; 6 ;) (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 + (func $~lib/allocator/arena/__mem_free (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/register (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 + i32.const 504 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 + i32.const 0 + i32.const 176 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end local.get $0 - local.get $1 - i32.lt_u + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne 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 + i32.const 0 + i32.const 176 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable end + local.get $2 + local.get $1 + i32.store + local.get $0 ) - (func $~lib/string/String.fromUTF8 (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.fromUTF8 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1473,13 +641,13 @@ i32.const 1 i32.lt_u if - i32.const 64 + i32.const 112 return end local.get $1 i32.const 1 i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.set $6 loop $continue|0 local.get $2 @@ -1487,35 +655,32 @@ i32.lt_u if local.get $2 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $2 local.get $0 - local.get $3 + local.get $4 i32.add i32.load8_u - local.tee $4 + local.tee $3 i32.const 128 i32.lt_u if local.get $5 local.get $6 i32.add - local.get $4 + local.get $3 i32.store16 else - local.get $4 + local.get $3 + i32.const 224 + i32.lt_u + i32.const 0 + local.get $3 i32.const 191 i32.gt_u - local.tee $3 - if (result i32) - local.get $4 - i32.const 224 - i32.lt_u - else - local.get $3 - end + select if local.get $2 i32.const 1 @@ -1524,14 +689,14 @@ i32.gt_u if i32.const 0 - i32.const 72 - i32.const 512 + i32.const 128 + i32.const 461 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 - local.tee $3 + local.tee $4 i32.const 1 i32.add local.set $2 @@ -1539,12 +704,12 @@ local.get $6 i32.add local.get $0 - local.get $3 + local.get $4 i32.add i32.load8_u i32.const 63 i32.and - local.get $4 + local.get $3 i32.const 31 i32.and i32.const 6 @@ -1552,17 +717,14 @@ i32.or i32.store16 else - local.get $4 + local.get $3 + i32.const 365 + i32.lt_u + i32.const 0 + local.get $3 i32.const 239 i32.gt_u - local.tee $3 - if (result i32) - local.get $4 - i32.const 365 - i32.lt_u - else - local.get $3 - end + select if local.get $2 i32.const 3 @@ -1571,13 +733,13 @@ i32.gt_u if i32.const 0 - i32.const 72 - i32.const 516 + i32.const 128 + i32.const 465 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 7 i32.and i32.const 18 @@ -1603,11 +765,11 @@ i32.const 6 i32.shl i32.or - local.set $3 + local.set $4 local.get $2 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $2 @@ -1615,16 +777,16 @@ local.get $6 i32.add local.get $0 - local.get $4 + local.get $3 i32.add i32.load8_u i32.const 63 i32.and - local.get $3 + local.get $4 i32.or i32.const 65536 i32.sub - local.tee $3 + local.tee $4 i32.const 10 i32.shr_u i32.const 55296 @@ -1636,7 +798,7 @@ i32.add local.tee $5 i32.add - local.get $3 + local.get $4 i32.const 1023 i32.and i32.const 56320 @@ -1650,13 +812,13 @@ i32.gt_u if i32.const 0 - i32.const 72 - i32.const 528 + i32.const 128 + i32.const 477 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $4 + local.get $3 i32.const 15 i32.and i32.const 12 @@ -1670,11 +832,11 @@ i32.const 6 i32.shl i32.or - local.set $3 + local.set $4 local.get $2 i32.const 1 i32.add - local.tee $4 + local.tee $3 i32.const 1 i32.add local.set $2 @@ -1682,12 +844,12 @@ local.get $6 i32.add local.get $0 - local.get $4 + local.get $3 i32.add i32.load8_u i32.const 63 i32.and - local.get $3 + local.get $4 i32.or i32.store16 end @@ -1705,38 +867,36 @@ i32.ne if i32.const 0 - i32.const 72 - i32.const 537 + i32.const 128 + i32.const 486 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $5 - i32.const 1 - i32.shr_u - call $~lib/internal/string/allocateUnsafe + call $~lib/util/runtime/allocate local.tee $0 - i32.const 4 - i32.add local.get $6 local.get $5 - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/string/compareUnsafe (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 if (result i32) local.get $0 - i32.load16_u offset=4 + i32.load16_u local.get $1 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 @@ -1756,7 +916,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 @@ -1765,25 +925,28 @@ i32.const 1 return end - local.get $0 - i32.eqz - local.tee $2 + local.get $1 i32.eqz - if - local.get $1 - i32.eqz - local.set $2 - end - local.get $2 + i32.const 1 + local.get $0 + select if i32.const 0 return end local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -1792,14 +955,10 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 10 ;) (type $FUNCSIG$v) - i32.const 192 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset + (func $start:std/string-utf8 (; 11 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -1808,12 +967,16 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 7 + i32.const 56 + i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 504 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset global.get $std/string-utf8/str call $~lib/string/String#toUTF8 global.set $std/string-utf8/ptr @@ -1823,10 +986,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 11 + i32.const 56 + i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1835,10 +998,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 12 + i32.const 56 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1847,10 +1010,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 13 + i32.const 56 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1859,10 +1022,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 14 + i32.const 56 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1871,10 +1034,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 15 + i32.const 56 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1883,10 +1046,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 16 + i32.const 56 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1895,10 +1058,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 17 + i32.const 56 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1907,10 +1070,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 18 + i32.const 56 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1919,10 +1082,10 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 19 + i32.const 56 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1931,34 +1094,34 @@ i32.ne if i32.const 0 - i32.const 24 - i32.const 20 + i32.const 56 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr i32.load8_u offset=10 if i32.const 0 - i32.const 24 - i32.const 21 + i32.const 56 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr i32.const 0 call $~lib/string/String.fromUTF8 - i32.const 64 + i32.const 112 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 23 + i32.const 56 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1971,24 +1134,24 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 24 + i32.const 56 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 160 + i32.const 232 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 25 + i32.const 56 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -1996,15 +1159,15 @@ i32.add i32.const 2 call $~lib/string/String.fromUTF8 - i32.const 168 + i32.const 256 call $~lib/string/String.__eq i32.eqz if i32.const 0 + i32.const 56 i32.const 24 - i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2012,15 +1175,15 @@ i32.add i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 176 + i32.const 280 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 27 + i32.const 56 + i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2028,22 +1191,196 @@ i32.add i32.const 1 call $~lib/string/String.fromUTF8 - i32.const 184 + i32.const 304 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 28 + i32.const 56 + i32.const 26 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 360 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 360 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 360 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 360 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 360 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 360 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 328 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end + local.get $0 + ) + (func $~lib/runtime/runtime.collect (; 18 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 328 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 11 ;) (type $FUNCSIG$v) + (func $start (; 19 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 12 ;) (type $FUNCSIG$v) + (func $null (; 20 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/string-utf8.ts b/tests/compiler/std/string-utf8.ts index f3c6adbd96..d34198136d 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 2e1591386d..2ae5f61b86 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1,57 +1,66 @@ (module - (type $FUNCSIG$v (func)) (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))) (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\06\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") - (data (i32.const 64) "\00\00\00\00") - (data (i32.const 72) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 104) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 160) "\02\00\00\00\01\d87\dc") - (data (i32.const 168) "\02\00\00\00h\00i\00") - (data (i32.const 176) "\02\00\00\00R\d8b\df") - (data (i32.const 184) "\01\00\00\00\00\00") + (data (i32.const 8) "\10\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 40) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") + (data (i32.const 96) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 112) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 160) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 216) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\01\d87\dc") + (data (i32.const 240) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00h\00i\00") + (data (i32.const 264) "\10\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00R\d8b\df") + (data (i32.const 288) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 312) "\10\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 360) "\11\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00I\00\00\00\0e\00\00\00") (table $0 1 funcref) (elem (i32.const 0) $null) + (global $std/string-utf8/str (mut i32) (i32.const 24)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (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/str (mut i32) (i32.const 8)) - (global $std/string-utf8/len (mut i32) (i32.const 0)) (global $std/string-utf8/ptr (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 192)) + (global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 360)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 504)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (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/string/String#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u ) (func $~lib/string/String#get:lengthUTF8 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) i32.const 1 local.set $1 i32.const 0 local.set $2 local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 block $break|0 loop $continue|0 @@ -65,7 +74,7 @@ i32.const 1 i32.shl i32.add - i32.load16_u offset=4 + i32.load16_u local.set $4 local.get $4 i32.const 128 @@ -98,7 +107,6 @@ i32.and i32.const 55296 i32.eq - local.tee $5 if (result i32) local.get $2 i32.const 1 @@ -106,9 +114,8 @@ local.get $3 i32.lt_u else - local.get $5 + i32.const 0 end - local.tee $5 if (result i32) local.get $0 local.get $2 @@ -117,13 +124,13 @@ i32.const 1 i32.shl i32.add - i32.load16_u offset=4 + i32.load16_u i32.const 64512 i32.and i32.const 56320 i32.eq else - local.get $5 + i32.const 0 end if local.get $1 @@ -153,7 +160,7 @@ end local.get $1 ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (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) @@ -232,7 +239,12 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/string/String#toUTF8 (; 4 ;) (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/string/String#toUTF8 (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -240,113 +252,107 @@ (local $5 i32) (local $6 i32) (local $7 i32) - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/string/String#get:lengthUTF8 - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end - local.set $2 + local.get $0 + call $~lib/string/String#get:lengthUTF8 + call $~lib/memory/memory.allocate + local.set $1 i32.const 0 - local.set $3 + local.set $2 local.get $0 - i32.load - local.set $4 + call $~lib/string/String#get:length + local.set $3 i32.const 0 - local.set $5 + local.set $4 block $break|0 loop $continue|0 + local.get $2 local.get $3 - local.get $4 i32.lt_u if block local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.shl i32.add - i32.load16_u offset=4 - local.set $1 - local.get $1 + i32.load16_u + local.set $5 + local.get $5 i32.const 128 i32.lt_u if - local.get $2 - local.get $5 - i32.add local.get $1 - i32.store8 + local.get $4 + i32.add local.get $5 + i32.store8 + local.get $4 i32.const 1 i32.add - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 else - local.get $1 + local.get $5 i32.const 2048 i32.lt_u if - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add local.set $6 local.get $6 - local.get $1 + local.get $5 i32.const 6 i32.shr_u i32.const 192 i32.or i32.store8 local.get $6 - local.get $1 + local.get $5 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=1 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 else - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add local.set $6 - local.get $1 + local.get $5 i32.const 64512 i32.and i32.const 55296 i32.eq - local.tee $7 if (result i32) - local.get $3 + local.get $2 i32.const 1 i32.add - local.get $4 + local.get $3 i32.lt_u else - local.get $7 + i32.const 0 end if local.get $0 - local.get $3 + local.get $2 i32.const 1 i32.add i32.const 1 i32.shl i32.add - i32.load16_u offset=4 + i32.load16_u local.set $7 local.get $7 i32.const 64512 @@ -355,7 +361,7 @@ i32.eq if i32.const 65536 - local.get $1 + local.get $5 i32.const 1023 i32.and i32.const 10 @@ -365,16 +371,16 @@ i32.const 1023 i32.and i32.add - local.set $1 + local.set $5 local.get $6 - local.get $1 + local.get $5 i32.const 18 i32.shr_u i32.const 240 i32.or i32.store8 local.get $6 - local.get $1 + local.get $5 i32.const 12 i32.shr_u i32.const 63 @@ -383,7 +389,7 @@ i32.or i32.store8 offset=1 local.get $6 - local.get $1 + local.get $5 i32.const 6 i32.shr_u i32.const 63 @@ -392,32 +398,32 @@ i32.or i32.store8 offset=2 local.get $6 - local.get $1 + local.get $5 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=3 - local.get $5 + local.get $4 i32.const 4 i32.add - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 2 i32.add - local.set $3 + local.set $2 br $continue|0 end end local.get $6 - local.get $1 + local.get $5 i32.const 12 i32.shr_u i32.const 224 i32.or i32.store8 local.get $6 - local.get $1 + local.get $5 i32.const 6 i32.shr_u i32.const 63 @@ -426,20 +432,20 @@ i32.or i32.store8 offset=1 local.get $6 - local.get $1 + local.get $5 i32.const 63 i32.and i32.const 128 i32.or i32.store8 offset=2 - local.get $5 + local.get $4 i32.const 3 i32.add - local.set $5 - local.get $3 + local.set $4 + local.get $2 i32.const 1 i32.add - local.set $3 + local.set $2 end end end @@ -447,1513 +453,316 @@ end end end - local.get $2 - local.get $5 + local.get $1 + local.get $4 i32.add i32.const 0 i32.store8 - local.get $2 + local.get $1 ) - (func $~lib/internal/string/allocateUnsafe (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) + (func $~lib/util/runtime/adjust (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if (result i32) - local.get $0 - i32.const 536870910 - i32.le_s - else - local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 104 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 4 - local.get $0 - i32.const 1 - i32.shl - i32.add - local.set $1 - local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 - end - local.set $2 - local.get $2 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/util/runtime/allocate (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate + local.set $1 + local.get $1 + global.get $~lib/util/runtime/HEADER_MAGIC i32.store - local.get $2 + local.get $1 + local.get $0 + i32.store offset=4 + local.get $1 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add ) - (func $~lib/internal/memory/memcpy (; 6 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 8 ;) (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 + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 - block (result i32) + block $break|0 + loop $continue|0 local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + br $continue|0 + end end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 + 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 - 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 (; 7 ;) (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 + block $break|2 + loop $continue|2 + local.get $2 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 + local.tee $5 i32.const 1 i32.add local.set $0 - local.get $3 + local.get $5 end block (result i32) local.get $1 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $1 - local.get $3 + local.get $5 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.const 1 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 + br $continue|2 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 + 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.const 1 - i32.sub - local.set $2 + i32.add + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + 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 - 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 + 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 - 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|4 end - br $continue|3 end end end - block $break|4 - loop $continue|4 + block $break|5 + loop $continue|5 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 + 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 - 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/allocator/arena/__memory_free (; 8 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/string/String.fromUTF8 (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/memory/memory.free (; 10 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/util/runtime/register (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $2 + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 176 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + local.get $1 + i32.store + local.get $0 + ) + (func $~lib/string/String.fromUTF8 (; 12 ;) (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 $8 i32) local.get $1 i32.const 1 i32.lt_u if - i32.const 64 + i32.const 112 return end i32.const 0 local.set $2 - block $~lib/memory/memory.allocate|inlined.1 (result i32) - local.get $1 - i32.const 1 - i32.shl - local.set $3 - local.get $3 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - local.set $4 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.allocate + local.set $3 i32.const 0 - local.set $5 + local.set $4 block $break|0 loop $continue|0 local.get $2 @@ -1964,39 +773,38 @@ local.get $0 block (result i32) local.get $2 - local.tee $3 + local.tee $5 i32.const 1 i32.add local.set $2 - local.get $3 + local.get $5 end i32.add i32.load8_u - local.set $3 - local.get $3 + local.set $5 + local.get $5 i32.const 128 i32.lt_u if + local.get $3 local.get $4 - local.get $5 i32.add - local.get $3 - i32.store16 local.get $5 + i32.store16 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 else - local.get $3 + local.get $5 i32.const 191 i32.gt_u - local.tee $6 if (result i32) - local.get $3 + local.get $5 i32.const 224 i32.lt_u else - local.get $6 + i32.const 0 end if local.get $2 @@ -2007,16 +815,16 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 512 + i32.const 128 + i32.const 461 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + local.get $3 local.get $4 - local.get $5 i32.add - local.get $3 + local.get $5 i32.const 31 i32.and i32.const 6 @@ -2036,21 +844,20 @@ i32.and i32.or i32.store16 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 else - local.get $3 + local.get $5 i32.const 239 i32.gt_u - local.tee $6 if (result i32) - local.get $3 + local.get $5 i32.const 365 i32.lt_u else - local.get $6 + i32.const 0 end if local.get $2 @@ -2061,13 +868,13 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 516 + i32.const 128 + i32.const 465 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 7 i32.and i32.const 18 @@ -2120,33 +927,33 @@ i32.or i32.const 65536 i32.sub - local.set $3 + local.set $5 + local.get $3 local.get $4 - local.get $5 i32.add i32.const 55296 - local.get $3 + local.get $5 i32.const 10 i32.shr_u i32.add i32.store16 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 + local.get $3 local.get $4 - local.get $5 i32.add i32.const 56320 - local.get $3 + local.get $5 i32.const 1023 i32.and i32.add i32.store16 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 else local.get $2 i32.const 2 @@ -2156,16 +963,16 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 528 + i32.const 128 + i32.const 477 i32.const 8 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + local.get $3 local.get $4 - local.get $5 i32.add - local.get $3 + local.get $5 i32.const 15 i32.and i32.const 12 @@ -2201,10 +1008,10 @@ i32.and i32.or i32.store16 - local.get $5 + local.get $4 i32.const 2 i32.add - local.set $5 + local.set $4 end end end @@ -2219,41 +1026,26 @@ i32.eqz if i32.const 0 - i32.const 72 - i32.const 537 + i32.const 128 + i32.const 486 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $5 - i32.const 1 - i32.shr_u - call $~lib/internal/string/allocateUnsafe + local.get $4 + call $~lib/util/runtime/allocate local.set $7 - block $~lib/memory/memory.copy|inlined.0 - local.get $7 - i32.const 4 - i32.add - local.set $3 - local.get $4 - local.set $6 - local.get $5 - local.set $8 - local.get $3 - local.get $6 - local.get $8 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.free|inlined.0 - local.get $4 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end local.get $7 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy + local.get $3 + call $~lib/memory/memory.free + local.get $7 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/string/compareUnsafe (; 10 ;) (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 (; 13 ;) (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) @@ -2276,14 +1068,14 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -2306,9 +1098,8 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -2319,9 +1110,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -2332,11 +1122,11 @@ return end local.get $0 - i32.load - local.set $3 - local.get $3 + call $~lib/string/String#get:length + local.set $2 + local.get $2 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -2346,13 +1136,11 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 - call $~lib/internal/string/compareUnsafe + local.get $2 + call $~lib/util/string/compareImpl i32.eqz ) - (func $start:std/string-utf8 (; 12 ;) (type $FUNCSIG$v) - (local $0 i32) - call $start:~lib/allocator/arena + (func $start:std/string-utf8 (; 15 ;) (type $FUNCSIG$v) global.get $std/string-utf8/str call $~lib/string/String#get:lengthUTF8 global.set $std/string-utf8/len @@ -2362,12 +1150,22 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 7 + i32.const 56 + i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + 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 global.get $std/string-utf8/str call $~lib/string/String#toUTF8 global.set $std/string-utf8/ptr @@ -2378,10 +1176,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 11 + i32.const 56 + i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2391,10 +1189,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 12 + i32.const 56 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2404,10 +1202,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 13 + i32.const 56 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2417,10 +1215,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 14 + i32.const 56 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2430,10 +1228,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 15 + i32.const 56 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2443,10 +1241,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 16 + i32.const 56 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2456,10 +1254,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 17 + i32.const 56 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2469,10 +1267,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 18 + i32.const 56 + i32.const 16 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2482,10 +1280,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 19 + i32.const 56 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2495,10 +1293,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 20 + i32.const 56 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2508,24 +1306,24 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 21 + i32.const 56 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr i32.const 0 call $~lib/string/String.fromUTF8 - i32.const 64 + i32.const 112 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 23 + i32.const 56 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2538,24 +1336,24 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 24 + i32.const 56 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 160 + i32.const 232 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 25 + i32.const 56 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2563,15 +1361,15 @@ i32.add i32.const 2 call $~lib/string/String.fromUTF8 - i32.const 168 + i32.const 256 call $~lib/string/String.__eq i32.eqz if i32.const 0 + i32.const 56 i32.const 24 - i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2579,15 +1377,15 @@ i32.add i32.const 4 call $~lib/string/String.fromUTF8 - i32.const 176 + i32.const 280 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 27 + i32.const 56 + i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string-utf8/ptr @@ -2595,28 +1393,221 @@ i32.add i32.const 1 call $~lib/string/String.fromUTF8 - i32.const 184 + i32.const 304 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 28 + i32.const 56 + i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/memory/memory.free|inlined.1 - global.get $std/string-utf8/ptr - local.set $0 + global.get $std/string-utf8/ptr + call $~lib/memory/memory.free + ) + (func $~lib/runtime/runtime.instanceof (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 local.get $0 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 22 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 328 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 25 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 328 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable ) - (func $start (; 13 ;) (type $FUNCSIG$v) + (func $start (; 27 ;) (type $FUNCSIG$v) call $start:std/string-utf8 ) - (func $null (; 14 ;) (type $FUNCSIG$v) + (func $null (; 28 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/string.json b/tests/compiler/std/string.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 bdbcd96d04..203a3b5620 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1,221 +1,359 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result 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$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") - (data (i32.const 48) "\0d\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 80) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 120) "\01") - (data (i32.const 128) "\01\00\00\00a") - (data (i32.const 136) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 192) "\01\00\00\006") - (data (i32.const 200) "\02\00\00\004\d8\06\df") - (data (i32.const 208) "\02\00\00\00h\00i") - (data (i32.const 216) "\04\00\00\00n\00u\00l\00l") - (data (i32.const 232) "\06\00\00\00s\00t\00r\00i\00n\00g") - (data (i32.const 248) "\03\00\00\00I\00\'\00m") - (data (i32.const 264) "\01\00\00\00 ") - (data (i32.const 272) "\03\00\00\00 \00 \00 ") - (data (i32.const 288) "\03\00\00\00a\00b\00c") - (data (i32.const 304) "\05\00\00\00 \00 \00a\00b\00c") - (data (i32.const 320) "\03\00\00\001\002\003") - (data (i32.const 336) "\06\00\00\001\002\003\00a\00b\00c") - (data (i32.const 352) "\08\00\00\001\002\003\001\002\00a\00b\00c") - (data (i32.const 376) "\05\00\00\00a\00b\00c\00 \00 ") - (data (i32.const 392) "\06\00\00\00a\00b\00c\00a\00b\00c") - (data (i32.const 408) "\08\00\00\00a\00b\00c\00a\00b\00c\00a\00b") - (data (i32.const 432) "\01\00\00\00,") - (data (i32.const 440) "\01\00\00\00x") - (data (i32.const 448) "\03\00\00\00,\00 \00I") - (data (i32.const 464) "\01\00\00\00g") - (data (i32.const 472) "\01\00\00\00i") - (data (i32.const 480) "\01\00\00\000") - (data (i32.const 488) "\01\00\00\001") - (data (i32.const 496) "\05\00\00\000\00b\001\000\001") - (data (i32.const 512) "\05\00\00\000\00o\007\000\007") - (data (i32.const 528) "\05\00\00\000\00x\00f\000\00f") - (data (i32.const 544) "\05\00\00\000\00x\00F\000\00F") - (data (i32.const 560) "\03\00\00\000\001\001") - (data (i32.const 576) "\04\00\00\000\00x\001\00g") - (data (i32.const 592) "\03\00\00\000\00.\001") - (data (i32.const 608) "\03\00\00\00.\002\005") - (data (i32.const 624) "\08\00\00\00.\001\00f\00o\00o\00b\00a\00r") - (data (i32.const 648) "\01\00\00\00b") - (data (i32.const 656) "\02\00\00\00a\00b") - (data (i32.const 664) "\04\00\00\00k\00e\00y\001") - (data (i32.const 680) "\04\00\00\00k\00e\00y\002") - (data (i32.const 696) "\03\00\00\00k\00e\001") - (data (i32.const 712) "\03\00\00\00k\00e\002") - (data (i32.const 728) "\05\00\00\00k\00e\00y\001\002") - (data (i32.const 744) "\05\00\00\00k\00e\00y\001\001") - (data (i32.const 760) "\07\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 784) "\07\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 808) "\0b\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l") - (data (i32.const 840) "\n\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l") - (data (i32.const 864) "\02\00\00\00b\00a") - (data (i32.const 872) "\02\00\00\00a\00a") - (data (i32.const 880) "\03\00\00\00a\00a\00a") - (data (i32.const 896) "\08\00\00\00a\00b\00a\00b\00a\00b\00a\00b") - (data (i32.const 920) "\05\00\00\00a\00a\00a\00a\00a") - (data (i32.const 936) "\06\00\00\00a\00a\00a\00a\00a\00a") - (data (i32.const 952) "\07\00\00\00a\00a\00a\00a\00a\00a\00a") - (data (i32.const 976) "\0e\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n") - (data (i32.const 1008) "\01\00\00\00n") - (data (i32.const 1016) "\05\00\00\00j\00k\00l\00m\00n") - (data (i32.const 1032) "\05\00\00\00c\00d\00e\00f\00g") - (data (i32.const 1048) "\05\00\00\00d\00e\00f\00g\00h") - (data (i32.const 1064) "\0d\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m") - (data (i32.const 1096) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 1128) "\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") - (data (i32.const 1192) "\05\00\00\00a\00,\00b\00,\00c") - (data (i32.const 1208) "\01\00\00\00.") - (data (i32.const 1216) "\01\00\00\00c") - (data (i32.const 1224) "\07\00\00\00a\00,\00 \00b\00,\00 \00c") - (data (i32.const 1248) "\02\00\00\00,\00 ") - (data (i32.const 1256) "\06\00\00\00a\00,\00b\00,\00,\00c") - (data (i32.const 1272) "\06\00\00\00,\00a\00,\00b\00,\00c") - (data (i32.const 1288) "\06\00\00\00a\00,\00b\00,\00c\00,") - (data (i32.const 1304) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009") - (data (i32.const 1816) "\18\05\00\00d") - (data (i32.const 1824) "\01\00\00\008") - (data (i32.const 1832) "\05\00\00\00-\001\000\000\000") - (data (i32.const 1848) "\04\00\00\001\002\003\004") - (data (i32.const 1864) "\05\00\00\001\002\003\004\005") - (data (i32.const 1880) "\06\00\00\001\002\003\004\005\006") - (data (i32.const 1896) "\07\00\00\001\001\001\001\001\001\001") - (data (i32.const 1920) "\07\00\00\001\002\003\004\005\006\007") - (data (i32.const 1944) "\n\00\00\002\001\004\007\004\008\003\006\004\006") - (data (i32.const 1968) "\n\00\00\002\001\004\007\004\008\003\006\004\007") - (data (i32.const 1992) "\0b\00\00\00-\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2024) "\02\00\00\00-\001") - (data (i32.const 2032) "\04\00\00\001\000\000\000") - (data (i32.const 2048) "\n\00\00\002\001\004\007\004\008\003\006\004\008") - (data (i32.const 2072) "\n\00\00\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2096) "\08\00\00\009\009\009\009\009\009\009\009") - (data (i32.const 2120) "\t\00\00\001\000\000\000\000\000\000\000\000") - (data (i32.const 2144) "\0b\00\00\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2176) "\0c\00\00\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2208) "\0f\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2248) "\10\00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2288) "\11\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2328) "\14\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005") - (data (i32.const 2376) "\05\00\00\00-\001\002\003\004") - (data (i32.const 2392) "\0b\00\00\00-\004\002\009\004\009\006\007\002\009\005") - (data (i32.const 2424) "\0c\00\00\00-\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2456) "\0d\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2488) "\10\00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2528) "\12\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005") - (data (i32.const 2568) "\13\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007") - (data (i32.const 2616) "\14\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008") - (data (i32.const 2664) "\03\00\00\000\00.\000") - (data (i32.const 2680) "\03\00\00\00N\00a\00N") - (data (i32.const 2696) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 2720) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y") - (data (i32.const 2744) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 21 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/util/string/parse (; 16 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + (local $4 f64) (local $5 f64) - (local $6 f64) local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 i32.eqz if @@ -2219,7 +1294,7 @@ return end local.get $0 - i32.load16_u offset=4 + i32.load16_u local.tee $1 i32.const 45 i32.eq @@ -2237,7 +1312,7 @@ i32.const 2 i32.add local.tee $0 - i32.load16_u offset=4 + i32.load16_u local.set $1 f64.const -1 else @@ -2258,23 +1333,20 @@ i32.const 2 i32.add local.tee $0 - i32.load16_u offset=4 + i32.load16_u local.set $1 end f64.const 1 end - local.set $6 + local.set $5 + local.get $2 + i32.const 2 + i32.gt_s + i32.const 0 local.get $1 i32.const 48 i32.eq - local.tee $4 - if (result i32) - local.get $2 - i32.const 2 - i32.gt_s - else - local.get $4 - end + select if (result i32) block $break|0 (result i32) block $case6|0 @@ -2284,7 +1356,7 @@ local.get $0 i32.const 2 i32.add - i32.load16_u offset=4 + i32.load16_u local.tee $1 i32.const 66 i32.eq @@ -2349,7 +1421,7 @@ else i32.const 10 end - local.set $4 + local.set $3 loop $continue|1 block $break|1 local.get $2 @@ -2360,69 +1432,62 @@ local.get $1 if local.get $0 - i32.load16_u offset=4 - local.tee $3 + i32.load16_u + local.tee $1 i32.const 48 i32.ge_s - local.tee $1 if (result i32) - local.get $3 + local.get $1 i32.const 57 i32.le_s else - local.get $1 + i32.const 0 end if (result i32) - local.get $3 + local.get $1 i32.const 48 i32.sub else - local.get $3 + local.get $1 + i32.const 90 + i32.le_s + i32.const 0 + local.get $1 i32.const 65 i32.ge_s - local.tee $1 + select if (result i32) - local.get $3 - i32.const 90 - i32.le_s - else local.get $1 - end - if (result i32) - local.get $3 i32.const 55 i32.sub else - local.get $3 + local.get $1 + i32.const 122 + i32.le_s + i32.const 0 + local.get $1 i32.const 97 i32.ge_s - local.tee $1 - if (result i32) - local.get $3 - i32.const 122 - i32.le_s - else - local.get $1 - end + select i32.eqz br_if $break|1 - local.get $3 + local.get $1 i32.const 87 i32.sub end end local.tee $1 - local.get $4 + local.get $3 i32.ge_s br_if $break|1 - local.get $5 local.get $4 + local.get $3 f64.convert_i32_s f64.mul local.get $1 f64.convert_i32_s f64.add - local.set $5 + local.set $4 local.get $0 i32.const 2 i32.add @@ -2431,19 +1496,22 @@ end end end - local.get $6 local.get $5 + local.get $4 f64.mul ) - (func $~lib/string/parseFloat (; 22 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 17 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 f64) (local $4 f64) - (local $5 i32) - (local $6 f64) + (local $5 f64) local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 i32.eqz if @@ -2451,7 +1519,7 @@ return end local.get $0 - i32.load16_u offset=4 + i32.load16_u local.tee $1 i32.const 45 i32.eq @@ -2469,7 +1537,7 @@ i32.const 2 i32.add local.tee $0 - i32.load16_u offset=4 + i32.load16_u drop f64.const -1 else @@ -2490,12 +1558,12 @@ i32.const 2 i32.add local.tee $0 - i32.load16_u offset=4 + i32.load16_u drop end f64.const 1 end - local.set $6 + local.set $5 loop $continue|0 block $break|0 local.get $2 @@ -2506,7 +1574,7 @@ local.get $1 if local.get $0 - i32.load16_u offset=4 + i32.load16_u local.tee $1 i32.const 46 i32.eq @@ -2527,28 +1595,26 @@ local.get $1 if local.get $0 - i32.load16_u offset=4 - local.tee $5 + i32.load16_u + local.tee $1 i32.const 69 i32.eq - local.tee $1 - i32.eqz - if - local.get $5 + if (result i32) + i32.const 1 + else + local.get $1 i32.const 101 i32.eq - local.set $1 end - local.get $1 if i32.const 0 - i32.const 80 - i32.const 630 + i32.const 264 + i32.const 583 i32.const 10 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $5 + local.get $1 i32.const 48 i32.sub local.tee $1 @@ -2598,101 +1664,104 @@ end end end - local.get $6 + local.get $5 local.get $3 f64.mul ) - (func $~lib/string/String#concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 110 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load - local.tee $3 local.get $1 - i32.const 216 + i32.const 360 local.get $1 select + local.tee $3 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.tee $1 - i32.load - local.tee $4 i32.add local.tee $2 i32.eqz if - i32.const 112 + i32.const 120 return end local.get $2 - call $~lib/internal/string/allocateUnsafe + call $~lib/util/runtime/allocate local.tee $2 - i32.const 0 local.get $0 - i32.const 0 - local.get $3 - call $~lib/internal/string/copyUnsafe + local.get $1 + call $~lib/memory/memory.copy + local.get $1 local.get $2 + i32.add local.get $3 - local.get $1 - i32.const 0 local.get $4 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/string/String.__concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 216 + i32.const 360 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $~lib/string/String.__ne (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__eq i32.eqz ) - (func $~lib/string/String.__gt (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $0 + i32.const 1 local.get $1 - i32.eq - local.tee $2 i32.eqz - if - local.get $0 - i32.eqz - local.set $2 - end - local.get $2 + i32.const 1 + local.get $0 i32.eqz - if - local.get $1 - i32.eqz - local.set $2 - end - local.get $2 + local.get $0 + local.get $1 + i32.eq + select + select if i32.const 0 return end local.get $1 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $2 local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -2714,40 +1783,41 @@ local.get $2 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.const 0 i32.gt_s ) - (func $~lib/string/String.__lt (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - local.get $0 + i32.const 1 local.get $1 - i32.eq - local.tee $2 i32.eqz - if - local.get $0 - i32.eqz - local.set $2 - end - local.get $2 + i32.const 1 + local.get $0 i32.eqz - if - local.get $1 - i32.eqz - local.set $2 - end - local.get $2 + local.get $0 + local.get $1 + i32.eq + select + select if i32.const 0 return end local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $2 local.get $1 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $3 i32.eqz if @@ -2769,72 +1839,71 @@ local.get $3 i32.lt_s select - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.const 0 i32.lt_s ) - (func $~lib/string/String.__gte (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 local.get $1 call $~lib/string/String.__lt i32.eqz ) - (func $~lib/string/String.__lte (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 112 + (func $~lib/string/String.__lte (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 120 local.get $0 call $~lib/string/String.__gt i32.eqz ) - (func $~lib/string/String#repeat (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if i32.const 0 - i32.const 80 - i32.const 385 + i32.const 264 + i32.const 337 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load - local.set $3 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $2 local.get $1 i32.const 0 i32.lt_s - local.tee $2 - i32.eqz - if + if (result i32) + i32.const 1 + else + local.get $2 + i64.extend_i32_s local.get $1 - local.get $3 - i32.mul - i32.const 268435456 - i32.gt_s - local.set $2 + i64.extend_i32_s + i64.mul + i64.const 268435456 + i64.gt_u end - local.get $2 if i32.const 0 - i32.const 80 - i32.const 390 + i32.const 264 + i32.const 342 i32.const 6 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $1 - i32.eqz - local.tee $2 - i32.eqz - if - local.get $3 - i32.eqz - local.set $2 - end local.get $2 + i32.eqz + i32.const 1 + local.get $1 + select if - i32.const 112 + i32.const 120 return end local.get $1 @@ -2845,20 +1914,30 @@ return end local.get $1 - local.get $3 + local.get $2 i32.mul - call $~lib/internal/string/allocateUnsafe - local.tee $2 - i32.const 0 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.tee $3 local.get $0 - local.get $1 - call $~lib/internal/string/repeatUnsafe local.get $2 + i32.const 1 + i32.shl + local.get $1 + call $~lib/memory/memory.repeat + local.get $3 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/string/String#slice (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#slice (; 26 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.set $3 local.get $1 i32.const 0 @@ -2893,476 +1972,471 @@ i32.const 0 local.get $2 i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.lt_s - select - end - local.get $1 - i32.sub - local.tee $2 - i32.const 0 - i32.le_s - if - i32.const 112 - return - end - local.get $2 - call $~lib/internal/string/allocateUnsafe - local.tee $3 - i32.const 0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/string/copyUnsafe - local.get $3 - ) - (func $~lib/string/String#slice|trampoline (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 2147483647 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/string/String#slice - ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 33 ;) (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 1128 - 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 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memset (; 34 ;) (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 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select 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 + local.tee $2 i32.const 0 - i32.store8 - local.get $1 - i32.const 8 - i32.le_u + i32.le_s if + i32.const 120 return end - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and + local.get $2 + i32.const 1 + i32.shl local.tee $2 + call $~lib/util/runtime/allocate + local.tee $3 + local.get $1 + i32.const 1 + i32.shl 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 + call $~lib/memory/memory.copy + local.get $3 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/util/runtime/makeArray (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 16 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.set $1 local.get $0 - i32.add - i32.const 4 - i32.sub - i32.const 0 - i32.store + i32.const 2 + i32.shl + local.tee $2 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.tee $3 + local.set $4 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 + i32.load + drop local.get $1 - i32.add - local.tee $2 - i32.const 12 - i32.sub - i32.const 0 + local.get $4 i32.store + local.get $1 + local.get $3 + i32.store offset=4 + local.get $1 local.get $2 - i32.const 8 - i32.sub - i32.const 0 - i32.store + i32.store offset=8 local.get $1 - i32.const 24 - i32.le_u - if - return + local.get $0 + i32.store offset=12 + local.get $1 + ) + (func $~lib/memory/memory.fill (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + block $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 0 + i32.store8 + local.get $0 + local.get $1 + i32.add + i32.const 1 + i32.sub + i32.const 0 + i32.store8 + local.get $1 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 end + ) + (func $~lib/util/runtime/reallocate (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) 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 $4 + i32.load offset=4 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 + i32.lt_u + if + i32.const 1 + i32.const 32 local.get $1 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + local.tee $3 + local.set $5 + i32.const 1 i32.const 32 - i32.ge_u + local.get $2 + i32.const 15 + i32.add + i32.clz + i32.sub + i32.shl + i32.const 0 + local.get $0 + i32.const 6928 + i32.gt_u + select + local.get $3 + i32.lt_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 + local.get $5 + call $~lib/allocator/arena/__mem_allocate + local.tee $3 + local.get $4 + i32.load + i32.store + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + i32.const 0 + i32.store offset=12 + local.get $3 i32.const 16 i32.add - i64.const 0 - i64.store + local.tee $5 local.get $0 - i32.const 24 + local.get $2 + call $~lib/memory/memory.copy + local.get $2 + local.get $5 i32.add - i64.const 0 - i64.store local.get $1 - i32.const 32 + local.get $2 i32.sub - local.set $1 + call $~lib/memory/memory.fill + local.get $4 + i32.load + i32.const -1520547049 + i32.eq + if + local.get $0 + i32.const 6928 + i32.le_u + if + i32.const 0 + i32.const 184 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end + end + local.get $3 + local.set $4 + local.get $5 + local.set $0 + else local.get $0 - i32.const 32 + local.get $2 i32.add - local.set $0 - br $continue|0 + local.get $1 + local.get $2 + i32.sub + call $~lib/memory/memory.fill end end - ) - (func $~lib/array/Array<~lib/string/String>#constructor (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 1096 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 2 - i32.shl - local.tee $3 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 - i32.const 8 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - i32.const 0 - i32.store + local.get $4 local.get $1 - i32.const 0 i32.store offset=4 - local.get $1 - local.get $2 - i32.store - local.get $1 local.get $0 - i32.store offset=4 - local.get $2 - i32.const 8 - i32.add - local.get $3 - call $~lib/internal/memory/memset - local.get $1 ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/ensureCapacity (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) local.get $1 local.get $0 - i32.load - local.tee $2 - i32.gt_s + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_u if local.get $1 - i32.const 1073741816 - i32.gt_s + i32.const 268435452 + i32.gt_u if i32.const 0 - i32.const 1128 - i32.const 40 - i32.const 4 - call $~lib/env/abort + i32.const 1920 + i32.const 14 + i32.const 64 + call $~lib/builtins/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 + i32.load + local.tee $2 local.get $1 - local.get $2 - i32.sub - call $~lib/internal/memory/memset - else + i32.const 2 + i32.shl + local.tee $3 + call $~lib/util/runtime/reallocate + local.set $1 local.get $1 local.get $2 - i32.lt_s + i32.ne if - local.get $1 - i32.const 0 - i32.lt_s - if - i32.const 0 - i32.const 1128 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end + local.get $0 + i32.load + drop local.get $0 local.get $1 i32.store + local.get $0 + local.get $1 + i32.store offset=4 end + local.get $0 + local.get $3 + i32.store offset=8 end - local.get $0 ) - (func $~lib/array/Array<~lib/string/String>#push (; 37 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/array/Array<~lib/string/String>#push (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 - i32.load offset=4 + local.get $0 + i32.load offset=12 local.tee $2 i32.const 1 i32.add - local.set $4 - local.get $2 - local.get $0 - i32.load local.tee $3 - i32.load + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 + local.get $2 i32.const 2 - i32.shr_u - i32.ge_u + i32.shl + i32.add + local.tee $2 + i32.load + local.get $1 + i32.ne if local.get $2 - i32.const 268435454 - i32.ge_u - if - i32.const 0 - i32.const 1096 - i32.const 182 - i32.const 42 - call $~lib/env/abort - unreachable - end - local.get $0 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.tee $3 + local.get $1 i32.store end local.get $0 - local.get $4 - i32.store offset=4 - local.get $2 - i32.const 2 - i32.shl local.get $3 - i32.add - local.get $1 - i32.store offset=8 + i32.store offset=12 ) - (func $~lib/string/String#split (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 32 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3375,230 +2449,265 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 413 + i32.const 264 + i32.const 364 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $2 - i32.eqz - if - i32.const 0 - call $~lib/array/Array<~lib/string/String>#constructor - return - end - local.get $1 - i32.eqz - if - i32.const 1 - call $~lib/array/Array<~lib/string/String>#constructor - local.tee $1 - i32.load - local.get $0 - i32.store offset=8 + block $folding-inner0 + local.get $2 + i32.eqz + br_if $folding-inner0 local.get $1 - return - end - local.get $0 - i32.load - local.set $3 - i32.const 2147483647 - local.get $2 - local.get $2 - i32.const 0 - i32.lt_s - select - local.set $5 - local.get $1 - i32.load - local.tee $8 - if - local.get $3 i32.eqz if i32.const 1 - call $~lib/array/Array<~lib/string/String>#constructor - local.tee $0 - i32.load - i32.const 112 - i32.store offset=8 - local.get $0 - i32.load - i32.load offset=8 - drop + call $~lib/util/runtime/makeArray + local.tee $1 + i32.load offset=4 local.get $0 + i32.store + local.get $1 return end - else - local.get $3 - i32.eqz + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.set $3 + i32.const 2147483647 + local.get $2 + local.get $2 + i32.const 0 + i32.lt_s + select + local.set $5 + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $8 if + local.get $3 + i32.eqz + if + i32.const 1 + call $~lib/util/runtime/makeArray + local.tee $0 + i32.load offset=4 + i32.const 120 + i32.store + local.get $0 + return + end + else + local.get $3 + i32.eqz + br_if $folding-inner0 + local.get $3 + local.get $5 + local.get $3 + local.get $5 + i32.lt_s + select + local.tee $4 + call $~lib/util/runtime/makeArray + local.tee $3 + i32.load offset=4 + local.set $5 i32.const 0 - call $~lib/array/Array<~lib/string/String>#constructor + local.set $1 + loop $repeat|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 2 + call $~lib/util/runtime/allocate + local.tee $2 + local.get $1 + i32.const 1 + i32.shl + local.get $0 + i32.add + i32.load16_u + i32.store16 + local.get $1 + i32.const 2 + i32.shl + local.get $5 + i32.add + local.get $2 + i32.store + local.get $2 + i32.const 16 + call $~lib/util/runtime/register + drop + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + local.get $3 return end - local.get $3 - local.get $5 - local.get $3 - local.get $5 - i32.lt_s - select - local.tee $2 - call $~lib/array/Array<~lib/string/String>#constructor - local.tee $4 - i32.load - local.set $3 i32.const 0 - local.set $1 - loop $repeat|0 + call $~lib/util/runtime/makeArray + local.set $2 + loop $continue|1 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + local.get $4 + call $~lib/string/String#indexOf + local.tee $7 + i32.const -1 + i32.ne if - i32.const 1 - call $~lib/internal/string/allocateUnsafe - local.tee $5 - local.get $1 - i32.const 1 - i32.shl - local.get $0 - i32.add - i32.load16_u offset=4 - i32.store16 offset=4 - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add + local.get $7 + local.get $4 + i32.sub + local.tee $6 + i32.const 0 + i32.gt_s + if + local.get $6 + i32.const 1 + i32.shl + local.tee $6 + call $~lib/util/runtime/allocate + local.tee $9 + local.get $4 + i32.const 1 + i32.shl + local.get $0 + i32.add + local.get $6 + call $~lib/memory/memory.copy + local.get $2 + local.get $9 + i32.const 16 + call $~lib/util/runtime/register + call $~lib/array/Array<~lib/string/String>#push + else + local.get $2 + i32.const 120 + call $~lib/array/Array<~lib/string/String>#push + end local.get $5 - i32.store offset=8 - local.get $1 + local.get $10 i32.const 1 i32.add - local.set $1 - br $repeat|0 + local.tee $10 + i32.eq + if + local.get $2 + return + end + local.get $7 + local.get $8 + i32.add + local.set $4 + br $continue|1 end end local.get $4 - return - end - i32.const 0 - call $~lib/array/Array<~lib/string/String>#constructor - local.set $2 - loop $continue|1 - local.get $0 - local.get $1 - local.get $4 - call $~lib/string/String#indexOf - local.tee $6 - i32.const -1 - i32.ne + i32.eqz if - local.get $6 - local.get $4 - i32.sub - local.tee $7 - i32.const 0 - i32.gt_s + i32.const 1 + call $~lib/util/runtime/makeArray + local.tee $1 + i32.load offset=4 + local.tee $2 + i32.load + local.get $0 + i32.ne if - local.get $7 - call $~lib/internal/string/allocateUnsafe - local.tee $9 - i32.const 0 - local.get $0 - local.get $4 - local.get $7 - call $~lib/internal/string/copyUnsafe - local.get $2 - local.get $9 - call $~lib/array/Array<~lib/string/String>#push - else local.get $2 - i32.const 112 - call $~lib/array/Array<~lib/string/String>#push + local.get $0 + i32.store end - local.get $5 - local.get $10 + local.get $1 + return + end + local.get $3 + local.get $4 + i32.sub + local.tee $1 + i32.const 0 + i32.gt_s + if + local.get $1 i32.const 1 + i32.shl + local.tee $1 + call $~lib/util/runtime/allocate + local.tee $3 + local.get $4 + i32.const 1 + i32.shl + local.get $0 i32.add - local.tee $10 - i32.eq - if - local.get $2 - return - end - local.get $6 - local.get $8 - i32.add - local.set $4 - br $continue|1 + local.get $1 + call $~lib/memory/memory.copy + local.get $2 + local.get $3 + i32.const 16 + call $~lib/util/runtime/register + call $~lib/array/Array<~lib/string/String>#push + else + local.get $2 + i32.const 120 + call $~lib/array/Array<~lib/string/String>#push end - end - local.get $4 - i32.eqz - if - i32.const 1 - call $~lib/array/Array<~lib/string/String>#constructor - local.tee $1 - i32.load - local.get $0 - i32.store offset=8 - local.get $1 - i32.load - i32.load offset=8 - drop - local.get $1 + local.get $2 return end - local.get $3 - local.get $4 - i32.sub - local.tee $1 i32.const 0 - i32.gt_s + call $~lib/util/runtime/makeArray + ) + (func $~lib/array/Array<~lib/string/String>#__get (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=12 + i32.ge_u if - local.get $1 - call $~lib/internal/string/allocateUnsafe - local.tee $3 i32.const 0 - local.get $0 - local.get $4 - local.get $1 - call $~lib/internal/string/copyUnsafe - local.get $2 - local.get $3 - call $~lib/array/Array<~lib/string/String>#push - else - local.get $2 - i32.const 112 - call $~lib/array/Array<~lib/string/String>#push + i32.const 1920 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable end - local.get $2 - ) - (func $~lib/string/String#split|trampoline (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const 2147483647 - local.set $2 + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 1920 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable end local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - call $~lib/string/String#split + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $~lib/internal/number/decimalCount32 (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 100000 i32.lt_u @@ -3652,10 +2761,10 @@ end end ) - (func $~lib/internal/number/utoa32_lut (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 35 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) - i32.const 1816 + i32.const 2620 i32.load local.set $3 loop $continue|0 @@ -3679,26 +2788,26 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 100 i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -3722,13 +2831,13 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 - i32.store offset=4 + i32.load + i32.store end local.get $1 i32.const 10 @@ -3741,13 +2850,13 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $1 i32.const 2 i32.shl + local.get $3 i32.add - i32.load offset=8 - i32.store offset=4 + i32.load + i32.store else local.get $2 i32.const 1 @@ -3759,17 +2868,17 @@ local.get $1 i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i32.eqz if - i32.const 480 + i32.const 848 return end local.get $0 @@ -3783,43 +2892,51 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $1 if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/utoa32 (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) local.get $0 i32.eqz if - i32.const 480 + i32.const 848 return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/decimalCount64 (; 44 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 38 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) local.get $0 i64.const 1000000000000000 i64.lt_u @@ -3873,12 +2990,12 @@ end end ) - (func $~lib/internal/number/utoa64_lut (; 45 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 39 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - i32.const 1816 + i32.const 2620 i32.load local.set $3 loop $continue|0 @@ -3914,7 +3031,6 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $4 i32.const 10000 i32.rem_u @@ -3923,20 +3039,21 @@ i32.div_u i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $4 i32.const 100 i32.rem_u i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store local.get $2 i32.const 4 i32.sub @@ -3945,22 +3062,22 @@ i32.shl local.get $0 i32.add - local.get $3 local.get $6 i32.const 2 i32.shl - i32.add - i64.load32_u offset=8 local.get $3 + i32.add + i64.load32_u local.get $5 i32.const 2 i32.shl + local.get $3 i32.add - i64.load32_u offset=8 + i64.load32_u i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store br $continue|0 end end @@ -3968,16 +3085,16 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 46 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 40 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 i64.eqz if - i32.const 480 + i32.const 848 return end local.get $0 @@ -3987,26 +3104,32 @@ local.get $0 i32.wrap_i64 local.tee $1 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.tee $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $2 local.get $1 local.get $3 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.tee $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $2 local.get $0 local.get $1 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa64 (; 47 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 41 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4014,7 +3137,7 @@ local.get $0 i64.eqz if - i32.const 480 + i32.const 848 return end block (result i32) @@ -4036,36 +3159,42 @@ local.get $0 i32.wrap_i64 local.tee $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.tee $4 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $3 local.get $2 local.get $4 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.tee $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.tee $3 local.get $0 local.get $2 - call $~lib/internal/number/utoa64_lut + call $~lib/util/number/utoa64_lut end local.get $1 if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/genDigits (; 48 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/util/number/genDigits (; 42 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i32) (local $9 i64) @@ -4077,7 +3206,7 @@ local.get $3 local.get $1 i64.sub - local.set $10 + local.set $9 i64.const 1 i32.const 0 local.get $4 @@ -4086,21 +3215,21 @@ i64.extend_i32_s local.tee $1 i64.shl - local.tee $11 + local.tee $10 i64.const 1 i64.sub local.tee $14 local.get $3 i64.and - local.set $9 + local.set $11 local.get $3 local.get $1 i64.shr_u i32.wrap_i64 local.tee $7 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $4 - i32.const 4104 + i32.const 4988 i32.load local.set $13 loop $continue|0 @@ -4253,7 +3382,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $4 i32.const 1 @@ -4264,22 +3393,22 @@ local.get $12 i64.extend_i32_s i64.shl - local.get $9 + local.get $11 i64.add local.tee $1 local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $4 i32.add - global.set $~lib/internal/number/_K - local.get $13 + global.set $~lib/util/number/_K local.get $4 i32.const 2 i32.shl + local.get $13 i32.add - i64.load32_u offset=8 + i64.load32_u local.get $12 i64.extend_i32_s i64.shl @@ -4292,44 +3421,39 @@ local.get $0 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $4 loop $continue|2 + local.get $5 + local.get $1 + i64.sub + local.get $3 + i64.ge_u + i32.const 0 local.get $1 - local.get $10 + local.get $9 i64.lt_u - local.tee $0 - if - local.get $5 + select + if (result i32) + i32.const 1 + local.get $9 local.get $1 i64.sub + local.get $1 local.get $3 - i64.ge_u - local.set $0 - end - local.get $0 - if + i64.add + local.get $9 + i64.sub + i64.gt_u local.get $1 local.get $3 i64.add - local.get $10 + local.get $9 i64.lt_u - local.tee $0 - i32.eqz - if - local.get $10 - local.get $1 - i64.sub - local.get $1 - local.get $3 - i64.add - local.get $10 - i64.sub - i64.gt_u - local.set $0 - end + select + else + i32.const 0 end - local.get $0 if local.get $4 i32.const 1 @@ -4344,7 +3468,7 @@ end local.get $2 local.get $4 - i32.store16 offset=4 + i32.store16 local.get $6 return end @@ -4356,7 +3480,7 @@ i64.const 10 i64.mul local.set $5 - local.get $9 + local.get $11 i64.const 10 i64.mul local.tee $3 @@ -4386,7 +3510,7 @@ i32.and i32.const 48 i32.add - i32.store16 offset=4 + i32.store16 end local.get $4 i32.const 1 @@ -4395,25 +3519,27 @@ local.get $3 local.get $14 i64.and - local.tee $9 + local.tee $11 local.get $5 i64.ge_u br_if $continue|3 - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $4 i32.add - global.set $~lib/internal/number/_K - local.get $13 + global.set $~lib/util/number/_K + local.get $11 + local.set $1 i32.const 0 local.get $4 i32.sub i32.const 2 i32.shl + local.get $13 i32.add - i64.load32_u offset=8 - local.get $10 + i64.load32_u + local.get $9 i64.mul - local.set $1 + local.set $3 local.get $6 i32.const 1 i32.sub @@ -4422,65 +3548,59 @@ local.get $0 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $4 loop $continue|4 - local.get $9 + local.get $5 + local.get $1 + i64.sub + local.get $10 + i64.ge_u + i32.const 0 local.get $1 + local.get $3 i64.lt_u - local.tee $0 - if - local.get $5 - local.get $9 + select + if (result i32) + i32.const 1 + local.get $3 + local.get $1 i64.sub - local.get $11 - i64.ge_u - local.set $0 - end - local.get $0 - if - local.get $9 - local.get $11 + local.get $1 + local.get $10 i64.add + local.get $3 + i64.sub + i64.gt_u local.get $1 + local.get $10 + i64.add + local.get $3 i64.lt_u - local.tee $0 - i32.eqz - if - local.get $1 - local.get $9 - i64.sub - local.get $9 - local.get $11 - i64.add - local.get $1 - i64.sub - i64.gt_u - local.set $0 - end + select + else + i32.const 0 end - local.get $0 if local.get $4 i32.const 1 i32.sub local.set $4 - local.get $9 - local.get $11 + local.get $1 + local.get $10 i64.add - local.set $9 + local.set $1 br $continue|4 end end local.get $2 local.get $4 - i32.store16 offset=4 + i32.store16 local.get $6 end ) - (func $~lib/internal/number/prettify (; 49 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 43 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $2 i32.eqz if @@ -4490,7 +3610,7 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -4502,14 +3622,13 @@ i32.add local.tee $3 i32.le_s - local.tee $4 - if + if (result i32) local.get $3 i32.const 21 i32.le_s - local.set $4 + else + i32.const 0 end - local.get $4 if (result i32) loop $repeat|0 block $break|0 @@ -4523,7 +3642,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -4537,88 +3656,73 @@ local.get $0 i32.add i32.const 3145774 - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add else + local.get $3 + i32.const 21 + i32.le_s + i32.const 0 local.get $3 i32.const 0 i32.gt_s - local.tee $4 - if - local.get $3 - i32.const 21 - i32.le_s - local.set $4 - end - local.get $4 + select if (result i32) local.get $3 i32.const 1 i32.shl local.get $0 i32.add - i32.const 4 - i32.add - local.tee $4 + local.tee $0 i32.const 2 i32.add - local.get $4 + local.get $0 i32.const 0 local.get $2 i32.sub i32.const 1 i32.shl - call $~lib/internal/memory/memmove - local.get $3 - i32.const 1 - i32.shl + call $~lib/memory/memory.copy local.get $0 - i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add else + local.get $3 + i32.const 0 + i32.le_s + i32.const 0 i32.const -6 local.get $3 - i32.lt_s - local.tee $2 - if - local.get $3 - i32.const 0 - i32.le_s - local.set $2 - end - local.get $2 - if (result i32) - local.get $0 - i32.const 4 - i32.add - local.tee $2 + i32.lt_s + select + if (result i32) i32.const 2 local.get $3 i32.sub - local.tee $4 + local.tee $3 i32.const 1 i32.shl + local.get $0 i32.add - local.get $2 + local.get $0 local.get $1 i32.const 1 i32.shl - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 3014704 - i32.store offset=4 + i32.store i32.const 2 local.set $2 loop $repeat|1 block $break|1 local.get $2 - local.get $4 + local.get $3 i32.ge_s br_if $break|1 local.get $2 @@ -4627,7 +3731,7 @@ local.get $0 i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $2 i32.const 1 i32.add @@ -4636,7 +3740,7 @@ end end local.get $1 - local.get $4 + local.get $3 i32.add else local.get $1 @@ -4645,7 +3749,7 @@ if (result i32) local.get $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add @@ -4654,41 +3758,38 @@ local.get $3 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 0 i32.lt_s - local.tee $1 + local.tee $2 if i32.const 0 - local.get $2 + local.get $1 i32.sub - local.set $2 + local.set $1 end - local.get $2 + local.get $1 end - local.get $2 - call $~lib/internal/number/decimalCount32 + local.get $1 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.tee $2 - call $~lib/internal/number/utoa32_lut + local.tee $1 + call $~lib/util/number/utoa32_lut local.get $0 i32.const 45 i32.const 43 - local.get $1 - select - i32.store16 offset=4 local.get $2 + select + i32.store16 + local.get $1 i32.const 2 i32.add else local.get $0 i32.const 4 i32.add - local.tee $2 - i32.const 4 - i32.add - local.get $2 + local.get $0 i32.const 2 i32.add local.get $1 @@ -4697,50 +3798,50 @@ local.tee $2 i32.const 2 i32.sub - call $~lib/internal/memory/memmove + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $2 i32.add local.tee $0 i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 i32.const 4 i32.add - local.tee $0 + local.tee $2 block (result i32) local.get $3 i32.const 1 i32.sub - local.tee $2 + local.tee $0 i32.const 0 i32.lt_s - local.tee $4 + local.tee $3 if i32.const 0 - local.get $2 + local.get $0 i32.sub - local.set $2 + local.set $0 end - local.get $2 + local.get $0 end - local.get $2 - call $~lib/internal/number/decimalCount32 + local.get $0 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.tee $2 - call $~lib/internal/number/utoa32_lut - local.get $0 + local.tee $0 + call $~lib/util/number/utoa32_lut + local.get $2 i32.const 45 i32.const 43 - local.get $4 + local.get $3 select - i32.store16 offset=4 + i32.store16 + local.get $0 local.get $1 - local.get $2 i32.add i32.const 2 i32.add @@ -4749,38 +3850,30 @@ end end ) - (func $~lib/internal/number/dtoa_core (; 50 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 44 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) (local $3 i32) (local $4 i64) - (local $5 i32) - (local $6 i32) - (local $7 i64) + (local $5 i64) + (local $6 i64) + (local $7 i32) (local $8 i64) (local $9 i64) (local $10 i32) - (local $11 i64) - (local $12 i64) - (local $13 i32) - (local $14 i64) - (local $15 i64) - (local $16 i64) - (local $17 i64) - (local $18 i64) - (local $19 i64) + (local $11 i32) local.get $1 f64.const 0 f64.lt local.tee $10 - if (result f64) + if local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 local.get $1 f64.neg - else - local.get $1 + local.set $1 end + local.get $1 i64.reinterpret_f64 local.tee $2 i64.const 9218868437227405312 @@ -4788,68 +3881,68 @@ i64.const 52 i64.shr_u i32.wrap_i64 - local.set $5 + local.tee $11 + i32.const 0 + i32.ne + local.set $7 local.get $2 i64.const 4503599627370495 i64.and - local.get $5 - i32.const 0 - i32.ne - local.tee $6 + local.get $7 i64.extend_i32_u i64.const 52 i64.shl i64.add - local.tee $2 + local.tee $5 i64.const 1 i64.shl i64.const 1 i64.add - local.tee $7 + local.tee $2 i64.clz i32.wrap_i64 local.set $3 - local.get $7 + local.get $2 local.get $3 i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_plus - local.get $5 + global.set $~lib/util/number/_frc_plus + local.get $11 i32.const 1 - local.get $6 + local.get $7 select i32.const 1075 i32.sub - local.tee $5 + local.tee $7 i32.const 1 i32.sub local.get $3 i32.sub local.set $3 - local.get $2 - local.get $2 + local.get $5 + local.get $5 i64.const 4503599627370496 i64.eq i32.const 1 i32.add - local.tee $6 + local.tee $11 i64.extend_i32_s i64.shl i64.const 1 i64.sub - local.get $5 - local.get $6 + local.get $7 + local.get $11 i32.sub local.get $3 i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $3 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp i32.const 348 i32.const -61 - global.get $~lib/internal/number/_exp + global.get $~lib/util/number/_exp i32.sub f64.convert_i32_s f64.const 0.30102999566398114 @@ -4871,82 +3964,52 @@ local.tee $3 i32.const 3 i32.shl - local.tee $6 i32.sub - global.set $~lib/internal/number/_K - i32.const 4032 - i32.load - local.set $13 - i32.const 3768 + global.set $~lib/util/number/_K + i32.const 4676 i32.load - local.get $6 + local.get $3 + i32.const 3 + i32.shl i32.add - i64.load offset=8 - global.set $~lib/internal/number/_frc_pow - local.get $13 + i64.load + global.set $~lib/util/number/_frc_pow + i32.const 4900 + i32.load local.get $3 i32.const 1 i32.shl i32.add - i32.load16_s offset=8 - global.set $~lib/internal/number/_exp_pow - local.get $2 - local.get $2 - i64.clz - i32.wrap_i64 - local.tee $3 - i64.extend_i32_s - i64.shl - local.tee $7 - i64.const 4294967295 - i64.and - local.tee $11 - global.get $~lib/internal/number/_frc_pow - local.tee $2 + i32.load16_s + global.set $~lib/util/number/_exp_pow + global.get $~lib/util/number/_frc_pow + local.tee $6 i64.const 4294967295 i64.and - local.tee $14 - i64.mul - local.set $15 - global.get $~lib/internal/number/_frc_plus + local.set $2 + global.get $~lib/util/number/_frc_plus local.tee $8 i64.const 4294967295 i64.and local.tee $4 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $9 - i64.mul - local.set $12 - global.get $~lib/internal/number/_frc_minus - local.tee $16 - i64.const 4294967295 - i64.and - local.tee $17 - local.get $2 - i64.const 4294967295 - i64.and - local.tee $18 - i64.mul - local.set $19 - local.get $4 - local.get $2 + local.get $6 i64.const 32 i64.shr_u - local.tee $4 + local.tee $6 i64.mul local.get $8 i64.const 32 i64.shr_u local.tee $8 - local.get $9 + local.get $2 + i64.mul + local.get $2 + local.get $4 i64.mul - local.get $12 i64.const 32 i64.shr_u i64.add - local.tee $9 + local.tee $4 i64.const 4294967295 i64.and i64.add @@ -4954,10 +4017,10 @@ i64.add i64.const 32 i64.shr_u - local.get $4 + local.get $6 local.get $8 i64.mul - local.get $9 + local.get $4 i64.const 32 i64.shr_u i64.add @@ -4965,23 +4028,26 @@ i64.const 1 i64.sub local.tee $8 - local.get $2 - i64.const 32 - i64.shr_u + local.get $6 + global.get $~lib/util/number/_frc_minus local.tee $4 - local.get $17 + i64.const 4294967295 + i64.and + local.tee $9 i64.mul - local.get $16 + local.get $4 i64.const 32 i64.shr_u - local.tee $9 - local.get $18 + local.tee $4 + local.get $2 + i64.mul + local.get $2 + local.get $9 i64.mul - local.get $19 i64.const 32 i64.shr_u i64.add - local.tee $12 + local.tee $9 i64.const 4294967295 i64.and i64.add @@ -4990,9 +4056,9 @@ i64.const 32 i64.shr_u local.get $4 - local.get $9 + local.get $6 i64.mul - local.get $12 + local.get $9 i64.const 32 i64.shr_u i64.add @@ -5007,23 +4073,32 @@ local.get $0 i32.add local.get $0 - local.get $2 - i64.const 32 - i64.shr_u - local.tee $2 - local.get $11 + local.get $6 + local.get $5 + local.get $5 + i64.clz + i32.wrap_i64 + local.tee $0 + i64.extend_i32_s + i64.shl + local.tee $5 + i64.const 4294967295 + i64.and + local.tee $9 i64.mul - local.get $7 + local.get $5 i64.const 32 i64.shr_u - local.tee $7 - local.get $14 + local.tee $5 + local.get $2 + i64.mul + local.get $2 + local.get $9 i64.mul - local.get $15 i64.const 32 i64.shr_u i64.add - local.tee $11 + local.tee $2 i64.const 4294967295 i64.and i64.add @@ -5031,61 +4106,64 @@ i64.add i64.const 32 i64.shr_u - local.get $2 - local.get $7 + local.get $5 + local.get $6 i64.mul - local.get $11 + local.get $2 i64.const 32 i64.shr_u i64.add i64.add - global.get $~lib/internal/number/_exp_pow - local.tee $0 - local.get $5 - local.get $3 + global.get $~lib/util/number/_exp_pow + local.tee $3 + local.get $7 + local.get $0 i32.sub i32.add i32.const -64 i32.sub local.get $8 - global.get $~lib/internal/number/_exp - local.get $0 + global.get $~lib/util/number/_exp + local.get $3 i32.add i32.const -64 i32.sub local.get $4 local.get $10 - call $~lib/internal/number/genDigits + call $~lib/util/number/genDigits local.get $10 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify + global.get $~lib/util/number/_K + call $~lib/util/number/prettify local.get $10 i32.add ) - (func $~lib/string/String#substring (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#substring (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.eqz if i32.const 0 - i32.const 80 - i32.const 254 + i32.const 264 + i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 - i32.load - local.tee $3 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + local.tee $2 i32.const 0 - local.get $3 + local.get $2 i32.lt_s select - local.tee $2 + local.tee $3 local.get $1 i32.const 0 local.get $1 @@ -5093,64 +4171,101 @@ i32.gt_s select local.tee $1 - local.get $3 + local.get $2 local.get $1 - local.get $3 + local.get $2 i32.lt_s select - local.tee $1 + local.tee $2 + local.get $3 local.get $2 - local.get $1 i32.gt_s select - local.tee $4 + i32.const 1 + i32.shl + local.tee $1 + local.get $3 local.get $2 - local.get $1 + local.get $3 local.get $2 - local.get $1 i32.lt_s select - local.tee $1 - i32.sub + i32.const 1 + i32.shl local.tee $3 + i32.sub + local.tee $2 i32.eqz if - i32.const 112 + i32.const 120 return end - local.get $1 - i32.eqz - local.tee $2 + local.get $3 if (result i32) + i32.const 0 + else local.get $0 - i32.load - local.get $4 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.get $1 i32.eq - else - local.get $2 end if local.get $0 return end - local.get $3 - call $~lib/internal/string/allocateUnsafe - local.tee $2 - i32.const 0 + local.get $2 + call $~lib/util/runtime/allocate + local.tee $1 local.get $0 - local.get $1 local.get $3 - call $~lib/internal/string/copyUnsafe + i32.add local.get $2 + call $~lib/memory/memory.copy + local.get $1 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/util/runtime/discard (; 46 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 6928 + i32.le_u + if + i32.const 0 + i32.const 184 + i32.const 115 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 184 + i32.const 117 + i32.const 4 + call $~lib/builtins/abort + unreachable + end ) - (func $~lib/internal/number/dtoa (; 52 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 47 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) local.get $0 f64.const 0 f64.eq if - i32.const 2664 + i32.const 3840 return end local.get $0 @@ -5163,193 +4278,208 @@ local.get $0 f64.ne if - i32.const 2680 + i32.const 3864 return end - i32.const 2696 - i32.const 2720 + i32.const 3888 + i32.const 3928 local.get $0 f64.const 0 f64.lt select return end - i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 56 + call $~lib/util/runtime/allocate local.tee $2 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $1 local.get $2 local.get $1 call $~lib/string/String#substring local.set $1 local.get $2 - i32.eqz - if - i32.const 0 - i32.const 136 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end + call $~lib/util/runtime/discard local.get $1 ) - (func $start:std/string (; 53 ;) (type $FUNCSIG$v) + (func $start:std/string (; 48 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) - i32.const 5360 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset global.get $std/string/str - i32.const 8 + i32.const 24 i32.ne if i32.const 0 - i32.const 48 - i32.const 16 + i32.const 72 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.const 16 i32.ne if i32.const 0 - i32.const 48 - i32.const 18 + i32.const 72 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/string/str - call $~lib/string/String#charCodeAt + block $__inlined_func$~lib/string/String#charCodeAt (result i32) + i32.const -1 + i32.const 0 + global.get $std/string/str + local.tee $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.ge_u + br_if $__inlined_func$~lib/string/String#charCodeAt + drop + local.get $0 + i32.load16_u + end i32.const 104 i32.ne if i32.const 0 - i32.const 48 - i32.const 19 + i32.const 72 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 108 i32.load + i32.const 1 + i32.shr_u if i32.const 0 - i32.const 48 - i32.const 21 + i32.const 72 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 120 + i32.const 124 i32.load + i32.const 1 + i32.shr_u i32.eqz i32.eqz i32.const 1 i32.ne if i32.const 0 - i32.const 48 - i32.const 22 + i32.const 72 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 148 i32.load + i32.const 1 + i32.shr_u i32.eqz i32.eqz i32.const 1 i32.ne if i32.const 0 - i32.const 48 - i32.const 23 + i32.const 72 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 6928 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset i32.const 0 call $~lib/string/String.fromCharCode - i32.const 120 + i32.const 136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 25 + i32.const 72 + i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 192 + i32.const 240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 26 + i32.const 72 + i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 65590 call $~lib/string/String.fromCharCode - i32.const 192 + i32.const 240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 27 + i32.const 72 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 call $~lib/string/String.fromCodePoint - i32.const 120 + i32.const 136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 29 + i32.const 72 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 192 + i32.const 240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 30 + i32.const 72 + i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 119558 call $~lib/string/String.fromCodePoint i32.eqz if - i32.const 200 - i32.const 48 - i32.const 31 + i32.const 312 + i32.const 72 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5357,339 +4487,313 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 33 + i32.const 72 + i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str - local.set $1 - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - i32.const 536870910 - local.set $0 - end - local.get $1 - local.get $0 call $~lib/string/String#endsWith i32.eqz if i32.const 0 - i32.const 48 - i32.const 34 + i32.const 72 + i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 248 + i32.const 416 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.eq if i32.const 0 - i32.const 48 - i32.const 35 + i32.const 72 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 0 - call $~lib/string/String#padStart|trampoline + i32.const 440 + call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 37 + i32.const 72 + i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 15 - call $~lib/string/String#padStart|trampoline + i32.const 440 + call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 38 + i32.const 72 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 112 + i32.const 120 i32.const 3 - call $~lib/string/String#padStart|trampoline - i32.const 272 + i32.const 440 + call $~lib/string/String#padStart + i32.const 464 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 72 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 i32.const 10 - i32.const 112 + i32.const 120 call $~lib/string/String#padStart - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 40 + i32.const 72 + i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 100 - i32.const 112 + i32.const 120 call $~lib/string/String#padStart - i32.const 128 + i32.const 160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 41 + i32.const 72 + i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 288 + i32.const 488 i32.const 5 - call $~lib/string/String#padStart|trampoline - i32.const 304 + i32.const 440 + call $~lib/string/String#padStart + i32.const 512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 42 + i32.const 72 + i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 i32.const 6 - i32.const 320 + i32.const 544 call $~lib/string/String#padStart - i32.const 336 + i32.const 568 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 43 + i32.const 72 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 i32.const 8 - i32.const 320 + i32.const 544 call $~lib/string/String#padStart - i32.const 352 + i32.const 600 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 44 + i32.const 72 + i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 0 - call $~lib/string/String#padEnd|trampoline + i32.const 440 + call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 46 + i32.const 72 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 15 - call $~lib/string/String#padEnd|trampoline + i32.const 440 + call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 + i32.const 72 i32.const 48 - i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 112 + i32.const 120 i32.const 3 - call $~lib/string/String#padEnd|trampoline - i32.const 272 + i32.const 440 + call $~lib/string/String#padEnd + i32.const 464 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 48 + i32.const 72 + i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 i32.const 10 - i32.const 112 + i32.const 120 call $~lib/string/String#padEnd - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 49 + i32.const 72 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 100 - i32.const 112 + i32.const 120 call $~lib/string/String#padEnd - i32.const 128 + i32.const 160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 72 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 288 + i32.const 488 i32.const 5 - call $~lib/string/String#padEnd|trampoline - i32.const 376 + i32.const 440 + call $~lib/string/String#padEnd + i32.const 632 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 51 + i32.const 72 + i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 i32.const 6 - i32.const 288 + i32.const 488 call $~lib/string/String#padEnd - i32.const 392 + i32.const 664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 52 + i32.const 72 + i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 i32.const 8 - i32.const 288 + i32.const 488 call $~lib/string/String#padEnd - i32.const 408 + i32.const 696 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 53 + i32.const 72 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 48 - i32.const 55 + i32.const 72 + i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 208 + i32.const 120 + i32.const 336 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 - i32.const 56 + i32.const 72 + i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 - i32.const 128 + i32.const 160 + i32.const 160 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 48 - i32.const 57 + i32.const 72 + i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -5699,772 +4803,770 @@ call $~lib/string/String#indexOf if i32.const 0 - i32.const 48 - i32.const 58 + i32.const 72 + i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 112 + i32.const 120 i32.const 0 call $~lib/string/String#indexOf if i32.const 0 - i32.const 48 - i32.const 59 + i32.const 72 + i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 0 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 - i32.const 60 + i32.const 72 + i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 440 + i32.const 752 i32.const 0 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 - i32.const 61 + i32.const 72 + i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 2 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 - i32.const 62 + i32.const 72 + i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 3 call $~lib/string/String#indexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 - i32.const 63 + i32.const 72 + i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 448 + i32.const 776 i32.const -1 call $~lib/string/String#indexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 - i32.const 64 + i32.const 72 + i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 112 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 120 + i32.const 120 + i32.const 2147483647 + call $~lib/string/String#lastIndexOf if i32.const 0 - i32.const 48 - i32.const 66 + i32.const 72 + i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 208 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 120 + i32.const 336 + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 - i32.const 67 + i32.const 72 + i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str - i32.const 112 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 120 + i32.const 2147483647 + call $~lib/string/String#lastIndexOf global.get $std/string/str - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 - i32.const 48 - i32.const 68 + i32.const 72 + i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str - i32.const 432 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 728 + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 - i32.const 69 + i32.const 72 + i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str - i32.const 440 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 752 + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 - i32.const 70 + i32.const 72 + i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str - i32.const 464 - call $~lib/string/String#lastIndexOf|trampoline + i32.const 800 + i32.const 2147483647 + call $~lib/string/String#lastIndexOf i32.const 15 i32.ne if i32.const 0 - i32.const 48 - i32.const 71 + i32.const 72 + i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 2 call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 i32.const 72 + i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 3 call $~lib/string/String#lastIndexOf i32.const 2 i32.ne if i32.const 0 - i32.const 48 - i32.const 73 + i32.const 72 + i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 448 + i32.const 776 i32.const -1 call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 - i32.const 74 + i32.const 72 + i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 472 + i32.const 824 i32.const 0 call $~lib/string/String#lastIndexOf i32.const -1 i32.ne if i32.const 0 - i32.const 48 - i32.const 75 + i32.const 72 + i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 208 + i32.const 336 i32.const 0 call $~lib/string/String#lastIndexOf if i32.const 0 - i32.const 48 - i32.const 76 + i32.const 72 + i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 480 - call $~lib/internal/string/parse + i32.const 848 + call $~lib/util/string/parse f64.const 0 f64.ne if i32.const 0 - i32.const 48 - i32.const 82 + i32.const 72 + i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 488 - call $~lib/internal/string/parse + i32.const 872 + call $~lib/util/string/parse f64.const 1 f64.ne if i32.const 0 - i32.const 48 - i32.const 83 + i32.const 72 + i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 496 - call $~lib/internal/string/parse + i32.const 896 + call $~lib/util/string/parse f64.const 5 f64.ne if i32.const 0 - i32.const 48 - i32.const 84 + i32.const 72 + i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 512 - call $~lib/internal/string/parse + i32.const 928 + call $~lib/util/string/parse f64.const 455 f64.ne if i32.const 0 - i32.const 48 - i32.const 85 + i32.const 72 + i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 528 - call $~lib/internal/string/parse + i32.const 960 + call $~lib/util/string/parse f64.const 3855 f64.ne if i32.const 0 - i32.const 48 - i32.const 86 + i32.const 72 + i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 544 - call $~lib/internal/string/parse + i32.const 992 + call $~lib/util/string/parse f64.const 3855 f64.ne if i32.const 0 - i32.const 48 - i32.const 87 + i32.const 72 + i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 560 - call $~lib/internal/string/parse + i32.const 1024 + call $~lib/util/string/parse f64.const 11 f64.ne if i32.const 0 - i32.const 48 - i32.const 88 + i32.const 72 + i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 576 - call $~lib/internal/string/parse + i32.const 1048 + call $~lib/util/string/parse f64.const 1 f64.ne if i32.const 0 - i32.const 48 - i32.const 89 + i32.const 72 + i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 480 + i32.const 848 call $~lib/string/parseFloat f64.const 0 f64.ne if i32.const 0 - i32.const 48 - i32.const 91 + i32.const 72 + i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 488 + i32.const 872 call $~lib/string/parseFloat f64.const 1 f64.ne if i32.const 0 - i32.const 48 - i32.const 92 + i32.const 72 + i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 592 + i32.const 1072 call $~lib/string/parseFloat f64.const 0.1 f64.ne if i32.const 0 - i32.const 48 - i32.const 93 + i32.const 72 + i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 608 + i32.const 1096 call $~lib/string/parseFloat f64.const 0.25 f64.ne if i32.const 0 - i32.const 48 - i32.const 94 + i32.const 72 + i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 624 + i32.const 1120 call $~lib/string/parseFloat f64.const 0.1 f64.ne if i32.const 0 - i32.const 48 - i32.const 95 + i32.const 72 + i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 - i32.const 648 + i32.const 160 + i32.const 1152 call $~lib/string/String.__concat global.set $std/string/c global.get $std/string/c - i32.const 656 + i32.const 1176 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 98 + i32.const 72 + i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/c - i32.const 128 + i32.const 160 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 99 + i32.const 72 + i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 100 + i32.const 72 + i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 global.get $std/string/nullStr call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 101 + i32.const 72 + i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/nullStr - i32.const 112 + i32.const 120 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 102 + i32.const 72 + i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 - i32.const 648 + i32.const 160 + i32.const 1152 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 103 + i32.const 72 + i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 - i32.const 128 + i32.const 160 + i32.const 160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 104 + i32.const 72 + i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 664 - i32.const 680 + i32.const 1200 + i32.const 1224 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 105 + i32.const 72 + i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 664 - i32.const 664 + i32.const 1200 + i32.const 1200 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 106 + i32.const 72 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 696 - i32.const 712 + i32.const 1248 + i32.const 1272 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 107 + i32.const 72 + i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 728 - i32.const 744 + i32.const 1296 + i32.const 1328 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 108 + i32.const 72 + i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 760 - i32.const 760 + i32.const 1360 + i32.const 1360 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 109 + i32.const 72 + i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 760 - i32.const 784 + i32.const 1360 + i32.const 1392 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 110 + i32.const 72 + i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 808 - i32.const 840 + i32.const 1424 + i32.const 1464 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 111 + i32.const 72 + i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 648 - i32.const 128 + i32.const 1152 + i32.const 160 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 48 - i32.const 113 + i32.const 72 + i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 864 - i32.const 128 + i32.const 1504 + i32.const 160 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 48 - i32.const 114 - i32.const 0 - call $~lib/env/abort + i32.const 72 + i32.const 115 + i32.const 0 + call $~lib/builtins/abort unreachable end - i32.const 864 - i32.const 872 + i32.const 1504 + i32.const 1528 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 48 - i32.const 115 + i32.const 72 + i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 864 - i32.const 656 + i32.const 1504 + i32.const 1176 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 48 - i32.const 116 + i32.const 72 + i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 864 - i32.const 656 + i32.const 1504 + i32.const 1176 call $~lib/string/String.__lt if i32.const 0 - i32.const 48 - i32.const 117 + i32.const 72 + i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 648 + i32.const 1152 global.get $std/string/nullStr call $~lib/string/String.__lt if i32.const 0 - i32.const 48 - i32.const 119 + i32.const 72 + i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/nullStr - i32.const 648 + i32.const 1152 call $~lib/string/String.__lt if i32.const 0 - i32.const 48 - i32.const 120 + i32.const 72 + i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 48 - i32.const 122 + i32.const 72 + i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 288 + i32.const 120 + i32.const 488 call $~lib/string/String.__lt i32.eqz if i32.const 0 - i32.const 48 - i32.const 123 + i32.const 72 + i32.const 124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 48 - i32.const 124 + i32.const 72 + i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 call $~lib/string/String.__lte i32.eqz if i32.const 0 - i32.const 48 - i32.const 125 + i32.const 72 + i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 call $~lib/string/String.__lt if i32.const 0 - i32.const 48 - i32.const 126 + i32.const 72 + i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 288 + i32.const 120 + i32.const 488 call $~lib/string/String.__gt if i32.const 0 - i32.const 48 - i32.const 127 + i32.const 72 + i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__lt if i32.const 0 - i32.const 48 - i32.const 128 + i32.const 72 + i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__gt if i32.const 0 - i32.const 48 - i32.const 129 + i32.const 72 + i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 48 - i32.const 130 + i32.const 72 + i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 call $~lib/string/String.__lte i32.eqz if i32.const 0 - i32.const 48 - i32.const 131 + i32.const 72 + i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 65377 @@ -6482,2541 +5584,2218 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 135 + i32.const 72 + i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 320 + i32.const 532 i32.load + i32.const 1 + i32.shr_u i32.const 3 i32.ne if i32.const 0 - i32.const 48 - i32.const 137 + i32.const 72 + i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 i32.const 100 call $~lib/string/String#repeat - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 139 + i32.const 72 + i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 0 call $~lib/string/String#repeat - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 140 + i32.const 72 + i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 1 call $~lib/string/String#repeat - i32.const 128 + i32.const 160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 141 + i32.const 72 + i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 2 call $~lib/string/String#repeat - i32.const 872 + i32.const 1528 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 142 + i32.const 72 + i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 3 call $~lib/string/String#repeat - i32.const 880 + i32.const 1552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 143 + i32.const 72 + i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 656 + i32.const 1176 i32.const 4 call $~lib/string/String#repeat - i32.const 896 + i32.const 1576 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 144 + i32.const 72 + i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 5 call $~lib/string/String#repeat - i32.const 920 + i32.const 1608 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 145 + i32.const 72 + i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 6 call $~lib/string/String#repeat - i32.const 936 + i32.const 1640 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 146 + i32.const 72 + i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 7 call $~lib/string/String#repeat - i32.const 952 + i32.const 1672 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 147 + i32.const 72 + i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 976 + i32.const 1704 global.set $std/string/str - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const 0 - call $~lib/string/String#slice|trampoline - i32.const 976 + i32.const 2147483647 + call $~lib/string/String#slice + i32.const 1704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 151 + i32.const 72 + i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const -1 - call $~lib/string/String#slice|trampoline - i32.const 1008 + i32.const 2147483647 + call $~lib/string/String#slice + i32.const 1752 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 152 + i32.const 72 + i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/string/str i32.const -5 - call $~lib/string/String#slice|trampoline - i32.const 1016 + i32.const 2147483647 + call $~lib/string/String#slice + i32.const 1776 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 153 + i32.const 72 + i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str i32.const 2 i32.const 7 call $~lib/string/String#slice - i32.const 1032 + i32.const 1808 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 154 + i32.const 72 + i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str i32.const -11 i32.const -6 call $~lib/string/String#slice - i32.const 1048 + i32.const 1840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 155 + i32.const 72 + i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str i32.const 4 i32.const 3 call $~lib/string/String#slice - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 156 + i32.const 72 + i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str i32.const 0 i32.const -1 call $~lib/string/String#slice - i32.const 1064 + i32.const 1872 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 157 + i32.const 72 + i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 120 i32.const 0 - global.set $~lib/argc - i32.const 112 - i32.const 0 - call $~lib/string/String#split|trampoline + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq - local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 112 + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 120 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 162 + i32.const 72 + i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 112 - call $~lib/string/String#split|trampoline + i32.const 120 + i32.const 120 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 48 - i32.const 164 + i32.const 72 + i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + i32.const 120 + i32.const 728 + i32.const 2147483647 + call $~lib/string/String#split + global.set $std/string/sa + global.get $std/string/sa + i32.load offset=12 i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 432 - call $~lib/string/String#split|trampoline + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 120 + call $~lib/string/String.__eq + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 167 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1968 + i32.const 2000 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq - local.tee $0 if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1968 + call $~lib/string/String.__eq + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 169 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + i32.const 1968 + i32.const 728 + i32.const 2147483647 + call $~lib/string/String#split + global.set $std/string/sa + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 112 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 166 + i32.const 72 + i32.const 171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1192 - i32.const 1208 - call $~lib/string/String#split|trampoline + i32.const 2048 + i32.const 2080 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 - i32.const 1 + i32.load offset=12 + i32.const 3 i32.eq - local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 1192 + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 call $~lib/string/String.__eq else - local.get $0 - end - i32.eqz - if - i32.const 0 - i32.const 48 - i32.const 168 i32.const 0 - call $~lib/env/abort - unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1192 - i32.const 432 - call $~lib/string/String#split|trampoline - global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 3 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 170 + i32.const 72 + i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1224 - i32.const 1248 - call $~lib/string/String#split|trampoline + i32.const 2104 + i32.const 728 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 3 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 4 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 120 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 3 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 + call $~lib/string/String.__eq + else + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 172 + i32.const 72 + i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1256 - i32.const 432 - call $~lib/string/String#split|trampoline + i32.const 2136 + i32.const 728 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 4 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 2 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 112 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 4 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 120 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 call $~lib/string/String.__eq else - local.get $0 - end - i32.eqz - if - i32.const 0 - i32.const 48 - i32.const 174 i32.const 0 - call $~lib/env/abort - unreachable - end - i32.const 1 - global.set $~lib/argc - i32.const 1272 - i32.const 432 - call $~lib/string/String#split|trampoline - global.set $std/string/sa - block (result i32) - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 4 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 112 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 2 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 + i32.const 3 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 176 + i32.const 72 + i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 1288 - i32.const 432 - call $~lib/string/String#split|trampoline + i32.const 2168 + i32.const 728 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 4 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 2 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 4 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 end if (result i32) - i32.const 3 global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 12 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 112 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 3 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 120 + call $~lib/string/String.__eq + else + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 178 + i32.const 72 + i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc - i32.const 288 - i32.const 112 - call $~lib/string/String#split|trampoline + i32.const 488 + i32.const 120 + i32.const 2147483647 + call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 3 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 180 + i32.const 72 + i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 i32.const 0 call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 if i32.const 0 - i32.const 48 - i32.const 182 + i32.const 72 + i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 i32.const 1 call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq - local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 184 + i32.const 72 + i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1192 - i32.const 432 + i32.const 1968 + i32.const 728 i32.const 1 call $~lib/string/String#split global.set $std/string/sa global.get $std/string/sa - i32.load offset=4 + i32.load offset=12 i32.const 1 i32.eq - local.tee $0 if (result i32) - i32.const 0 global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 186 + i32.const 72 + i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 i32.const 4 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 3 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 188 + i32.const 72 + i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 3 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 190 + i32.const 72 + i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1192 - i32.const 432 + i32.const 1968 + i32.const 728 i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block (result i32) - block (result i32) - global.get $std/string/sa - i32.load offset=4 - i32.const 3 - i32.eq - local.tee $0 - if - i32.const 0 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i32.const 128 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 - end - if - i32.const 1 - global.get $std/string/sa - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 648 - call $~lib/string/String.__eq - local.set $0 - end - local.get $0 + global.get $std/string/sa + i32.load offset=12 + i32.const 3 + i32.eq + if (result i32) + global.get $std/string/sa + i32.const 0 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 160 + call $~lib/string/String.__eq + else + i32.const 0 + end + if (result i32) + global.get $std/string/sa + i32.const 1 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 1152 + call $~lib/string/String.__eq + else + i32.const 0 end if (result i32) - i32.const 2 global.get $std/string/sa - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 1216 + call $~lib/array/Array<~lib/string/String>#__get + i32.const 2024 call $~lib/string/String.__eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 192 + i32.const 72 + i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - call $~lib/internal/number/itoa32 - i32.const 480 + call $~lib/util/number/itoa32 + i32.const 848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 194 + i32.const 72 + i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 - call $~lib/internal/number/itoa32 - i32.const 488 + call $~lib/util/number/itoa32 + i32.const 872 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 195 + i32.const 72 + i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 - call $~lib/internal/number/itoa32 - i32.const 1824 + call $~lib/util/number/itoa32 + i32.const 2648 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 196 + i32.const 72 + i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123 - call $~lib/internal/number/itoa32 - i32.const 320 + call $~lib/util/number/itoa32 + i32.const 544 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 197 + i32.const 72 + i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1000 - call $~lib/internal/number/itoa32 - i32.const 1832 + call $~lib/util/number/itoa32 + i32.const 2672 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 198 + i32.const 72 + i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1234 - call $~lib/internal/number/itoa32 - i32.const 1848 + call $~lib/util/number/itoa32 + i32.const 2704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 199 + i32.const 72 + i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 12345 - call $~lib/internal/number/itoa32 - i32.const 1864 + call $~lib/util/number/itoa32 + i32.const 2728 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 200 + i32.const 72 + i32.const 201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123456 - call $~lib/internal/number/itoa32 - i32.const 1880 + call $~lib/util/number/itoa32 + i32.const 2760 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 201 + i32.const 72 + i32.const 202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1111111 - call $~lib/internal/number/itoa32 - i32.const 1896 + call $~lib/util/number/itoa32 + i32.const 2792 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 202 + i32.const 72 + i32.const 203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1234567 - call $~lib/internal/number/itoa32 - i32.const 1920 + call $~lib/util/number/itoa32 + i32.const 2824 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 203 + i32.const 72 + i32.const 204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483646 - call $~lib/internal/number/itoa32 - i32.const 1944 + call $~lib/util/number/itoa32 + i32.const 2856 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 204 + i32.const 72 + i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483647 - call $~lib/internal/number/itoa32 - i32.const 1968 + call $~lib/util/number/itoa32 + i32.const 2896 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 205 + i32.const 72 + i32.const 206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2147483648 - call $~lib/internal/number/itoa32 - i32.const 1992 + call $~lib/util/number/itoa32 + i32.const 2936 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 206 + i32.const 72 + i32.const 207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 - call $~lib/internal/number/itoa32 - i32.const 2024 + call $~lib/util/number/itoa32 + i32.const 2976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 207 + i32.const 72 + i32.const 208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - call $~lib/internal/number/utoa32 - i32.const 480 + call $~lib/util/number/utoa32 + i32.const 848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 209 + i32.const 72 + i32.const 210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1000 - call $~lib/internal/number/utoa32 - i32.const 2032 + call $~lib/util/number/utoa32 + i32.const 3000 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 210 + i32.const 72 + i32.const 211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483647 - call $~lib/internal/number/utoa32 - i32.const 1968 + call $~lib/util/number/utoa32 + i32.const 2896 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 211 + i32.const 72 + i32.const 212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2147483648 - call $~lib/internal/number/utoa32 - i32.const 2048 + call $~lib/util/number/utoa32 + i32.const 3024 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 212 + i32.const 72 + i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 - call $~lib/internal/number/utoa32 - i32.const 2072 + call $~lib/util/number/utoa32 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 213 + i32.const 72 + i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 - call $~lib/internal/number/utoa64 - i32.const 480 + call $~lib/util/number/utoa64 + i32.const 848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 215 + i32.const 72 + i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1234 - call $~lib/internal/number/utoa64 - i32.const 1848 + call $~lib/util/number/utoa64 + i32.const 2704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 216 + i32.const 72 + i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 99999999 - call $~lib/internal/number/utoa64 - i32.const 2096 + call $~lib/util/number/utoa64 + i32.const 3104 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 217 + i32.const 72 + i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 100000000 - call $~lib/internal/number/utoa64 - i32.const 2120 + call $~lib/util/number/utoa64 + i32.const 3136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 218 + i32.const 72 + i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967295 - call $~lib/internal/number/utoa64 - i32.const 2072 + call $~lib/util/number/utoa64 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 219 + i32.const 72 + i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 68719476735 - call $~lib/internal/number/utoa64 - i32.const 2144 + call $~lib/util/number/utoa64 + i32.const 3176 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 220 + i32.const 72 + i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 868719476735 - call $~lib/internal/number/utoa64 - i32.const 2176 + call $~lib/util/number/utoa64 + i32.const 3216 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 221 + i32.const 72 + i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2208 + call $~lib/util/number/utoa64 + i32.const 3256 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 222 + i32.const 72 + i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 9999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2248 + call $~lib/util/number/utoa64 + i32.const 3304 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 223 + i32.const 72 + i32.const 224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 19999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2288 + call $~lib/util/number/utoa64 + i32.const 3352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 224 + i32.const 72 + i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1 - call $~lib/internal/number/utoa64 - i32.const 2328 + call $~lib/util/number/utoa64 + i32.const 3408 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 225 + i32.const 72 + i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 - call $~lib/internal/number/itoa64 - i32.const 480 + call $~lib/util/number/itoa64 + i32.const 848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 227 + i32.const 72 + i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1234 - call $~lib/internal/number/itoa64 - i32.const 2376 + call $~lib/util/number/itoa64 + i32.const 3464 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 228 + i32.const 72 + i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967295 - call $~lib/internal/number/itoa64 - i32.const 2072 + call $~lib/util/number/itoa64 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 229 + i32.const 72 + i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4294967295 - call $~lib/internal/number/itoa64 - i32.const 2392 + call $~lib/util/number/itoa64 + i32.const 3496 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 230 + i32.const 72 + i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 68719476735 - call $~lib/internal/number/itoa64 - i32.const 2144 + call $~lib/util/number/itoa64 + i32.const 3176 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 231 + i32.const 72 + i32.const 232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -68719476735 - call $~lib/internal/number/itoa64 - i32.const 2424 + call $~lib/util/number/itoa64 + i32.const 3536 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 232 + i32.const 72 + i32.const 233 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -868719476735 - call $~lib/internal/number/itoa64 - i32.const 2456 + call $~lib/util/number/itoa64 + i32.const 3576 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 233 + i32.const 72 + i32.const 234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2488 + call $~lib/util/number/itoa64 + i32.const 3624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 234 + i32.const 72 + i32.const 235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -19999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2528 + call $~lib/util/number/itoa64 + i32.const 3672 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 235 + i32.const 72 + i32.const 236 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 9223372036854775807 - call $~lib/internal/number/itoa64 - i32.const 2568 + call $~lib/util/number/itoa64 + i32.const 3728 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 236 + i32.const 72 + i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -9223372036854775808 - call $~lib/internal/number/itoa64 - i32.const 2616 + call $~lib/util/number/itoa64 + i32.const 3784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 237 + i32.const 72 + i32.const 238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 2664 + call $~lib/util/number/dtoa + i32.const 3840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 240 + i32.const 72 + i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 - call $~lib/internal/number/dtoa - i32.const 2664 + call $~lib/util/number/dtoa + i32.const 3840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 241 + i32.const 72 + i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 - call $~lib/internal/number/dtoa - i32.const 2680 + call $~lib/util/number/dtoa + i32.const 3864 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 242 + i32.const 72 + i32.const 243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 2720 + call $~lib/util/number/dtoa + i32.const 3928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 243 + i32.const 72 + i32.const 244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 2696 + call $~lib/util/number/dtoa + i32.const 3888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 244 + i32.const 72 + i32.const 245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.220446049250313e-16 - call $~lib/internal/number/dtoa - i32.const 4112 + call $~lib/util/number/dtoa + i32.const 5016 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 245 + i32.const 72 + i32.const 246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -2.220446049250313e-16 - call $~lib/internal/number/dtoa - i32.const 4160 + call $~lib/util/number/dtoa + i32.const 5080 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 246 + i32.const 72 + i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1797693134862315708145274e284 - call $~lib/internal/number/dtoa - i32.const 4208 + call $~lib/util/number/dtoa + i32.const 5144 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 247 + i32.const 72 + i32.const 248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1797693134862315708145274e284 - call $~lib/internal/number/dtoa - i32.const 4264 + call $~lib/util/number/dtoa + i32.const 5208 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 248 + i32.const 72 + i32.const 249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4185580496821356722454785e274 - call $~lib/internal/number/dtoa - i32.const 4320 + call $~lib/util/number/dtoa + i32.const 5272 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 249 + i32.const 72 + i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072014e-308 - call $~lib/internal/number/dtoa - i32.const 4368 + call $~lib/util/number/dtoa + i32.const 5336 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 250 + i32.const 72 + i32.const 251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.940656e-318 - call $~lib/internal/number/dtoa - i32.const 4424 + call $~lib/util/number/dtoa + i32.const 5400 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 253 + i32.const 72 + i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9060801153433600 - call $~lib/internal/number/dtoa - i32.const 4456 + call $~lib/util/number/dtoa + i32.const 5448 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 254 + i32.const 72 + i32.const 255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4708356024711512064 - call $~lib/internal/number/dtoa - i32.const 4496 + call $~lib/util/number/dtoa + i32.const 5504 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 255 + i32.const 72 + i32.const 256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9409340012568248320 - call $~lib/internal/number/dtoa - i32.const 4544 + call $~lib/util/number/dtoa + i32.const 5568 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 256 + i32.const 72 + i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 - call $~lib/internal/number/dtoa - i32.const 4592 + call $~lib/util/number/dtoa + i32.const 5632 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 257 + i32.const 72 + i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 4608 + call $~lib/util/number/dtoa + i32.const 5664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 263 + i32.const 72 + i32.const 264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.1 - call $~lib/internal/number/dtoa - i32.const 592 + call $~lib/util/number/dtoa + i32.const 1072 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 264 + i32.const 72 + i32.const 265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 - call $~lib/internal/number/dtoa - i32.const 4624 + call $~lib/util/number/dtoa + i32.const 5688 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 265 + i32.const 72 + i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.1 - call $~lib/internal/number/dtoa - i32.const 4640 + call $~lib/util/number/dtoa + i32.const 5712 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 266 + i32.const 72 + i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e6 - call $~lib/internal/number/dtoa - i32.const 4656 + call $~lib/util/number/dtoa + i32.const 5736 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 268 + i32.const 72 + i32.const 269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-06 - call $~lib/internal/number/dtoa - i32.const 4680 + call $~lib/util/number/dtoa + i32.const 5776 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 269 + i32.const 72 + i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e6 - call $~lib/internal/number/dtoa - i32.const 4704 + call $~lib/util/number/dtoa + i32.const 5808 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 270 + i32.const 72 + i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-06 - call $~lib/internal/number/dtoa - i32.const 4728 + call $~lib/util/number/dtoa + i32.const 5848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 271 + i32.const 72 + i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e7 - call $~lib/internal/number/dtoa - i32.const 4752 + call $~lib/util/number/dtoa + i32.const 5888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 272 + i32.const 72 + i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-07 - call $~lib/internal/number/dtoa - i32.const 4776 + call $~lib/util/number/dtoa + i32.const 5928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 273 + i32.const 72 + i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+308 - call $~lib/internal/number/dtoa - i32.const 4792 + call $~lib/util/number/dtoa + i32.const 5952 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 275 + i32.const 72 + i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.e+308 - call $~lib/internal/number/dtoa - i32.const 4808 + call $~lib/util/number/dtoa + i32.const 5984 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 276 + i32.const 72 + i32.const 277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 2720 + call $~lib/util/number/dtoa + i32.const 3928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 277 + i32.const 72 + i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 2696 + call $~lib/util/number/dtoa + i32.const 3888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 278 + i32.const 72 + i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-308 - call $~lib/internal/number/dtoa - i32.const 4832 + call $~lib/util/number/dtoa + i32.const 6016 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 279 + i32.const 72 + i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-308 - call $~lib/internal/number/dtoa - i32.const 4848 + call $~lib/util/number/dtoa + i32.const 6048 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 280 + i32.const 72 + i32.const 281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-323 - call $~lib/internal/number/dtoa - i32.const 4872 + call $~lib/util/number/dtoa + i32.const 6080 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 281 + i32.const 72 + i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-323 - call $~lib/internal/number/dtoa - i32.const 4888 + call $~lib/util/number/dtoa + i32.const 6112 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 282 + i32.const 72 + i32.const 283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 2664 + call $~lib/util/number/dtoa + i32.const 3840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 283 + i32.const 72 + i32.const 284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967272 - call $~lib/internal/number/dtoa - i32.const 4912 + call $~lib/util/number/dtoa + i32.const 6144 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 285 + i32.const 72 + i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.2312145673456234e-08 - call $~lib/internal/number/dtoa - i32.const 4944 + call $~lib/util/number/dtoa + i32.const 6184 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 286 + i32.const 72 + i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 555555555.5555556 - call $~lib/internal/number/dtoa - i32.const 4992 + call $~lib/util/number/dtoa + i32.const 6248 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 288 + i32.const 72 + i32.const 289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 - call $~lib/internal/number/dtoa - i32.const 5032 + call $~lib/util/number/dtoa + i32.const 6304 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 289 + i32.const 72 + i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 4608 + call $~lib/util/number/dtoa + i32.const 5664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 290 + i32.const 72 + i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 12.34 - call $~lib/internal/number/dtoa - i32.const 5072 + call $~lib/util/number/dtoa + i32.const 6360 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 291 + i32.const 72 + i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.3333333333333333 - call $~lib/internal/number/dtoa - i32.const 5088 + call $~lib/util/number/dtoa + i32.const 6392 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 293 + i32.const 72 + i32.const 294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1234e17 - call $~lib/internal/number/dtoa - i32.const 5128 + call $~lib/util/number/dtoa + i32.const 6448 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 294 + i32.const 72 + i32.const 295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1234e18 - call $~lib/internal/number/dtoa - i32.const 5184 + call $~lib/util/number/dtoa + i32.const 6512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 295 + i32.const 72 + i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.71828 - call $~lib/internal/number/dtoa - i32.const 5208 + call $~lib/util/number/dtoa + i32.const 6552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 296 + i32.const 72 + i32.const 297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.0271828 - call $~lib/internal/number/dtoa - i32.const 5232 + call $~lib/util/number/dtoa + i32.const 6584 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 297 + i32.const 72 + i32.const 298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 271.828 - call $~lib/internal/number/dtoa - i32.const 5256 + call $~lib/util/number/dtoa + i32.const 6624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 298 + i32.const 72 + i32.const 299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1e+128 - call $~lib/internal/number/dtoa - i32.const 5280 + call $~lib/util/number/dtoa + i32.const 6656 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 299 + i32.const 72 + i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1e-64 - call $~lib/internal/number/dtoa - i32.const 5304 + call $~lib/util/number/dtoa + i32.const 6688 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 300 + i32.const 72 + i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.000035689 - call $~lib/internal/number/dtoa - i32.const 5328 + call $~lib/util/number/dtoa + i32.const 6720 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 301 + i32.const 72 + i32.const 302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/string/getString (; 54 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 49 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 55 ;) (type $FUNCSIG$v) - call $start:std/string + (func $~lib/runtime/runtime.instanceof (; 50 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 6744 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 6744 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 6744 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 6744 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 52 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 54 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 55 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + if (result i32) + local.get $2 + i32.const 6744 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 6744 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 56 ;) (type $FUNCSIG$vi) (param $0 i32) + nop ) - (func $null (; 56 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 57 ;) (type $FUNCSIG$v) nop ) + (func $start (; 58 ;) (type $FUNCSIG$v) + call $start:std/string + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) ) diff --git a/tests/compiler/std/string.ts b/tests/compiler/std/string.ts index 2393c27a3b..70c1760055 100644 --- a/tests/compiler/std/string.ts +++ b/tests/compiler/std/string.ts @@ -1,11 +1,12 @@ -import "allocator/arena"; +import "collector/dummy"; + import { utoa32, itoa32, utoa64, itoa64, dtoa -} from "internal/number"; +} from "util/number"; // preliminary diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index be9c7aed6d..93d8323d34 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -1,237 +1,237 @@ (module - (type $FUNCSIG$v (func)) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result 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))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$di (func (param i32) (result f64))) - (type $FUNCSIG$vi (func (param i32))) + (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$ij (func (param i64) (result i32))) (type $FUNCSIG$viji (func (param i32 i64 i32))) (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$iid (func (param i32 f64) (result i32))) + (type $FUNCSIG$jii (func (param i32 i32) (result i64))) (type $FUNCSIG$iijijiji (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\10\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g\00") - (data (i32.const 48) "\0d\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 80) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 112) "\00\00\00\00") - (data (i32.const 120) "\01\00\00\00\00\00") - (data (i32.const 128) "\01\00\00\00a\00") - (data (i32.const 136) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 192) "\01\00\00\006\00") - (data (i32.const 200) "\02\00\00\004\d8\06\df") - (data (i32.const 208) "\02\00\00\00h\00i\00") - (data (i32.const 216) "\04\00\00\00n\00u\00l\00l\00") - (data (i32.const 232) "\06\00\00\00s\00t\00r\00i\00n\00g\00") - (data (i32.const 248) "\03\00\00\00I\00\'\00m\00") - (data (i32.const 264) "\01\00\00\00 \00") - (data (i32.const 272) "\03\00\00\00 \00 \00 \00") - (data (i32.const 288) "\03\00\00\00a\00b\00c\00") - (data (i32.const 304) "\05\00\00\00 \00 \00a\00b\00c\00") - (data (i32.const 320) "\03\00\00\001\002\003\00") - (data (i32.const 336) "\06\00\00\001\002\003\00a\00b\00c\00") - (data (i32.const 352) "\08\00\00\001\002\003\001\002\00a\00b\00c\00") - (data (i32.const 376) "\05\00\00\00a\00b\00c\00 \00 \00") - (data (i32.const 392) "\06\00\00\00a\00b\00c\00a\00b\00c\00") - (data (i32.const 408) "\08\00\00\00a\00b\00c\00a\00b\00c\00a\00b\00") - (data (i32.const 432) "\01\00\00\00,\00") - (data (i32.const 440) "\01\00\00\00x\00") - (data (i32.const 448) "\03\00\00\00,\00 \00I\00") - (data (i32.const 464) "\01\00\00\00g\00") - (data (i32.const 472) "\01\00\00\00i\00") - (data (i32.const 480) "\01\00\00\000\00") - (data (i32.const 488) "\01\00\00\001\00") - (data (i32.const 496) "\05\00\00\000\00b\001\000\001\00") - (data (i32.const 512) "\05\00\00\000\00o\007\000\007\00") - (data (i32.const 528) "\05\00\00\000\00x\00f\000\00f\00") - (data (i32.const 544) "\05\00\00\000\00x\00F\000\00F\00") - (data (i32.const 560) "\03\00\00\000\001\001\00") - (data (i32.const 576) "\04\00\00\000\00x\001\00g\00") - (data (i32.const 592) "\03\00\00\000\00.\001\00") - (data (i32.const 608) "\03\00\00\00.\002\005\00") - (data (i32.const 624) "\08\00\00\00.\001\00f\00o\00o\00b\00a\00r\00") - (data (i32.const 648) "\01\00\00\00b\00") - (data (i32.const 656) "\02\00\00\00a\00b\00") - (data (i32.const 664) "\04\00\00\00k\00e\00y\001\00") - (data (i32.const 680) "\04\00\00\00k\00e\00y\002\00") - (data (i32.const 696) "\03\00\00\00k\00e\001\00") - (data (i32.const 712) "\03\00\00\00k\00e\002\00") - (data (i32.const 728) "\05\00\00\00k\00e\00y\001\002\00") - (data (i32.const 744) "\05\00\00\00k\00e\00y\001\001\00") - (data (i32.const 760) "\07\00\00\00\a40\ed0\cf0\cb0\db0\d80\c80") - (data (i32.const 784) "\07\00\00\00\a60\f00\ce0\aa0\af0\e40\de0") - (data (i32.const 808) "\0b\00\00\00D\00\19 f\00h\00u\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 840) "\n\00\00\00D\00\19 \1f\1eu\00a\00s\00c\00a\00i\00l\00") - (data (i32.const 864) "\02\00\00\00b\00a\00") - (data (i32.const 872) "\02\00\00\00a\00a\00") - (data (i32.const 880) "\03\00\00\00a\00a\00a\00") - (data (i32.const 896) "\08\00\00\00a\00b\00a\00b\00a\00b\00a\00b\00") - (data (i32.const 920) "\05\00\00\00a\00a\00a\00a\00a\00") - (data (i32.const 936) "\06\00\00\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 952) "\07\00\00\00a\00a\00a\00a\00a\00a\00a\00") - (data (i32.const 976) "\0e\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00n\00") - (data (i32.const 1008) "\01\00\00\00n\00") - (data (i32.const 1016) "\05\00\00\00j\00k\00l\00m\00n\00") - (data (i32.const 1032) "\05\00\00\00c\00d\00e\00f\00g\00") - (data (i32.const 1048) "\05\00\00\00d\00e\00f\00g\00h\00") - (data (i32.const 1064) "\0d\00\00\00a\00b\00c\00d\00e\00f\00g\00h\00i\00j\00k\00l\00m\00") - (data (i32.const 1096) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 1128) "\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") - (data (i32.const 1192) "\05\00\00\00a\00,\00b\00,\00c\00") - (data (i32.const 1208) "\01\00\00\00.\00") - (data (i32.const 1216) "\01\00\00\00c\00") - (data (i32.const 1224) "\07\00\00\00a\00,\00 \00b\00,\00 \00c\00") - (data (i32.const 1248) "\02\00\00\00,\00 \00") - (data (i32.const 1256) "\06\00\00\00a\00,\00b\00,\00,\00c\00") - (data (i32.const 1272) "\06\00\00\00,\00a\00,\00b\00,\00c\00") - (data (i32.const 1288) "\06\00\00\00a\00,\00b\00,\00c\00,\00") - (data (i32.const 1304) "\90\01\00\00\00\00\00\000\000\000\001\000\002\000\003\000\004\000\005\000\006\000\007\000\008\000\009\001\000\001\001\001\002\001\003\001\004\001\005\001\006\001\007\001\008\001\009\002\000\002\001\002\002\002\003\002\004\002\005\002\006\002\007\002\008\002\009\003\000\003\001\003\002\003\003\003\004\003\005\003\006\003\007\003\008\003\009\004\000\004\001\004\002\004\003\004\004\004\005\004\006\004\007\004\008\004\009\005\000\005\001\005\002\005\003\005\004\005\005\005\006\005\007\005\008\005\009\006\000\006\001\006\002\006\003\006\004\006\005\006\006\006\007\006\008\006\009\007\000\007\001\007\002\007\003\007\004\007\005\007\006\007\007\007\008\007\009\008\000\008\001\008\002\008\003\008\004\008\005\008\006\008\007\008\008\008\009\009\000\009\001\009\002\009\003\009\004\009\005\009\006\009\007\009\008\009\009\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1816) "\18\05\00\00d\00\00\00") - (data (i32.const 1824) "\01\00\00\008\00") - (data (i32.const 1832) "\05\00\00\00-\001\000\000\000\00") - (data (i32.const 1848) "\04\00\00\001\002\003\004\00") - (data (i32.const 1864) "\05\00\00\001\002\003\004\005\00") - (data (i32.const 1880) "\06\00\00\001\002\003\004\005\006\00") - (data (i32.const 1896) "\07\00\00\001\001\001\001\001\001\001\00") - (data (i32.const 1920) "\07\00\00\001\002\003\004\005\006\007\00") - (data (i32.const 1944) "\n\00\00\002\001\004\007\004\008\003\006\004\006\00") - (data (i32.const 1968) "\n\00\00\002\001\004\007\004\008\003\006\004\007\00") - (data (i32.const 1992) "\0b\00\00\00-\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2024) "\02\00\00\00-\001\00") - (data (i32.const 2032) "\04\00\00\001\000\000\000\00") - (data (i32.const 2048) "\n\00\00\002\001\004\007\004\008\003\006\004\008\00") - (data (i32.const 2072) "\n\00\00\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2096) "\08\00\00\009\009\009\009\009\009\009\009\00") - (data (i32.const 2120) "\t\00\00\001\000\000\000\000\000\000\000\000\00") - (data (i32.const 2144) "\0b\00\00\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2176) "\0c\00\00\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2208) "\0f\00\00\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2248) "\10\00\00\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2288) "\11\00\00\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2328) "\14\00\00\001\008\004\004\006\007\004\004\000\007\003\007\000\009\005\005\001\006\001\005\00") - (data (i32.const 2376) "\05\00\00\00-\001\002\003\004\00") - (data (i32.const 2392) "\0b\00\00\00-\004\002\009\004\009\006\007\002\009\005\00") - (data (i32.const 2424) "\0c\00\00\00-\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2456) "\0d\00\00\00-\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2488) "\10\00\00\00-\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2528) "\12\00\00\00-\001\009\009\009\009\008\006\008\007\001\009\004\007\006\007\003\005\00") - (data (i32.const 2568) "\13\00\00\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\007\00") - (data (i32.const 2616) "\14\00\00\00-\009\002\002\003\003\007\002\000\003\006\008\005\004\007\007\005\008\000\008\00") - (data (i32.const 2664) "\03\00\00\000\00.\000\00") - (data (i32.const 2680) "\03\00\00\00N\00a\00N\00") - (data (i32.const 2696) "\t\00\00\00-\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 2720) "\08\00\00\00I\00n\00f\00i\00n\00i\00t\00y\00") - (data (i32.const 2744) "\b8\02\00\00\00\00\00\00\88\02\1c\08\a0\d5\8f\fav\bf>\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8\a2\7f\e1\ae\bav\acU0 \fb\16\8b\ea5\ce]J\89B\cf-;eU\aa\b0k\9a\dfE\1a=\03\cf\1a\e6\ca\c6\9a\c7\17\fep\abO\dc\bc\be\fc\b1w\ff\0c\d6kA\ef\91V\be<\fc\7f\90\ad\1f\d0\8d\83\9aU1(\\Q\d3\b5\c9\a6\ad\8f\acq\9d\cb\8b\ee#w\"\9c\eamSx@\91I\cc\aeW\ce\b6]y\12<\827V\fbM6\94\10\c2O\98H8o\ea\96\90\c7:\82%\cb\85t\d7\f4\97\bf\97\cd\cf\86\a0\e5\ac*\17\98\n4\ef\8e\b25*\fbg8\b2;?\c6\d2\df\d4\c8\84\ba\cd\d3\1a\'D\dd\c5\96\c9%\bb\ce\9fk\93\84\a5b}$l\ac\db\f6\da_\0dXf\ab\a3&\f1\c3\de\93\f8\e2\f3\b8\80\ff\aa\a8\ad\b5\b5\8bJ|l\05_b\87S0\c14`\ff\bc\c9U&\ba\91\8c\85N\96\bd~)p$w\f9\df\8f\b8\e5\b8\9f\bd\df\a6\94}t\88\cf_\a9\f8\cf\9b\a8\8f\93pD\b9k\15\0f\bf\f8\f0\08\8a\b611eU%\b0\cd\ac\7f{\d0\c6\e2?\99\06;+*\c4\10\\\e4\d3\92si\99$$\aa\0e\ca\00\83\f2\b5\87\fd\eb\1a\11\92d\08\e5\bc\cc\88Po\t\cc\bc\8c,e\19\e2X\17\b7\d1\00\00\00\00\00\00@\9c\00\00\00\00\10\a5\d4\e8\00\00b\ac\c5\ebx\ad\84\t\94\f8x9?\81\b3\15\07\c9{\ce\97\c0p\\\ea{\ce2~\8fh\80\e9\ab\a48\d2\d5E\"\9a\17&\'O\9f\'\fb\c4\d41\a2c\ed\a8\ad\c8\8c8e\de\b0\dbe\ab\1a\8e\08\c7\83\9a\1dqB\f9\1d]\c4X\e7\1b\a6,iM\92\ea\8dp\1ad\ee\01\daJw\ef\9a\99\a3m\a2\85k}\b4{x\t\f2w\18\ddy\a1\e4T\b4\c2\c5\9b[\92\86[\86=]\96\c8\c5S5\c8\b3\a0\97\fa\\\b4*\95\e3_\a0\99\bd\9fF\de%\8c9\db4\c2\9b\a5\\\9f\98\a3r\9a\c6\f6\ce\be\e9TS\bf\dc\b7\e2A\"\f2\17\f3\fc\88\a5x\\\d3\9b\ce \cc\dfS!{\f3Z\16\98:0\1f\97\dc\b5\a0\e2\96\b3\e3\\S\d1\d9\a8 (; 24 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/util/string/parse (; 22 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2879,7 +1355,7 @@ (local $6 i32) (local $7 f64) local.get $0 - i32.load + call $~lib/string/String#get:length local.set $2 local.get $2 i32.eqz @@ -2890,7 +1366,7 @@ local.get $0 local.set $3 local.get $3 - i32.load16_u offset=4 + i32.load16_u local.set $4 local.get $4 i32.const 45 @@ -2909,7 +1385,7 @@ i32.const 2 i32.add local.tee $3 - i32.load16_u offset=4 + i32.load16_u local.set $4 f64.const -1 local.set $5 @@ -2931,7 +1407,7 @@ i32.const 2 i32.add local.tee $3 - i32.load16_u offset=4 + i32.load16_u local.set $4 f64.const 1 local.set $5 @@ -2946,13 +1422,12 @@ local.get $4 i32.const 48 i32.eq - local.tee $6 if (result i32) local.get $2 i32.const 2 i32.gt_s else - local.get $6 + i32.const 0 end if block $break|0 @@ -2966,7 +1441,7 @@ local.get $3 i32.const 2 i32.add - i32.load16_u offset=4 + i32.load16_u local.set $6 local.get $6 i32.const 66 @@ -3056,9 +1531,8 @@ local.get $1 i32.const 2 i32.lt_s - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $1 i32.const 36 @@ -3084,18 +1558,17 @@ if block local.get $3 - i32.load16_u offset=4 + i32.load16_u local.set $4 local.get $4 i32.const 48 i32.ge_s - local.tee $6 if (result i32) local.get $4 i32.const 57 i32.le_s else - local.get $6 + i32.const 0 end if local.get $4 @@ -3106,13 +1579,12 @@ local.get $4 i32.const 65 i32.ge_s - local.tee $6 if (result i32) local.get $4 i32.const 90 i32.le_s else - local.get $6 + i32.const 0 end if local.get $4 @@ -3125,13 +1597,12 @@ local.get $4 i32.const 97 i32.ge_s - local.tee $6 if (result i32) local.get $4 i32.const 122 i32.le_s else - local.get $6 + i32.const 0 end if local.get $4 @@ -3172,12 +1643,12 @@ local.get $7 f64.mul ) - (func $~lib/string/parseInt (; 25 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/string/parseInt (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $0 local.get $1 - call $~lib/internal/string/parse + call $~lib/util/string/parse ) - (func $~lib/string/parseFloat (; 26 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/string/parseFloat (; 24 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3186,7 +1657,7 @@ (local $6 i32) (local $7 f64) local.get $0 - i32.load + call $~lib/string/String#get:length local.set $1 local.get $1 i32.eqz @@ -3197,7 +1668,7 @@ local.get $0 local.set $2 local.get $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 local.get $3 i32.const 45 @@ -3216,7 +1687,7 @@ i32.const 2 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 f64.const -1 local.set $4 @@ -3238,7 +1709,7 @@ i32.const 2 i32.add local.tee $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 f64.const 1 local.set $4 @@ -3262,7 +1733,7 @@ if block local.get $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 local.get $3 i32.const 46 @@ -3287,14 +1758,13 @@ if block local.get $2 - i32.load16_u offset=4 + i32.load16_u local.set $3 local.get $3 i32.const 69 i32.eq - local.tee $6 if (result i32) - local.get $6 + i32.const 1 else local.get $3 i32.const 101 @@ -3305,10 +1775,10 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 630 + i32.const 264 + i32.const 583 i32.const 10 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -3352,1010 +1822,990 @@ i32.const 10 i32.ge_u if - br $break|0 - end - local.get $5 - f64.const 10 - f64.mul - local.get $3 - f64.convert_i32_s - f64.add - local.set $5 - local.get $2 - i32.const 2 - i32.add - local.set $2 - end - br $continue|0 - end - end - end - local.get $4 - local.get $5 - f64.mul - ) - (func $~lib/string/String#concat (; 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.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 80 - i32.const 110 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.eq - if - i32.const 216 - local.set $1 - end - local.get $0 - i32.load - local.set $2 - local.get $1 - i32.load - local.set $3 - local.get $2 - local.get $3 - i32.add - local.set $4 - local.get $4 - i32.const 0 - i32.eq - if - i32.const 112 - return - end - local.get $4 - call $~lib/internal/string/allocateUnsafe - local.set $5 - local.get $5 - i32.const 0 - local.get $0 - i32.const 0 - local.get $2 - call $~lib/internal/string/copyUnsafe - local.get $5 - local.get $2 - local.get $1 - i32.const 0 - local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $5 - ) - (func $~lib/string/String.__concat (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 216 - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/string/String#concat - ) - (func $~lib/string/String.__ne (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - call $~lib/string/String.__eq - i32.eqz - ) - (func $~lib/string/String.__gt (; 30 ;) (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 - local.get $1 - i32.eq - local.tee $2 - if (result i32) - local.get $2 - else - local.get $0 - i32.const 0 - i32.eq - end - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.const 0 - i32.eq - end - if - i32.const 0 - return - end - local.get $0 - i32.load - local.set $3 - local.get $1 - i32.load - local.set $4 - local.get $3 - i32.eqz - if - i32.const 0 - return - end - local.get $4 - i32.eqz - if - i32.const 1 - return + br $break|0 + end + local.get $5 + f64.const 10 + f64.mul + local.get $3 + f64.convert_i32_s + f64.add + local.set $5 + local.get $2 + i32.const 2 + i32.add + local.set $2 + end + br $continue|0 + end + end end - local.get $3 - local.tee $2 local.get $4 - local.tee $5 - local.get $2 local.get $5 - i32.lt_s - select - local.set $6 - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/compareUnsafe - i32.const 0 - i32.gt_s + f64.mul ) - (func $~lib/string/String.__lt (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 25 ;) (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 - local.get $1 - i32.eq - local.tee $2 - if (result i32) - local.get $2 - else - local.get $0 - i32.const 0 - i32.eq - end - local.tee $2 - if (result i32) - local.get $2 - else - local.get $1 - i32.const 0 - i32.eq - end - if - i32.const 0 - return - end - local.get $0 - i32.load - local.set $3 - local.get $1 - i32.load - local.set $4 - local.get $4 - i32.eqz - if - i32.const 0 - return - end - local.get $3 - i32.eqz - if - i32.const 1 - return - end - local.get $3 - local.tee $2 - local.get $4 - local.tee $5 - local.get $2 - local.get $5 - i32.lt_s - select - local.set $6 - local.get $0 - i32.const 0 - local.get $1 - i32.const 0 - local.get $6 - call $~lib/internal/string/compareUnsafe - i32.const 0 - i32.lt_s - ) - (func $~lib/string/String.__gte (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - call $~lib/string/String.__lt - i32.eqz - ) - (func $~lib/string/String.__lte (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 local.get $1 - call $~lib/string/String.__gt - i32.eqz - ) - (func $~lib/string/String#repeat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 i32.const 0 - i32.ne - i32.eqz + i32.eq if - i32.const 0 - i32.const 80 - i32.const 385 - i32.const 4 - call $~lib/env/abort - unreachable + i32.const 360 + local.set $1 end local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $2 local.get $1 - i32.const 0 - i32.lt_s - local.tee $3 - if (result i32) - local.get $3 - else - local.get $2 - local.get $1 - i32.mul - i32.const 1 - i32.const 28 - i32.shl - i32.gt_s - end - if - i32.const 0 - i32.const 80 - i32.const 390 - i32.const 6 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.eq - local.tee $3 - if (result i32) - local.get $3 - else - local.get $2 - i32.eqz - end - if - i32.const 112 - return - end - local.get $1 + call $~lib/string/String#get:length i32.const 1 - i32.eq - if - local.get $0 - return - end - local.get $2 - local.get $1 - i32.mul - call $~lib/internal/string/allocateUnsafe - local.set $4 - local.get $4 - i32.const 0 - local.get $0 - local.get $1 - call $~lib/internal/string/repeatUnsafe - local.get $4 - ) - (func $~lib/string/String#slice (; 35 ;) (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 $0 - i32.load + i32.shl local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $4 - i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - else - local.get $1 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select - end - local.set $6 local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $3 - i32.add - local.tee $4 - i32.const 0 - local.tee $5 - local.get $4 - local.get $5 - i32.gt_s - select - else - local.get $2 - local.tee $4 - local.get $3 - local.tee $5 - local.get $4 - local.get $5 - i32.lt_s - select - end - local.set $7 - local.get $7 - local.get $6 - i32.sub - local.set $3 local.get $3 + i32.add + local.set $4 + local.get $4 i32.const 0 - i32.le_s + i32.eq if - i32.const 112 + i32.const 120 return end - local.get $3 - call $~lib/internal/string/allocateUnsafe - local.set $8 - local.get $8 - i32.const 0 + local.get $4 + call $~lib/util/runtime/allocate + local.set $5 + local.get $5 local.get $0 - local.get $6 + local.get $2 + call $~lib/memory/memory.copy + local.get $5 + local.get $2 + i32.add + local.get $1 local.get $3 - call $~lib/internal/string/copyUnsafe - local.get $8 - ) - (func $~lib/string/String#slice|trampoline (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $1of1 - block $0of1 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of1 $1of1 $outOfRange - end - unreachable - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end + call $~lib/memory/memory.copy + local.get $5 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 + i32.const 360 + local.get $0 + i32.const 0 + i32.ne + select local.get $1 - local.get $2 - call $~lib/string/String#slice + call $~lib/string/String#concat ) - (func $~lib/internal/arraybuffer/computeSize (; 37 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - i32.const 1 - i32.const 32 + (func $~lib/string/String.__ne (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 8 - i32.add - i32.const 1 - i32.sub - i32.clz - i32.sub - i32.shl + local.get $1 + call $~lib/string/String.__eq + i32.eqz ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/string/String.__gt (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 - i32.const 1073741816 - i32.le_u + local.get $1 + i32.eq + if (result i32) + i32.const 1 + else + local.get $0 + i32.const 0 + i32.eq + end + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end + if + i32.const 0 + return + end + local.get $0 + call $~lib/string/String#get:length + local.set $2 + local.get $1 + call $~lib/string/String#get:length + local.set $3 + local.get $2 i32.eqz if i32.const 0 - i32.const 1128 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable + return end - block $~lib/memory/memory.allocate|inlined.1 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 + local.get $3 + i32.eqz + if + i32.const 1 + return end - local.set $1 - local.get $1 local.get $0 - i32.store + i32.const 0 local.get $1 + i32.const 0 + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + call $~lib/util/string/compareImpl + i32.const 0 + i32.gt_s ) - (func $~lib/memory/memory.allocate (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/internal/memory/memset (; 40 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/string/String.__lt (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i64) - local.get $2 - i32.eqz + (local $5 i32) + local.get $0 + local.get $1 + i32.eq + if (result i32) + i32.const 1 + else + local.get $0 + i32.const 0 + i32.eq + end + if (result i32) + i32.const 1 + else + local.get $1 + i32.const 0 + i32.eq + end if + i32.const 0 return end local.get $0 + call $~lib/string/String#get:length + local.set $2 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 1 - i32.sub - local.get $1 - i32.store8 + call $~lib/string/String#get:length + local.set $3 + local.get $3 + i32.eqz + if + i32.const 0 + return + end local.get $2 - i32.const 2 - i32.le_u + i32.eqz if + i32.const 1 return end local.get $0 - i32.const 1 - i32.add + i32.const 0 local.get $1 - i32.store8 + i32.const 0 + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + call $~lib/util/string/compareImpl + i32.const 0 + i32.lt_s + ) + (func $~lib/string/String.__gte (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 2 - i32.add local.get $1 - i32.store8 + call $~lib/string/String.__lt + i32.eqz + ) + (func $~lib/string/String.__lte (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - local.get $2 - i32.add - i32.const 2 - i32.sub local.get $1 - i32.store8 + call $~lib/string/String.__gt + i32.eqz + ) + (func $~lib/string/String#repeat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) 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 + i32.const 0 + i32.ne + i32.eqz if - return + i32.const 0 + i32.const 264 + i32.const 337 + i32.const 4 + call $~lib/builtins/abort + unreachable end local.get $0 - i32.const 3 - i32.add + call $~lib/string/String#get:length + local.set $2 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub + i32.const 0 + i32.lt_s + if (result i32) + i32.const 1 + else + local.get $2 + i64.extend_i32_s + local.get $1 + i64.extend_i32_s + i64.mul + i64.const 1 + i64.const 28 + i64.shl + i64.gt_u + end + if + i32.const 0 + i32.const 264 + i32.const 342 + i32.const 6 + call $~lib/builtins/abort + unreachable + end local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u + i32.const 0 + i32.eq + if (result i32) + i32.const 1 + else + local.get $2 + i32.eqz + end if + i32.const 120 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 + i32.const 1 + i32.eq if + local.get $0 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 $2 + local.get $1 + i32.mul + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $3 + local.get $3 local.get $0 local.get $2 - i32.add - i32.const 12 - i32.sub - local.get $4 - i32.store + i32.const 1 + i32.shl + local.get $1 + call $~lib/memory/memory.repeat + local.get $3 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/string/String#slice (; 33 ;) (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 $0 + call $~lib/string/String#get:length + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $1 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $6 local.get $2 - i32.add - i32.const 8 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $4 + i32.const 0 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + else + local.get $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.lt_s + select + end + local.set $7 + local.get $7 + local.get $6 i32.sub - local.get $4 - i32.store - local.get $2 - i32.const 24 - i32.le_u + local.set $3 + local.get $3 + i32.const 0 + i32.le_s if + i32.const 120 return end + local.get $3 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $8 + local.get $8 local.get $0 - i32.const 12 + local.get $6 + i32.const 1 + i32.shl i32.add - local.get $4 - i32.store - local.get $0 + local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $8 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 + call $~lib/util/runtime/register + ) + (func $~lib/collector/dummy/__ref_link (; 34 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/util/runtime/makeArray (; 36 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + i32.const 16 + call $~lib/util/runtime/allocate local.get $2 - i32.add - i32.const 28 - i32.sub - local.get $4 - i32.store + call $~lib/util/runtime/register + local.set $4 local.get $0 - local.get $2 - i32.add - i32.const 24 - i32.sub + local.get $1 + i32.shl + local.set $5 + local.get $5 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.set $6 local.get $4 + local.tee $7 + local.get $6 + local.tee $8 + local.get $7 + i32.load + local.tee $9 + i32.ne + if (result i32) + local.get $9 + if + local.get $9 + local.get $7 + call $~lib/collector/dummy/__ref_unlink + end + local.get $8 + local.get $7 + call $~lib/collector/dummy/__ref_link + local.get $8 + else + local.get $8 + end 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 $6 + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 local.get $4 - i32.store - i32.const 24 - local.get $0 - i32.const 4 - i32.and - i32.add - local.set $3 local.get $0 + i32.store offset=12 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 + if + local.get $6 + local.get $3 + local.get $5 + call $~lib/memory/memory.copy + end 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 + ) + (func $~lib/memory/memory.fill (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 end - end - ) - (func $~lib/array/Array<~lib/string/String>#constructor (; 41 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if i32.const 0 - i32.const 1096 - i32.const 45 - i32.const 39 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block (result i32) local.get $0 - i32.eqz + i32.sub + i32.const 3 + i32.and + local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 - i32.const 8 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end local.get $0 - i32.const 0 + i32.const 4 + i32.add + local.get $4 i32.store local.get $0 - i32.const 0 - i32.store offset=4 + i32.const 8 + i32.add + local.get $4 + i32.store local.get $0 - end - local.get $3 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 + 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 + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 12 i32.add - local.set $4 - i32.const 0 - local.set $5 + 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 - local.set $6 + 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 $5 + local.get $0 local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - local.get $0 - ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 42 ;) (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.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - i32.const 0 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - ) - (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 43 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - i32.const 0 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 + end ) - (func $~lib/allocator/arena/__memory_free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 38 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/internal/arraybuffer/reallocateUnsafe (; 45 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/memory/memory.free (; 39 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/util/runtime/reallocate (; 40 ;) (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 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub local.set $2 - local.get $1 local.get $2 - i32.gt_s + i32.load offset=4 + local.set $3 + local.get $3 + local.get $1 + i32.lt_u if local.get $1 - i32.const 1073741816 - i32.le_s - i32.eqz + call $~lib/util/runtime/adjust + local.set $4 + local.get $3 + call $~lib/util/runtime/adjust + i32.const 0 + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + select + local.get $4 + i32.lt_u if + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $2 + i32.load + i32.store + local.get $5 i32.const 0 - i32.const 1128 - 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 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + local.get $5 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + local.set $6 + local.get $6 local.get $0 + local.get $3 + call $~lib/memory/memory.copy + local.get $6 + local.get $3 + i32.add + i32.const 0 local.get $1 - i32.store - else - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.copy|inlined.2 - local.get $3 - i32.const 8 - i32.add - local.set $4 + local.get $3 + i32.sub + call $~lib/memory/memory.fill + local.get $2 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + if local.get $0 - i32.const 8 - i32.add - local.set $5 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 184 + i32.const 89 + i32.const 8 + call $~lib/builtins/abort + unreachable + end local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.free|inlined.0 + call $~lib/memory/memory.free + else local.get $0 - local.set $6 - local.get $6 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 + call $~lib/collector/dummy/__ref_register end - local.get $3 + local.get $5 + local.set $2 + local.get $6 local.set $0 - end - block $~lib/memory/memory.fill|inlined.1 + else local.get $0 - i32.const 8 - i32.add - local.get $2 + local.get $3 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 + i32.sub + call $~lib/memory/memory.fill end else + nop + end + local.get $2 + local.get $1 + i32.store offset=4 + local.get $0 + ) + (func $~lib/array/ensureCapacity (; 41 ;) (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 $1 + local.get $0 + i32.load offset=8 + local.get $2 + i32.shr_u + i32.gt_u + if local.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH local.get $2 - i32.lt_s + i32.shr_u + i32.gt_u if - local.get $1 i32.const 0 - i32.ge_s - i32.eqz - if - i32.const 0 - i32.const 1128 - i32.const 62 - i32.const 4 - call $~lib/env/abort - unreachable - end + i32.const 1920 + i32.const 14 + i32.const 64 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load + local.set $3 + local.get $1 + local.get $2 + i32.shl + local.set $4 + local.get $3 + local.get $4 + call $~lib/util/runtime/reallocate + local.set $5 + local.get $5 + local.get $3 + i32.ne + if local.get $0 - local.get $1 + local.tee $6 + local.get $5 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end i32.store + local.get $0 + local.get $5 + i32.store offset=4 end + local.get $0 + local.get $4 + i32.store offset=8 end - local.get $0 ) - (func $~lib/array/Array<~lib/string/String>#push (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array<~lib/string/String>#push (; 42 ;) (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 $8 i32) - (local $9 i32) local.get $0 - i32.load offset=4 + i32.load offset=12 local.set $2 - local.get $0 - i32.load + local.get $2 + i32.const 1 + i32.add local.set $3 + local.get $0 local.get $3 - i32.load i32.const 2 - i32.shr_u - local.set $4 + call $~lib/array/ensureCapacity + local.get $0 + i32.load offset=4 local.get $2 - i32.const 1 + i32.const 2 + i32.shl i32.add - local.set $5 - local.get $2 + local.set $4 local.get $4 - i32.ge_u + i32.load + local.set $5 + local.get $5 + local.get $1 + i32.ne if - local.get $2 - i32.const 268435454 - i32.ge_u + local.get $4 + local.get $1 + i32.store + local.get $1 + local.get $0 + call $~lib/collector/dummy/__ref_link + local.get $5 + i32.const 0 + i32.ne if - i32.const 0 - i32.const 1096 - i32.const 182 - i32.const 42 - call $~lib/env/abort - unreachable + local.get $5 + local.get $0 + call $~lib/collector/dummy/__ref_unlink end - local.get $3 - local.get $5 - i32.const 2 - i32.shl - call $~lib/internal/arraybuffer/reallocateUnsafe - local.set $3 - local.get $0 - local.get $3 - i32.store end local.get $0 - local.get $5 - i32.store offset=4 - block $~lib/internal/arraybuffer/STORE<~lib/string/String,~lib/string/String>|inlined.2 + local.get $3 + i32.store offset=12 + local.get $3 + ) + (func $~lib/array/Array<~lib/string/String>#__unchecked_set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.set $3 + local.get $3 + i32.load + local.set $4 + local.get $2 + local.get $4 + i32.ne + if local.get $3 - local.set $6 local.get $2 - local.set $7 - local.get $1 - local.set $8 + i32.store + local.get $4 i32.const 0 - local.set $9 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $9 - i32.add - local.get $8 - i32.store offset=8 + i32.ne + if + local.get $4 + local.get $0 + call $~lib/collector/dummy/__ref_unlink + end + local.get $2 + local.get $0 + call $~lib/collector/dummy/__ref_link end - local.get $5 ) - (func $~lib/string/String#split (; 47 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/string/String#split (; 44 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4367,28 +2817,30 @@ (local $11 i32) (local $12 i32) (local $13 i32) - (local $14 i32) - (local $15 i32) - (local $16 i32) - (local $17 i32) local.get $0 i32.const 0 i32.ne i32.eqz if i32.const 0 - i32.const 80 - i32.const 413 + i32.const 264 + i32.const 364 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $2 i32.eqz if - i32.const 0 - i32.const 0 - call $~lib/array/Array<~lib/string/String>#constructor + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.0 (result i32) + i32.const 0 + local.set $3 + local.get $3 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end return end local.get $1 @@ -4396,24 +2848,35 @@ i32.eq if block (result i32) - i32.const 0 i32.const 1 - call $~lib/array/Array<~lib/string/String>#constructor + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray local.set $3 local.get $3 - i32.const 0 - local.get $0 - call $~lib/array/Array<~lib/string/String>#__unchecked_set + i32.load offset=4 + local.set $4 + local.get $4 + block (result i32) + local.get $0 + local.set $5 + local.get $5 + local.get $3 + call $~lib/collector/dummy/__ref_link + local.get $5 + end + i32.store local.get $3 end return end local.get $0 - i32.load - local.set $4 + call $~lib/string/String#get:length + local.set $6 local.get $1 - i32.load - local.set $5 + call $~lib/string/String#get:length + local.set $7 local.get $2 i32.const 0 i32.lt_s @@ -4421,282 +2884,297 @@ global.get $~lib/builtins/i32.MAX_VALUE local.set $2 end - local.get $5 + local.get $7 i32.eqz if - local.get $4 + local.get $6 i32.eqz if - i32.const 0 - i32.const 0 - call $~lib/array/Array<~lib/string/String>#constructor + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.1 (result i32) + i32.const 0 + local.set $4 + local.get $4 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end return end - local.get $4 - local.tee $3 + local.get $6 + local.tee $4 local.get $2 - local.tee $6 + local.tee $3 + local.get $4 local.get $3 - local.get $6 i32.lt_s select + local.set $6 + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.2 (result i32) + local.get $6 + local.set $4 + local.get $4 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end local.set $4 - i32.const 0 local.get $4 - call $~lib/array/Array<~lib/string/String>#constructor + i32.load offset=4 local.set $3 - local.get $3 - i32.load - local.set $6 block $break|0 i32.const 0 - local.set $7 + local.set $5 loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block - i32.const 1 - call $~lib/internal/string/allocateUnsafe + i32.const 2 + call $~lib/util/runtime/allocate local.set $8 local.get $8 local.get $0 - local.get $7 + local.get $5 i32.const 1 i32.shl i32.add - i32.load16_u offset=4 - i32.store16 offset=4 - block $~lib/internal/arraybuffer/STORE<~lib/string/String,~lib/string/String>|inlined.1 - local.get $6 - local.set $9 - local.get $7 - local.set $10 - local.get $8 - local.set $11 - i32.const 0 - local.set $12 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - local.get $11 - i32.store offset=8 - end + i32.load16_u + i32.store16 + local.get $3 + local.get $5 + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store + local.get $8 + i32.const 16 + call $~lib/util/runtime/register + drop + local.get $8 + local.get $4 + call $~lib/collector/dummy/__ref_link end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end unreachable end - local.get $3 + local.get $4 return else - local.get $4 + local.get $6 i32.eqz if - i32.const 0 - i32.const 1 - call $~lib/array/Array<~lib/string/String>#constructor - local.set $6 - block (result i32) - local.get $6 - local.tee $3 - i32.const 0 - local.tee $7 - i32.const 112 - call $~lib/array/Array<~lib/string/String>#__unchecked_set + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.3 (result i32) + i32.const 1 + local.set $3 local.get $3 - local.get $7 - call $~lib/array/Array<~lib/string/String>#__unchecked_get + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray end - drop - local.get $6 + local.set $3 + local.get $3 + i32.load offset=4 + i32.const 120 + i32.store + local.get $3 return end end + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.4 (result i32) + i32.const 0 + local.set $3 + local.get $3 + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray + end + local.set $9 i32.const 0 + local.set $10 i32.const 0 - call $~lib/array/Array<~lib/string/String>#constructor - local.set $13 - i32.const 0 - local.set $14 - i32.const 0 - local.set $15 + local.set $11 i32.const 0 - local.set $16 + local.set $12 block $break|1 loop $continue|1 local.get $0 local.get $1 - local.get $15 + local.get $11 call $~lib/string/String#indexOf - local.tee $14 + local.tee $10 i32.const -1 i32.ne if block - local.get $14 - local.get $15 + local.get $10 + local.get $11 i32.sub - local.set $6 - local.get $6 + local.set $3 + local.get $3 i32.const 0 i32.gt_s if - local.get $6 - call $~lib/internal/string/allocateUnsafe - local.set $3 local.get $3 - i32.const 0 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $4 + local.get $4 local.get $0 - local.get $15 - local.get $6 - call $~lib/internal/string/copyUnsafe - local.get $13 + local.get $11 + i32.const 1 + i32.shl + i32.add local.get $3 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $4 + i32.const 16 + call $~lib/util/runtime/register call $~lib/array/Array<~lib/string/String>#push drop else - local.get $13 - i32.const 112 + local.get $9 + i32.const 120 call $~lib/array/Array<~lib/string/String>#push drop end - local.get $16 + local.get $12 i32.const 1 i32.add - local.tee $16 + local.tee $12 local.get $2 i32.eq if - local.get $13 + local.get $9 return end - local.get $14 - local.get $5 + local.get $10 + local.get $7 i32.add - local.set $15 + local.set $11 end br $continue|1 end end end - local.get $15 + local.get $11 i32.eqz if - i32.const 0 - i32.const 1 - call $~lib/array/Array<~lib/string/String>#constructor - local.set $6 - block (result i32) - local.get $6 - local.tee $3 - i32.const 0 - local.tee $7 - local.get $0 - call $~lib/array/Array<~lib/string/String>#__unchecked_set + block $~lib/util/runtime/NEWARRAY<~lib/string/String>|inlined.5 (result i32) + i32.const 1 + local.set $3 local.get $3 - local.get $7 - call $~lib/array/Array<~lib/string/String>#__unchecked_get + i32.const 2 + i32.const 17 + i32.const 0 + call $~lib/util/runtime/makeArray end - drop - local.get $6 + local.set $3 + local.get $3 + i32.const 0 + local.get $0 + call $~lib/array/Array<~lib/string/String>#__unchecked_set + local.get $3 return end - local.get $4 - local.get $15 + local.get $6 + local.get $11 i32.sub - local.set $17 - local.get $17 + local.set $13 + local.get $13 i32.const 0 i32.gt_s if - local.get $17 - call $~lib/internal/string/allocateUnsafe - local.set $6 - local.get $6 - i32.const 0 + local.get $13 + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate + local.set $3 + local.get $3 local.get $0 - local.get $15 - local.get $17 - call $~lib/internal/string/copyUnsafe + local.get $11 + i32.const 1 + i32.shl + i32.add local.get $13 - local.get $6 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy + local.get $9 + local.get $3 + i32.const 16 + call $~lib/util/runtime/register call $~lib/array/Array<~lib/string/String>#push drop else - local.get $13 - i32.const 112 + local.get $9 + i32.const 120 call $~lib/array/Array<~lib/string/String>#push drop end - local.get $13 + local.get $9 ) - (func $~lib/string/String#split|trampoline (; 48 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $2 - end + (func $~lib/array/Array<~lib/string/String>#get:length (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/array/Array<~lib/string/String>#__unchecked_get (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - call $~lib/string/String#split + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $~lib/array/Array<~lib/string/String>#__get (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array<~lib/string/String>#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - i32.load - local.set $2 + i32.load offset=12 + i32.ge_u + if + i32.const 0 + i32.const 1920 + i32.const 96 + i32.const 45 + call $~lib/builtins/abort + unreachable + end local.get $1 - local.get $2 - i32.load + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 1920 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array<~lib/string/String>#__unchecked_get ) - (func $~lib/internal/number/decimalCount32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/decimalCount32 (; 48 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) local.get $0 i32.const 100000 @@ -4765,19 +3243,16 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa32_lut (; 51 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/util/number/utoa32_lut (; 49 ;) (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 $9 i32) - (local $10 i32) - (local $11 i64) - (local $12 i64) - i32.const 1816 - i32.load + (local $8 i64) + (local $9 i64) + i32.const 2616 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -4804,40 +3279,20 @@ i32.const 100 i32.rem_u local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $3 - local.set $8 - local.get $6 - local.set $9 - i32.const 0 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i64.load32_u offset=8 - end - local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $3 - local.set $10 - local.get $7 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i64.load32_u offset=8 - end - local.set $12 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $8 + local.get $3 + local.get $7 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $9 local.get $2 i32.const 4 i32.sub @@ -4847,12 +3302,12 @@ i32.const 1 i32.shl i32.add - local.get $11 - local.get $12 + local.get $8 + local.get $9 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -4876,30 +3331,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $3 - local.set $5 - local.get $6 - local.set $4 - i32.const 0 - local.set $8 - local.get $5 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 + local.get $3 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $8 - i32.store offset=4 + local.get $5 + i32.store end local.get $1 i32.const 10 @@ -4909,30 +3354,20 @@ i32.const 2 i32.sub local.set $2 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $3 - local.set $8 - local.get $1 - local.set $6 - i32.const 0 - local.set $7 - local.get $8 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - i32.load offset=8 - end - local.set $7 + local.get $3 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store offset=4 + local.get $5 + i32.store else local.get $2 i32.const 1 @@ -4941,17 +3376,17 @@ i32.const 48 local.get $1 i32.add - local.set $7 + local.set $5 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $7 - i32.store16 offset=4 + local.get $5 + i32.store16 end ) - (func $~lib/internal/number/itoa32 (; 52 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/itoa32 (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4961,7 +3396,7 @@ local.get $0 i32.eqz if - i32.const 480 + i32.const 848 return end local.get $0 @@ -4976,34 +3411,38 @@ local.set $0 end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $2 local.get $2 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $3 - block $~lib/internal/number/utoa32_core|inlined.0 + block $~lib/util/number/utoa32_core|inlined.0 local.get $3 - local.set $4 + local.set $6 local.get $0 local.set $5 local.get $2 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 - call $~lib/internal/number/utoa32_lut + local.get $5 + local.get $4 + call $~lib/util/number/utoa32_lut end local.get $1 if local.get $3 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $3 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/utoa32 (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/number/utoa32 (; 51 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5012,30 +3451,34 @@ local.get $0 i32.eqz if - i32.const 480 + i32.const 848 return end local.get $0 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $1 local.get $1 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $2 - block $~lib/internal/number/utoa32_core|inlined.1 + block $~lib/util/number/utoa32_core|inlined.1 local.get $2 - local.set $3 + local.set $5 local.get $0 local.set $4 local.get $1 - local.set $5 - local.get $3 - local.get $4 + local.set $3 local.get $5 - call $~lib/internal/number/utoa32_lut + local.get $4 + local.get $3 + call $~lib/util/number/utoa32_lut end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/decimalCount64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/decimalCount64 (; 52 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) local.get $0 i64.const 1000000000000000 @@ -5104,7 +3547,7 @@ unreachable unreachable ) - (func $~lib/internal/number/utoa64_lut (; 55 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/util/number/utoa64_lut (; 53 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5114,13 +3557,10 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) - (local $16 i64) - i32.const 1816 - i32.load + (local $12 i64) + (local $13 i64) + i32.const 2616 + i32.load offset=4 local.set $3 block $break|0 loop $continue|0 @@ -5166,40 +3606,20 @@ i32.const 100 i32.rem_u local.set $11 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $3 - local.set $12 - local.get $10 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $3 - local.set $14 - local.get $11 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + local.get $3 + local.get $10 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $11 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -5209,46 +3629,26 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or - i64.store offset=4 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i64) - local.get $3 - local.set $12 - local.get $8 - local.set $13 - i32.const 0 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i64.load32_u offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $3 - local.set $14 - local.get $9 - local.set $13 - i32.const 0 - local.set $12 - local.get $14 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i64.load32_u offset=8 - end - local.set $16 + i64.store + local.get $3 + local.get $8 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $12 + local.get $3 + local.get $9 + i32.const 2 + i32.shl + i32.add + i64.load32_u + local.set $13 local.get $2 i32.const 4 i32.sub @@ -5258,12 +3658,12 @@ i32.const 1 i32.shl i32.add - local.get $15 - local.get $16 + local.get $12 + local.get $13 i64.const 32 i64.shl i64.or - i64.store offset=4 + i64.store end br $continue|0 end @@ -5273,9 +3673,9 @@ local.get $1 i32.wrap_i64 local.get $2 - call $~lib/internal/number/utoa32_lut + call $~lib/util/number/utoa32_lut ) - (func $~lib/internal/number/utoa64 (; 56 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/utoa64 (; 54 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5286,7 +3686,7 @@ local.get $0 i64.eqz if - i32.const 480 + i32.const 848 return end local.get $0 @@ -5298,46 +3698,52 @@ i32.wrap_i64 local.set $2 local.get $2 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $3 local.get $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $1 - block $~lib/internal/number/utoa32_core|inlined.2 + block $~lib/util/number/utoa32_core|inlined.2 local.get $1 - local.set $4 + local.set $6 local.get $2 local.set $5 local.get $3 - local.set $6 - local.get $4 - local.get $5 + local.set $4 local.get $6 - call $~lib/internal/number/utoa32_lut + local.get $5 + local.get $4 + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.set $3 local.get $3 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $1 - block $~lib/internal/number/utoa64_core|inlined.0 + block $~lib/util/number/utoa64_core|inlined.0 local.get $1 - local.set $2 + local.set $4 local.get $0 local.set $7 local.get $3 - local.set $6 - local.get $2 + local.set $2 + local.get $4 local.get $7 - local.get $6 - call $~lib/internal/number/utoa64_lut + local.get $2 + call $~lib/util/number/utoa64_lut end end local.get $1 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/internal/number/itoa64 (; 57 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) + (func $~lib/util/number/itoa64 (; 55 ;) (type $FUNCSIG$ij) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5349,7 +3755,7 @@ local.get $0 i64.eqz if - i32.const 480 + i32.const 848 return end local.get $0 @@ -5372,68 +3778,92 @@ i32.wrap_i64 local.set $3 local.get $3 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.get $1 i32.add local.set $4 local.get $4 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $2 - block $~lib/internal/number/utoa32_core|inlined.3 + block $~lib/util/number/utoa32_core|inlined.3 local.get $2 - local.set $5 + local.set $7 local.get $3 local.set $6 local.get $4 - local.set $7 - local.get $5 - local.get $6 + local.set $5 local.get $7 - call $~lib/internal/number/utoa32_lut + local.get $6 + local.get $5 + call $~lib/util/number/utoa32_lut end else local.get $0 - call $~lib/internal/number/decimalCount64 + call $~lib/util/number/decimalCount64 local.get $1 i32.add local.set $4 local.get $4 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $2 - block $~lib/internal/number/utoa64_core|inlined.1 + block $~lib/util/number/utoa64_core|inlined.1 local.get $2 - local.set $3 + local.set $5 local.get $0 local.set $8 local.get $4 - local.set $7 - local.get $3 + local.set $3 + local.get $5 local.get $8 - local.get $7 - call $~lib/internal/number/utoa64_lut + local.get $3 + call $~lib/util/number/utoa64_lut end end local.get $1 if local.get $2 i32.const 45 - i32.store16 offset=4 + i32.store16 end local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/builtins/isFinite (; 58 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 56 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.sub f64.const 0 f64.eq ) - (func $~lib/builtins/isNaN (; 59 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 57 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) local.get $0 local.get $0 f64.ne ) - (func $~lib/internal/number/genDigits (; 60 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 58 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $~lib/array/Array#__unchecked_get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + ) + (func $~lib/util/number/genDigits (; 60 ;) (type $FUNCSIG$iijijiji) (param $0 i32) (param $1 i64) (param $2 i32) (param $3 i64) (param $4 i32) (param $5 i64) (param $6 i32) (result i32) (local $7 i32) (local $8 i64) (local $9 i64) @@ -5450,11 +3880,10 @@ (local $20 i32) (local $21 i64) (local $22 i64) - (local $23 i32) - (local $24 i32) + (local $23 i64) + (local $24 i64) (local $25 i32) - (local $26 i64) - (local $27 i64) + (local $26 i32) i32.const 0 local.get $4 i32.sub @@ -5485,12 +3914,12 @@ i64.and local.set $13 local.get $12 - call $~lib/internal/number/decimalCount32 + call $~lib/util/number/decimalCount32 local.set $14 local.get $6 local.set $15 - i32.const 4104 - i32.load + i32.const 4984 + i32.load offset=4 local.set $16 block $break|0 loop $continue|0 @@ -5720,7 +4149,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $14 i32.const 1 @@ -5738,43 +4167,33 @@ local.get $5 i64.le_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 + global.set $~lib/util/number/_K + block $~lib/util/number/grisuRound|inlined.0 local.get $0 - local.set $18 - local.get $15 local.set $20 + local.get $15 + local.set $18 local.get $5 - local.set $21 + local.set $24 local.get $19 - local.set $22 - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i64) - local.get $16 - local.set $23 - local.get $14 - local.set $24 - i32.const 0 - local.set $25 - local.get $23 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.set $23 + local.get $16 + local.get $14 + i32.const 2 + i32.shl + i32.add + i64.load32_u local.get $7 i64.extend_i32_s i64.shl - local.set $26 + local.set $22 local.get $10 - local.set $27 - local.get $18 + local.set $21 local.get $20 + local.get $18 i32.const 1 i32.sub i32.const 1 @@ -5782,65 +4201,62 @@ i32.add local.set $25 local.get $25 - i32.load16_u offset=4 - local.set $24 + i32.load16_u + local.set $26 block $break|2 loop $continue|2 - local.get $22 - local.get $27 + local.get $23 + local.get $21 i64.lt_u - local.tee $23 if (result i32) - local.get $21 - local.get $22 + local.get $24 + local.get $23 i64.sub - local.get $26 + local.get $22 i64.ge_u else - local.get $23 + i32.const 0 end - local.tee $23 if (result i32) + local.get $23 local.get $22 - local.get $26 i64.add - local.get $27 + local.get $21 i64.lt_u - local.tee $23 if (result i32) - local.get $23 + i32.const 1 else - local.get $27 - local.get $22 + local.get $21 + local.get $23 i64.sub + local.get $23 local.get $22 - local.get $26 i64.add - local.get $27 + local.get $21 i64.sub i64.gt_u end else - local.get $23 + i32.const 0 end if block - local.get $24 + local.get $26 i32.const 1 i32.sub - local.set $24 + local.set $26 + local.get $23 local.get $22 - local.get $26 i64.add - local.set $22 + local.set $23 end br $continue|2 end end end local.get $25 - local.get $24 - i32.store16 offset=4 + local.get $26 + i32.store16 end local.get $15 return @@ -5893,7 +4309,7 @@ i32.const 65535 i32.and i32.add - i32.store16 offset=4 + i32.store16 end local.get $13 local.get $9 @@ -5907,85 +4323,72 @@ local.get $5 i64.lt_u if - global.get $~lib/internal/number/_K + global.get $~lib/util/number/_K local.get $14 i32.add - global.set $~lib/internal/number/_K + global.set $~lib/util/number/_K local.get $10 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $16 - local.set $17 - i32.const 0 - local.get $14 - i32.sub - local.set $24 - i32.const 0 - local.set $25 - local.get $17 - local.get $24 - i32.const 2 - i32.shl - i32.add - local.get $25 - i32.add - i64.load32_u offset=8 - end + local.get $16 + i32.const 0 + local.get $14 + i32.sub + i32.const 2 + i32.shl + i32.add + i64.load32_u i64.mul local.set $10 - block $~lib/internal/number/grisuRound|inlined.1 + block $~lib/util/number/grisuRound|inlined.1 local.get $0 - local.set $25 + local.set $26 local.get $15 - local.set $24 + local.set $17 local.get $5 - local.set $27 + local.set $24 local.get $13 - local.set $26 + local.set $23 local.get $8 local.set $22 local.get $10 local.set $21 - local.get $25 - local.get $24 + local.get $26 + local.get $17 i32.const 1 i32.sub i32.const 1 i32.shl i32.add - local.set $17 - local.get $17 - i32.load16_u offset=4 - local.set $20 + local.set $25 + local.get $25 + i32.load16_u + local.set $18 block $break|4 loop $continue|4 - local.get $26 + local.get $23 local.get $21 i64.lt_u - local.tee $18 if (result i32) - local.get $27 - local.get $26 + local.get $24 + local.get $23 i64.sub local.get $22 i64.ge_u else - local.get $18 + i32.const 0 end - local.tee $18 if (result i32) - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 i64.lt_u - local.tee $18 if (result i32) - local.get $18 + i32.const 1 else local.get $21 - local.get $26 + local.get $23 i64.sub - local.get $26 + local.get $23 local.get $22 i64.add local.get $21 @@ -5993,26 +4396,26 @@ i64.gt_u end else - local.get $18 + i32.const 0 end if block - local.get $20 + local.get $18 i32.const 1 i32.sub - local.set $20 - local.get $26 + local.set $18 + local.get $23 local.get $22 i64.add - local.set $26 + local.set $23 end br $continue|4 end end end - local.get $17 - local.get $20 - i32.store16 offset=4 + local.get $25 + local.get $18 + i32.store16 end local.get $15 return @@ -6024,7 +4427,7 @@ end local.get $15 ) - (func $~lib/internal/number/prettify (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/number/prettify (; 61 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6047,7 +4450,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $1 i32.const 2 i32.add @@ -6060,13 +4463,12 @@ local.get $1 local.get $3 i32.le_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if block $break|0 @@ -6084,7 +4486,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $4 i32.const 1 i32.add @@ -6104,7 +4506,7 @@ i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store local.get $3 i32.const 2 i32.add @@ -6113,13 +4515,12 @@ local.get $3 i32.const 0 i32.gt_s - local.tee $4 if (result i32) local.get $3 i32.const 21 i32.le_s else - local.get $4 + i32.const 0 end if local.get $0 @@ -6128,35 +4529,23 @@ i32.shl i32.add local.set $4 - block $~lib/memory/memory.copy|inlined.3 - local.get $4 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $4 - i32.const 4 - i32.add - local.set $6 - i32.const 0 - local.get $2 - i32.sub - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - end + local.get $4 + i32.const 2 + i32.add + local.get $4 + i32.const 0 + local.get $2 + i32.sub + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 local.get $3 i32.const 1 i32.shl i32.add i32.const 46 - i32.store16 offset=4 + i32.store16 local.get $1 i32.const 1 i32.add @@ -6165,48 +4554,35 @@ i32.const -6 local.get $3 i32.lt_s - local.tee $4 if (result i32) local.get $3 i32.const 0 i32.le_s else - local.get $4 + i32.const 0 end if i32.const 2 local.get $3 i32.sub local.set $4 - block $~lib/memory/memory.copy|inlined.4 - local.get $0 - i32.const 4 - i32.add - local.get $4 - i32.const 1 - i32.shl - i32.add - local.set $7 - local.get $0 - i32.const 4 - i32.add - local.set $6 - local.get $1 - i32.const 1 - i32.shl - local.set $5 - local.get $7 - local.get $6 - local.get $5 - call $~lib/internal/memory/memmove - end + local.get $0 + local.get $4 + i32.const 1 + i32.shl + i32.add + local.get $0 + local.get $1 + i32.const 1 + i32.shl + call $~lib/memory/memory.copy local.get $0 i32.const 48 i32.const 46 i32.const 16 i32.shl i32.or - i32.store offset=4 + i32.store block $break|1 i32.const 2 local.set $5 @@ -6222,7 +4598,7 @@ i32.shl i32.add i32.const 48 - i32.store16 offset=4 + i32.store16 local.get $5 i32.const 1 i32.add @@ -6243,50 +4619,50 @@ if local.get $0 i32.const 101 - i32.store16 offset=6 - block $~lib/internal/number/genExponent|inlined.0 (result i32) + i32.store16 offset=2 + block $~lib/util/number/genExponent|inlined.0 (result i32) local.get $0 i32.const 4 i32.add - local.set $4 + local.set $5 local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 + local.set $4 + local.get $4 i32.const 0 i32.lt_s local.set $6 local.get $6 if i32.const 0 - local.get $5 + local.get $4 i32.sub - local.set $5 + local.set $4 end - local.get $5 - call $~lib/internal/number/decimalCount32 + local.get $4 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add local.set $7 - block $~lib/internal/number/utoa32_core|inlined.4 - local.get $4 - local.set $8 + block $~lib/util/number/utoa32_core|inlined.4 local.get $5 + local.set $10 + local.get $4 local.set $9 local.get $7 - local.set $10 - local.get $8 - local.get $9 + local.set $8 local.get $10 - call $~lib/internal/number/utoa32_lut + local.get $9 + local.get $8 + call $~lib/util/number/utoa32_lut end - local.get $4 + local.get $5 i32.const 45 i32.const 43 local.get $6 select - i32.store16 offset=4 + i32.store16 local.get $7 end local.set $1 @@ -6299,38 +4675,26 @@ i32.const 1 i32.shl local.set $7 - block $~lib/memory/memory.copy|inlined.5 - local.get $0 - i32.const 4 - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $0 - i32.const 4 - i32.add - i32.const 2 - i32.add - local.set $5 - local.get $7 - i32.const 2 - i32.sub - local.set $4 - local.get $6 - local.get $5 - local.get $4 - call $~lib/internal/memory/memmove - end + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.const 2 + i32.add + local.get $7 + i32.const 2 + i32.sub + call $~lib/memory/memory.copy local.get $0 i32.const 46 - i32.store16 offset=6 + i32.store16 offset=2 local.get $0 local.get $7 i32.add i32.const 101 - i32.store16 offset=6 + i32.store16 offset=2 local.get $1 - block $~lib/internal/number/genExponent|inlined.1 (result i32) + block $~lib/util/number/genExponent|inlined.1 (result i32) local.get $0 local.get $7 i32.add @@ -6340,42 +4704,42 @@ local.get $3 i32.const 1 i32.sub - local.set $5 - local.get $5 - i32.const 0 - i32.lt_s local.set $6 local.get $6 + i32.const 0 + i32.lt_s + local.set $5 + local.get $5 if i32.const 0 - local.get $5 + local.get $6 i32.sub - local.set $5 + local.set $6 end - local.get $5 - call $~lib/internal/number/decimalCount32 + local.get $6 + call $~lib/util/number/decimalCount32 i32.const 1 i32.add - local.set $10 - block $~lib/internal/number/utoa32_core|inlined.5 + local.set $8 + block $~lib/util/number/utoa32_core|inlined.5 local.get $4 - local.set $9 - local.get $5 - local.set $8 - local.get $10 local.set $11 - local.get $9 + local.get $6 + local.set $10 local.get $8 + local.set $9 local.get $11 - call $~lib/internal/number/utoa32_lut + local.get $10 + local.get $9 + call $~lib/util/number/utoa32_lut end local.get $4 i32.const 45 i32.const 43 - local.get $6 + local.get $5 select - i32.store16 offset=4 - local.get $10 + i32.store16 + local.get $8 end i32.add local.set $1 @@ -6393,7 +4757,7 @@ unreachable unreachable ) - (func $~lib/internal/number/dtoa_core (; 62 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/util/number/dtoa_core (; 62 ;) (type $FUNCSIG$iid) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 f64) (local $4 i32) @@ -6409,21 +4773,18 @@ (local $14 i32) (local $15 i32) (local $16 f64) - (local $17 i32) - (local $18 i32) - (local $19 i32) - (local $20 i32) + (local $17 i64) + (local $18 i64) + (local $19 i64) + (local $20 i64) (local $21 i64) (local $22 i64) (local $23 i64) (local $24 i64) (local $25 i64) - (local $26 i64) + (local $26 i32) (local $27 i64) - (local $28 i64) - (local $29 i64) - (local $30 i64) - (local $31 i32) + (local $28 i32) local.get $1 f64.const 0 f64.lt @@ -6435,15 +4796,15 @@ local.set $1 local.get $0 i32.const 45 - i32.store16 offset=4 + i32.store16 end - block $~lib/internal/number/grisu2|inlined.0 (result i32) + block $~lib/util/number/grisu2|inlined.0 (result i32) local.get $1 local.set $3 local.get $0 - local.set $4 - local.get $2 local.set $5 + local.get $2 + local.set $4 local.get $3 i64.reinterpret_f64 local.set $6 @@ -6478,7 +4839,7 @@ i32.add i32.sub local.set $7 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block $~lib/util/number/normalizedBoundaries|inlined.0 local.get $9 local.set $10 local.get $7 @@ -6513,7 +4874,7 @@ i32.add local.set $15 local.get $12 - global.set $~lib/internal/number/_frc_plus + global.set $~lib/util/number/_frc_plus local.get $10 local.get $15 i64.extend_i32_s @@ -6527,12 +4888,12 @@ i32.sub i64.extend_i32_s i64.shl - global.set $~lib/internal/number/_frc_minus + global.set $~lib/util/number/_frc_minus local.get $13 - global.set $~lib/internal/number/_exp + global.set $~lib/util/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 - global.get $~lib/internal/number/_exp + block $~lib/util/number/getCachedPower|inlined.0 + global.get $~lib/util/number/_exp local.set $15 i32.const -61 local.get $15 @@ -6564,305 +4925,273 @@ i32.const 3 i32.shl i32.sub - global.set $~lib/internal/number/_K - i32.const 3768 - i32.load - local.set $11 - i32.const 4032 - i32.load - local.set $17 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $11 - local.set $18 - local.get $13 - local.set $19 - i32.const 0 - local.set $20 - local.get $18 - local.get $19 - i32.const 3 - i32.shl - i32.add - local.get $20 - i32.add - i64.load offset=8 - end - global.set $~lib/internal/number/_frc_pow - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $17 - local.set $20 - local.get $13 - local.set $19 - i32.const 0 - local.set $18 - local.get $20 - local.get $19 - i32.const 1 - i32.shl - i32.add - local.get $18 - i32.add - i32.load16_s offset=8 - end - global.set $~lib/internal/number/_exp_pow + global.set $~lib/util/number/_K + i32.const 4672 + local.get $13 + call $~lib/array/Array#__unchecked_get + global.set $~lib/util/number/_frc_pow + i32.const 4896 + local.get $13 + call $~lib/array/Array#__unchecked_get + global.set $~lib/util/number/_exp_pow end local.get $9 i64.clz i32.wrap_i64 - local.set $17 + local.set $13 local.get $9 - local.get $17 + local.get $13 i64.extend_i32_s i64.shl local.set $9 local.get $7 - local.get $17 + local.get $13 i32.sub local.set $7 - global.get $~lib/internal/number/_frc_pow + global.get $~lib/util/number/_frc_pow local.set $12 - global.get $~lib/internal/number/_exp_pow - local.set $11 - block $~lib/internal/number/umul64f|inlined.0 (result i64) + global.get $~lib/util/number/_exp_pow + local.set $14 + block $~lib/util/number/umul64f|inlined.0 (result i64) local.get $9 - local.set $10 + local.set $17 local.get $12 - local.set $21 - local.get $10 + local.set $10 + local.get $17 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $10 i64.const 4294967295 i64.and - local.set $23 - local.get $10 + local.set $19 + local.get $17 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $10 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $22 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $22 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $23 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.const 4294967295 i64.and i64.add - local.set $28 - local.get $28 + local.set $24 + local.get $24 i64.const 2147483647 i64.add - local.set $28 - local.get $27 + local.set $24 + local.get $23 i64.const 32 i64.shr_u - local.set $27 - local.get $28 + local.set $23 + local.get $24 i64.const 32 i64.shr_u - local.set $28 - local.get $24 - local.get $25 + local.set $24 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $23 i64.add - local.get $28 + local.get $24 i64.add end - local.set $28 - block $~lib/internal/number/umul64e|inlined.0 (result i32) + local.set $24 + block $~lib/util/number/umul64e|inlined.0 (result i32) local.get $7 - local.set $13 - local.get $11 - local.set $14 - local.get $13 + local.set $11 local.get $14 + local.set $15 + local.get $11 + local.get $15 i32.add i32.const 64 i32.add end - local.set $14 - block $~lib/internal/number/umul64f|inlined.1 (result i64) - global.get $~lib/internal/number/_frc_plus - local.set $27 + local.set $15 + block $~lib/util/number/umul64f|inlined.1 (result i64) + global.get $~lib/util/number/_frc_plus + local.set $22 local.get $12 - local.set $26 - local.get $27 + local.set $23 + local.get $22 i64.const 4294967295 i64.and - local.set $25 - local.get $26 + local.set $21 + local.get $23 i64.const 4294967295 i64.and - local.set $24 - local.get $27 + local.set $20 + local.get $22 i64.const 32 i64.shr_u - local.set $23 - local.get $26 + local.set $19 + local.get $23 i64.const 32 i64.shr_u - local.set $22 - local.get $25 - local.get $24 + local.set $18 + local.get $21 + local.get $20 i64.mul - local.set $21 - local.get $23 - local.get $24 + local.set $10 + local.get $19 + local.get $20 i64.mul - local.get $21 + local.get $10 i64.const 32 i64.shr_u i64.add - local.set $10 - local.get $25 - local.get $22 + local.set $17 + local.get $21 + local.get $18 i64.mul - local.get $10 + local.get $17 i64.const 4294967295 i64.and i64.add - local.set $29 - local.get $29 + local.set $25 + local.get $25 i64.const 2147483647 i64.add - local.set $29 - local.get $10 + local.set $25 + local.get $17 i64.const 32 i64.shr_u - local.set $10 - local.get $29 + local.set $17 + local.get $25 i64.const 32 i64.shr_u - local.set $29 - local.get $23 - local.get $22 + local.set $25 + local.get $19 + local.get $18 i64.mul - local.get $10 + local.get $17 i64.add - local.get $29 + local.get $25 i64.add end i64.const 1 i64.sub - local.set $29 - block $~lib/internal/number/umul64e|inlined.1 (result i32) - global.get $~lib/internal/number/_exp - local.set $13 + local.set $25 + block $~lib/util/number/umul64e|inlined.1 (result i32) + global.get $~lib/util/number/_exp + local.set $26 + local.get $14 + local.set $11 + local.get $26 local.get $11 - local.set $15 - local.get $13 - local.get $15 i32.add i32.const 64 i32.add end - local.set $15 - block $~lib/internal/number/umul64f|inlined.2 (result i64) - global.get $~lib/internal/number/_frc_minus + local.set $11 + block $~lib/util/number/umul64f|inlined.2 (result i64) + global.get $~lib/util/number/_frc_minus local.set $10 local.get $12 - local.set $21 + local.set $17 local.get $10 i64.const 4294967295 i64.and - local.set $22 - local.get $21 + local.set $18 + local.get $17 i64.const 4294967295 i64.and - local.set $23 + local.set $19 local.get $10 i64.const 32 i64.shr_u - local.set $24 - local.get $21 + local.set $20 + local.get $17 i64.const 32 i64.shr_u - local.set $25 - local.get $22 - local.get $23 + local.set $21 + local.get $18 + local.get $19 i64.mul - local.set $26 - local.get $24 - local.get $23 + local.set $23 + local.get $20 + local.get $19 i64.mul - local.get $26 + local.get $23 i64.const 32 i64.shr_u i64.add - local.set $27 - local.get $22 - local.get $25 + local.set $22 + local.get $18 + local.get $21 i64.mul - local.get $27 + local.get $22 i64.const 4294967295 i64.and i64.add - local.set $30 - local.get $30 + local.set $27 + local.get $27 i64.const 2147483647 i64.add - local.set $30 - local.get $27 + local.set $27 + local.get $22 i64.const 32 i64.shr_u - local.set $27 - local.get $30 + local.set $22 + local.get $27 i64.const 32 i64.shr_u - local.set $30 - local.get $24 - local.get $25 + local.set $27 + local.get $20 + local.get $21 i64.mul - local.get $27 + local.get $22 i64.add - local.get $30 + local.get $27 i64.add end i64.const 1 i64.add - local.set $30 - local.get $29 - local.get $30 - i64.sub local.set $27 - local.get $4 - local.get $28 - local.get $14 - local.get $29 - local.get $15 + local.get $25 local.get $27 + i64.sub + local.set $22 local.get $5 - call $~lib/internal/number/genDigits + local.get $24 + local.get $15 + local.get $25 + local.get $11 + local.get $22 + local.get $4 + call $~lib/util/number/genDigits end - local.set $31 + local.set $28 local.get $0 local.get $2 i32.const 1 i32.shl i32.add - local.get $31 + local.get $28 local.get $2 i32.sub - global.get $~lib/internal/number/_K - call $~lib/internal/number/prettify - local.set $31 - local.get $31 + global.get $~lib/util/number/_K + call $~lib/util/number/prettify + local.set $28 + local.get $28 local.get $2 i32.add ) @@ -6881,14 +5210,14 @@ i32.eqz if i32.const 0 - i32.const 80 - i32.const 254 + i32.const 264 + i32.const 203 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - i32.load + call $~lib/string/String#get:length local.set $3 local.get $1 local.tee $4 @@ -6930,6 +5259,8 @@ local.get $5 i32.lt_s select + i32.const 1 + i32.shl local.set $8 local.get $6 local.tee $4 @@ -6939,6 +5270,8 @@ local.get $5 i32.gt_s select + i32.const 1 + i32.shl local.set $9 local.get $9 local.get $8 @@ -6947,46 +5280,81 @@ local.get $3 i32.eqz if - i32.const 112 + i32.const 120 return end local.get $8 i32.eqz - local.tee $4 if (result i32) local.get $9 local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl i32.eq else - local.get $4 + i32.const 0 end if local.get $0 return end local.get $3 - call $~lib/internal/string/allocateUnsafe + call $~lib/util/runtime/allocate local.set $10 local.get $10 - i32.const 0 local.get $0 local.get $8 + i32.add local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $10 + i32.const 16 + call $~lib/util/runtime/register + ) + (func $~lib/util/runtime/discard (; 64 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 184 + i32.const 115 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + local.set $1 + local.get $1 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if + i32.const 0 + i32.const 184 + i32.const 117 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/memory/memory.free ) - (func $~lib/internal/number/dtoa (; 64 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + (func $~lib/util/number/dtoa (; 65 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) local.get $0 f64.const 0 f64.eq if - i32.const 2664 + i32.const 3840 return end local.get $0 @@ -6996,11 +5364,11 @@ local.get $0 call $~lib/builtins/isNaN if - i32.const 2680 + i32.const 3864 return end - i32.const 2696 - i32.const 2720 + i32.const 3888 + i32.const 3928 local.get $0 f64.const 0 f64.lt @@ -7008,68 +5376,50 @@ return end i32.const 28 - call $~lib/internal/string/allocateUnsafe + i32.const 1 + i32.shl + call $~lib/util/runtime/allocate local.set $1 local.get $1 local.get $0 - call $~lib/internal/number/dtoa_core + call $~lib/util/number/dtoa_core local.set $2 local.get $1 i32.const 0 local.get $2 call $~lib/string/String#substring local.set $3 - block $~lib/internal/string/freeUnsafe|inlined.0 - local.get $1 - local.set $4 - local.get $4 - i32.eqz - if - i32.const 0 - i32.const 136 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.1 - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.1 - end - end + local.get $1 + call $~lib/util/runtime/discard local.get $3 ) - (func $start:std/string (; 65 ;) (type $FUNCSIG$v) + (func $start:std/string (; 66 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) - call $start:~lib/allocator/arena global.get $std/string/str - i32.const 8 + i32.const 24 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 16 + i32.const 72 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.load + call $~lib/string/String#get:length i32.const 16 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 18 + i32.const 72 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -7080,13 +5430,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 19 + i32.const 72 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 call $~lib/string/String.__not i32.eqz i32.const 0 @@ -7094,13 +5444,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 21 + i32.const 72 + i32.const 22 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 120 + i32.const 136 call $~lib/string/String.__not i32.eqz i32.const 1 @@ -7108,13 +5458,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 22 + i32.const 72 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 call $~lib/string/String.__not i32.eqz i32.const 1 @@ -7122,130 +5472,136 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 23 + i32.const 72 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end + 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 i32.const 0 call $~lib/string/String.fromCharCode - i32.const 120 + i32.const 136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 25 + i32.const 72 + i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 54 call $~lib/string/String.fromCharCode - i32.const 192 + i32.const 240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 26 + i32.const 72 + i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 65536 i32.const 54 i32.add call $~lib/string/String.fromCharCode - i32.const 192 + i32.const 240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 27 + i32.const 72 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 call $~lib/string/String.fromCodePoint - i32.const 120 + i32.const 136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 29 + i32.const 72 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 54 call $~lib/string/String.fromCodePoint - i32.const 192 + i32.const 240 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 30 + i32.const 72 + i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 119558 call $~lib/string/String.fromCodePoint i32.eqz if - i32.const 200 - i32.const 48 - i32.const 31 + i32.const 312 + i32.const 72 + i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 208 + i32.const 336 i32.const 0 call $~lib/string/String#startsWith i32.eqz if i32.const 0 - i32.const 48 - i32.const 33 + i32.const 72 + i32.const 34 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 232 - i32.const 0 - call $~lib/string/String#endsWith|trampoline - end + global.get $std/string/str + i32.const 384 + global.get $~lib/string/String.MAX_LENGTH + call $~lib/string/String#endsWith i32.eqz if i32.const 0 - i32.const 48 - i32.const 34 + i32.const 72 + i32.const 35 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block $~lib/string/String#includes|inlined.0 (result i32) global.get $std/string/str - local.set $0 - i32.const 248 + local.set $2 + i32.const 416 local.set $1 i32.const 0 - local.set $2 - local.get $0 - local.get $1 + local.set $0 local.get $2 + local.get $1 + local.get $0 call $~lib/string/String#indexOf i32.const -1 i32.ne @@ -7255,286 +5611,254 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 35 + i32.const 72 + i32.const 36 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 0 - i32.const 0 - call $~lib/string/String#padStart|trampoline - end + global.get $std/string/str + i32.const 0 + i32.const 440 + call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 37 + i32.const 72 + i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 15 - i32.const 0 - call $~lib/string/String#padStart|trampoline - end + global.get $std/string/str + i32.const 15 + i32.const 440 + call $~lib/string/String#padStart global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 38 + i32.const 72 + i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 3 - i32.const 0 - call $~lib/string/String#padStart|trampoline - end - i32.const 272 + i32.const 120 + i32.const 3 + i32.const 440 + call $~lib/string/String#padStart + i32.const 464 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 72 + i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 i32.const 10 - i32.const 112 + i32.const 120 call $~lib/string/String#padStart - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 40 + i32.const 72 + i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 100 - i32.const 112 + i32.const 120 call $~lib/string/String#padStart - i32.const 128 + i32.const 160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 41 + i32.const 72 + i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 288 - i32.const 5 - i32.const 0 - call $~lib/string/String#padStart|trampoline - end - i32.const 304 + i32.const 488 + i32.const 5 + i32.const 440 + call $~lib/string/String#padStart + i32.const 512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 42 + i32.const 72 + i32.const 43 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 i32.const 6 - i32.const 320 + i32.const 544 call $~lib/string/String#padStart - i32.const 336 + i32.const 568 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 43 + i32.const 72 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 i32.const 8 - i32.const 320 + i32.const 544 call $~lib/string/String#padStart - i32.const 352 + i32.const 600 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 44 + i32.const 72 + i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 0 - i32.const 0 - call $~lib/string/String#padEnd|trampoline - end + global.get $std/string/str + i32.const 0 + i32.const 440 + call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 46 + i32.const 72 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 15 - i32.const 0 - call $~lib/string/String#padEnd|trampoline - end + global.get $std/string/str + i32.const 15 + i32.const 440 + call $~lib/string/String#padEnd global.get $std/string/str call $~lib/string/String.__eq i32.eqz if i32.const 0 + i32.const 72 i32.const 48 - i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 3 - i32.const 0 - call $~lib/string/String#padEnd|trampoline - end - i32.const 272 + i32.const 120 + i32.const 3 + i32.const 440 + call $~lib/string/String#padEnd + i32.const 464 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 48 + i32.const 72 + i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 i32.const 10 - i32.const 112 + i32.const 120 call $~lib/string/String#padEnd - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 49 + i32.const 72 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 100 - i32.const 112 + i32.const 120 call $~lib/string/String#padEnd - i32.const 128 + i32.const 160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 72 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 288 - i32.const 5 - i32.const 0 - call $~lib/string/String#padEnd|trampoline - end - i32.const 376 + i32.const 488 + i32.const 5 + i32.const 440 + call $~lib/string/String#padEnd + i32.const 632 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 51 + i32.const 72 + i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 i32.const 6 - i32.const 288 + i32.const 488 call $~lib/string/String#padEnd - i32.const 392 + i32.const 664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 52 + i32.const 72 + i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 + i32.const 488 i32.const 8 - i32.const 288 + i32.const 488 call $~lib/string/String#padEnd - i32.const 408 + i32.const 696 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 53 + i32.const 72 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7542,14 +5866,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 55 + i32.const 72 + i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 208 + i32.const 120 + i32.const 336 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -7557,14 +5881,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 56 + i32.const 72 + i32.const 57 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 - i32.const 128 + i32.const 160 + i32.const 160 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7572,10 +5896,10 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 57 + i32.const 72 + i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str @@ -7587,14 +5911,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 58 + i32.const 72 + i32.const 59 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 112 + i32.const 120 i32.const 0 call $~lib/string/String#indexOf i32.const 0 @@ -7602,14 +5926,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 59 + i32.const 72 + i32.const 60 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 0 call $~lib/string/String#indexOf i32.const 2 @@ -7617,14 +5941,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 60 + i32.const 72 + i32.const 61 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 440 + i32.const 752 i32.const 0 call $~lib/string/String#indexOf i32.const -1 @@ -7632,14 +5956,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 61 + i32.const 72 + i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 2 call $~lib/string/String#indexOf i32.const 2 @@ -7647,14 +5971,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 62 + i32.const 72 + i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 3 call $~lib/string/String#indexOf i32.const -1 @@ -7662,14 +5986,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 63 + i32.const 72 + i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 448 + i32.const 776 i32.const -1 call $~lib/string/String#indexOf i32.const 2 @@ -7677,129 +6001,105 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 64 + i32.const 72 + i32.const 65 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 112 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + i32.const 120 + i32.const 120 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 66 + i32.const 72 + i32.const 67 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 208 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + i32.const 120 + i32.const 336 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const -1 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 67 + i32.const 72 + i32.const 68 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 112 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end global.get $std/string/str - i32.load + i32.const 120 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf + global.get $std/string/str + call $~lib/string/String#get:length i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 68 + i32.const 72 + i32.const 69 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 432 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 728 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 69 + i32.const 72 + i32.const 70 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 440 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 752 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const -1 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 70 + i32.const 72 + i32.const 71 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 464 - i32.const 0 - call $~lib/string/String#lastIndexOf|trampoline - end + global.get $std/string/str + i32.const 800 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#lastIndexOf i32.const 15 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 71 + i32.const 72 + i32.const 72 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 2 call $~lib/string/String#lastIndexOf i32.const 2 @@ -7807,14 +6107,14 @@ i32.eqz if i32.const 0 - i32.const 48 i32.const 72 + i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 432 + i32.const 728 i32.const 3 call $~lib/string/String#lastIndexOf i32.const 2 @@ -7822,14 +6122,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 73 + i32.const 72 + i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 448 + i32.const 776 i32.const -1 call $~lib/string/String#lastIndexOf i32.const -1 @@ -7837,14 +6137,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 74 + i32.const 72 + i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 472 + i32.const 824 i32.const 0 call $~lib/string/String#lastIndexOf i32.const -1 @@ -7852,14 +6152,14 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 75 + i32.const 72 + i32.const 76 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str - i32.const 208 + i32.const 336 i32.const 0 call $~lib/string/String#lastIndexOf i32.const 0 @@ -7867,13 +6167,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 76 + i32.const 72 + i32.const 77 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 480 + i32.const 848 i32.const 0 call $~lib/string/parseInt f64.const 0 @@ -7881,13 +6181,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 82 + i32.const 72 + i32.const 83 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 488 + i32.const 872 i32.const 0 call $~lib/string/parseInt f64.const 1 @@ -7895,13 +6195,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 83 + i32.const 72 + i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 496 + i32.const 896 i32.const 0 call $~lib/string/parseInt f64.const 5 @@ -7909,13 +6209,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 84 + i32.const 72 + i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 512 + i32.const 928 i32.const 0 call $~lib/string/parseInt f64.const 455 @@ -7923,13 +6223,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 85 + i32.const 72 + i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 528 + i32.const 960 i32.const 0 call $~lib/string/parseInt f64.const 3855 @@ -7937,13 +6237,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 86 + i32.const 72 + i32.const 87 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 544 + i32.const 992 i32.const 0 call $~lib/string/parseInt f64.const 3855 @@ -7951,13 +6251,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 87 + i32.const 72 + i32.const 88 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 560 + i32.const 1024 i32.const 0 call $~lib/string/parseInt f64.const 11 @@ -7965,13 +6265,13 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 88 + i32.const 72 + i32.const 89 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 576 + i32.const 1048 i32.const 0 call $~lib/string/parseInt f64.const 1 @@ -7979,458 +6279,458 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 89 + i32.const 72 + i32.const 90 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 480 + i32.const 848 call $~lib/string/parseFloat f64.const 0 f64.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 91 + i32.const 72 + i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 488 + i32.const 872 call $~lib/string/parseFloat f64.const 1 f64.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 92 + i32.const 72 + i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 592 + i32.const 1072 call $~lib/string/parseFloat f64.const 0.1 f64.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 93 + i32.const 72 + i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 608 + i32.const 1096 call $~lib/string/parseFloat f64.const 0.25 f64.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 94 + i32.const 72 + i32.const 95 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 624 + i32.const 1120 call $~lib/string/parseFloat f64.const 0.1 f64.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 95 + i32.const 72 + i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 - i32.const 648 + i32.const 160 + i32.const 1152 call $~lib/string/String.__concat global.set $std/string/c global.get $std/string/c - i32.const 656 + i32.const 1176 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 98 + i32.const 72 + i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/c - i32.const 128 + i32.const 160 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 99 + i32.const 72 + i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 100 + i32.const 72 + i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 global.get $std/string/nullStr call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 101 + i32.const 72 + i32.const 102 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/nullStr - i32.const 112 + i32.const 120 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 102 + i32.const 72 + i32.const 103 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 - i32.const 648 + i32.const 160 + i32.const 1152 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 103 + i32.const 72 + i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 - i32.const 128 + i32.const 160 + i32.const 160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 104 + i32.const 72 + i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 664 - i32.const 680 + i32.const 1200 + i32.const 1224 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 105 + i32.const 72 + i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 664 - i32.const 664 + i32.const 1200 + i32.const 1200 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 106 + i32.const 72 + i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 696 - i32.const 712 + i32.const 1248 + i32.const 1272 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 107 + i32.const 72 + i32.const 108 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 728 - i32.const 744 + i32.const 1296 + i32.const 1328 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 108 + i32.const 72 + i32.const 109 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 760 - i32.const 760 + i32.const 1360 + i32.const 1360 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 109 + i32.const 72 + i32.const 110 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 760 - i32.const 784 + i32.const 1360 + i32.const 1392 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 110 + i32.const 72 + i32.const 111 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 808 - i32.const 840 + i32.const 1424 + i32.const 1464 call $~lib/string/String.__ne i32.eqz if i32.const 0 - i32.const 48 - i32.const 111 + i32.const 72 + i32.const 112 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 648 - i32.const 128 + i32.const 1152 + i32.const 160 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 48 - i32.const 113 + i32.const 72 + i32.const 114 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 864 - i32.const 128 + i32.const 1504 + i32.const 160 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 48 - i32.const 114 + i32.const 72 + i32.const 115 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 864 - i32.const 872 + i32.const 1504 + i32.const 1528 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 48 - i32.const 115 + i32.const 72 + i32.const 116 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 864 - i32.const 656 + i32.const 1504 + i32.const 1176 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 48 - i32.const 116 + i32.const 72 + i32.const 117 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 864 - i32.const 656 + i32.const 1504 + i32.const 1176 call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 - i32.const 117 + i32.const 72 + i32.const 118 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 648 + i32.const 1152 global.get $std/string/nullStr call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 - i32.const 119 + i32.const 72 + i32.const 120 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/nullStr - i32.const 648 + i32.const 1152 call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 - i32.const 120 + i32.const 72 + i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 call $~lib/string/String.__gt i32.eqz if i32.const 0 - i32.const 48 - i32.const 122 + i32.const 72 + i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 288 + i32.const 120 + i32.const 488 call $~lib/string/String.__lt i32.eqz if i32.const 0 - i32.const 48 - i32.const 123 + i32.const 72 + i32.const 124 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 48 - i32.const 124 + i32.const 72 + i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 288 + i32.const 120 + i32.const 488 call $~lib/string/String.__lte i32.eqz if i32.const 0 - i32.const 48 - i32.const 125 + i32.const 72 + i32.const 126 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 - i32.const 126 + i32.const 72 + i32.const 127 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 288 + i32.const 120 + i32.const 488 call $~lib/string/String.__gt i32.eqz i32.eqz if i32.const 0 - i32.const 48 - i32.const 127 + i32.const 72 + i32.const 128 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__lt i32.eqz i32.eqz if i32.const 0 - i32.const 48 - i32.const 128 + i32.const 72 + i32.const 129 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__gt i32.eqz i32.eqz if i32.const 0 - i32.const 48 - i32.const 129 + i32.const 72 + i32.const 130 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__gte i32.eqz if i32.const 0 - i32.const 48 - i32.const 130 + i32.const 72 + i32.const 131 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 - i32.const 112 + i32.const 120 + i32.const 120 call $~lib/string/String.__lte i32.eqz if i32.const 0 - i32.const 48 - i32.const 131 + i32.const 72 + i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 65377 @@ -8448,2207 +6748,2284 @@ i32.eqz if i32.const 0 - i32.const 48 - i32.const 135 + i32.const 72 + i32.const 136 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 320 - i32.load + i32.const 544 + call $~lib/string/String#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 137 + i32.const 72 + i32.const 138 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 112 + i32.const 120 i32.const 100 call $~lib/string/String#repeat - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 139 + i32.const 72 + i32.const 140 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 0 call $~lib/string/String#repeat - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 140 + i32.const 72 + i32.const 141 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 1 call $~lib/string/String#repeat - i32.const 128 + i32.const 160 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 141 + i32.const 72 + i32.const 142 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 2 call $~lib/string/String#repeat - i32.const 872 + i32.const 1528 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 142 + i32.const 72 + i32.const 143 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 3 call $~lib/string/String#repeat - i32.const 880 + i32.const 1552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 143 + i32.const 72 + i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 656 + i32.const 1176 i32.const 4 call $~lib/string/String#repeat - i32.const 896 + i32.const 1576 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 144 + i32.const 72 + i32.const 145 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 5 call $~lib/string/String#repeat - i32.const 920 + i32.const 1608 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 145 + i32.const 72 + i32.const 146 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 6 call $~lib/string/String#repeat - i32.const 936 + i32.const 1640 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 146 + i32.const 72 + i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 128 + i32.const 160 i32.const 7 call $~lib/string/String#repeat - i32.const 952 + i32.const 1672 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 147 + i32.const 72 + i32.const 148 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 976 + i32.const 1704 global.set $std/string/str - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const 0 - i32.const 0 - call $~lib/string/String#slice|trampoline - end - i32.const 976 + global.get $std/string/str + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice + i32.const 1704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 151 + i32.const 72 + i32.const 152 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const -1 - i32.const 0 - call $~lib/string/String#slice|trampoline - end - i32.const 1008 + global.get $std/string/str + i32.const -1 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice + i32.const 1752 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 152 + i32.const 72 + i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/string/str - i32.const -5 - i32.const 0 - call $~lib/string/String#slice|trampoline - end - i32.const 1016 + global.get $std/string/str + i32.const -5 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#slice + i32.const 1776 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 153 + i32.const 72 + i32.const 154 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str i32.const 2 i32.const 7 call $~lib/string/String#slice - i32.const 1032 + i32.const 1808 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 154 + i32.const 72 + i32.const 155 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str i32.const -11 i32.const -6 call $~lib/string/String#slice - i32.const 1048 + i32.const 1840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 155 + i32.const 72 + i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str i32.const 4 i32.const 3 call $~lib/string/String#slice - i32.const 112 + i32.const 120 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 156 + i32.const 72 + i32.const 157 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/string/str i32.const 0 i32.const -1 call $~lib/string/String#slice - i32.const 1064 + i32.const 1872 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 157 + i32.const 72 + i32.const 158 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 0 - global.set $~lib/argc - i32.const 112 - i32.const 0 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 120 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.0 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 112 + i32.const 120 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 162 + i32.const 72 + i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 112 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 120 + i32.const 120 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.1 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 164 + i32.const 72 + i32.const 165 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 112 - i32.const 432 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 120 + i32.const 728 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.2 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 112 + i32.const 120 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 166 + i32.const 72 + i32.const 167 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1192 - i32.const 1208 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 1968 + i32.const 2000 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.3 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1192 + i32.const 1968 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 168 - i32.const 0 - call $~lib/env/abort - unreachable - end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1192 - i32.const 432 - i32.const 0 - call $~lib/string/String#split|trampoline - end - global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.4 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 + i32.const 72 + i32.const 169 + i32.const 0 + call $~lib/builtins/abort + unreachable end + i32.const 1968 + i32.const 728 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split + global.set $std/string/sa + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 170 + i32.const 72 + i32.const 171 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1224 - i32.const 1248 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 2048 + i32.const 2080 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.5 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 172 + i32.const 72 + i32.const 173 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1256 - i32.const 432 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 2104 + i32.const 728 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.6 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 4 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 112 + i32.const 120 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 174 + i32.const 72 + i32.const 175 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1272 - i32.const 432 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 2136 + i32.const 728 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.7 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 4 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 112 + i32.const 120 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 176 + i32.const 72 + i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 1288 - i32.const 432 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 2168 + i32.const 728 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.8 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 4 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 3 call $~lib/array/Array<~lib/string/String>#__get - i32.const 112 + i32.const 120 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 178 + i32.const 72 + i32.const 179 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - i32.const 288 - i32.const 112 - i32.const 0 - call $~lib/string/String#split|trampoline - end + i32.const 488 + i32.const 120 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.9 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 180 + i32.const 72 + i32.const 181 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 i32.const 0 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.10 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 182 + i32.const 72 + i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 i32.const 1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.11 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 184 + i32.const 72 + i32.const 185 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1192 - i32.const 432 + i32.const 1968 + i32.const 728 i32.const 1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.12 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 1 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 186 + i32.const 72 + i32.const 187 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 i32.const 4 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.13 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 188 + i32.const 72 + i32.const 189 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 288 - i32.const 112 + i32.const 488 + i32.const 120 i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.14 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 190 + i32.const 72 + i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1192 - i32.const 432 + i32.const 1968 + i32.const 728 i32.const -1 call $~lib/string/String#split global.set $std/string/sa - block $~lib/array/Array<~lib/string/String>#get:length|inlined.15 (result i32) - global.get $std/string/sa - local.set $2 - local.get $2 - i32.load offset=4 - end + global.get $std/string/sa + call $~lib/array/Array<~lib/string/String>#get:length i32.const 3 i32.eq - local.tee $2 if (result i32) global.get $std/string/sa i32.const 0 call $~lib/array/Array<~lib/string/String>#__get - i32.const 128 + i32.const 160 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 1 call $~lib/array/Array<~lib/string/String>#__get - i32.const 648 + i32.const 1152 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end - local.tee $2 if (result i32) global.get $std/string/sa i32.const 2 call $~lib/array/Array<~lib/string/String>#__get - i32.const 1216 + i32.const 2024 call $~lib/string/String.__eq else - local.get $2 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 48 - i32.const 192 + i32.const 72 + i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - call $~lib/internal/number/itoa32 - i32.const 480 + call $~lib/util/number/itoa32 + i32.const 848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 194 + i32.const 72 + i32.const 195 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 - call $~lib/internal/number/itoa32 - i32.const 488 + call $~lib/util/number/itoa32 + i32.const 872 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 195 + i32.const 72 + i32.const 196 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 - call $~lib/internal/number/itoa32 - i32.const 1824 + call $~lib/util/number/itoa32 + i32.const 2648 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 196 + i32.const 72 + i32.const 197 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123 - call $~lib/internal/number/itoa32 - i32.const 320 + call $~lib/util/number/itoa32 + i32.const 544 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 197 + i32.const 72 + i32.const 198 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1000 - call $~lib/internal/number/itoa32 - i32.const 1832 + call $~lib/util/number/itoa32 + i32.const 2672 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 198 + i32.const 72 + i32.const 199 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1234 - call $~lib/internal/number/itoa32 - i32.const 1848 + call $~lib/util/number/itoa32 + i32.const 2704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 199 + i32.const 72 + i32.const 200 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 12345 - call $~lib/internal/number/itoa32 - i32.const 1864 + call $~lib/util/number/itoa32 + i32.const 2728 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 200 + i32.const 72 + i32.const 201 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 123456 - call $~lib/internal/number/itoa32 - i32.const 1880 + call $~lib/util/number/itoa32 + i32.const 2760 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 201 + i32.const 72 + i32.const 202 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1111111 - call $~lib/internal/number/itoa32 - i32.const 1896 + call $~lib/util/number/itoa32 + i32.const 2792 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 202 + i32.const 72 + i32.const 203 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1234567 - call $~lib/internal/number/itoa32 - i32.const 1920 + call $~lib/util/number/itoa32 + i32.const 2824 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 203 + i32.const 72 + i32.const 204 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483646 - call $~lib/internal/number/itoa32 - i32.const 1944 + call $~lib/util/number/itoa32 + i32.const 2856 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 204 + i32.const 72 + i32.const 205 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483647 - call $~lib/internal/number/itoa32 - i32.const 1968 + call $~lib/util/number/itoa32 + i32.const 2896 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 205 + i32.const 72 + i32.const 206 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2147483648 - call $~lib/internal/number/itoa32 - i32.const 1992 + call $~lib/util/number/itoa32 + i32.const 2936 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 206 + i32.const 72 + i32.const 207 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -1 - call $~lib/internal/number/itoa32 - i32.const 2024 + call $~lib/util/number/itoa32 + i32.const 2976 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 207 + i32.const 72 + i32.const 208 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - call $~lib/internal/number/utoa32 - i32.const 480 + call $~lib/util/number/utoa32 + i32.const 848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 209 + i32.const 72 + i32.const 210 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1000 - call $~lib/internal/number/utoa32 - i32.const 2032 + call $~lib/util/number/utoa32 + i32.const 3000 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 210 + i32.const 72 + i32.const 211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2147483647 - call $~lib/internal/number/utoa32 - i32.const 1968 + call $~lib/util/number/utoa32 + i32.const 2896 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 211 + i32.const 72 + i32.const 212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const -2147483648 - call $~lib/internal/number/utoa32 - i32.const 2048 + call $~lib/util/number/utoa32 + i32.const 3024 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 212 + i32.const 72 + i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u32.MAX_VALUE - call $~lib/internal/number/utoa32 - i32.const 2072 + call $~lib/util/number/utoa32 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 213 + i32.const 72 + i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 - call $~lib/internal/number/utoa64 - i32.const 480 + call $~lib/util/number/utoa64 + i32.const 848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 215 + i32.const 72 + i32.const 216 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 1234 - call $~lib/internal/number/utoa64 - i32.const 1848 + call $~lib/util/number/utoa64 + i32.const 2704 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 216 + i32.const 72 + i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 99999999 - call $~lib/internal/number/utoa64 - i32.const 2096 + call $~lib/util/number/utoa64 + i32.const 3104 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 217 + i32.const 72 + i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 100000000 - call $~lib/internal/number/utoa64 - i32.const 2120 + call $~lib/util/number/utoa64 + i32.const 3136 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 218 + i32.const 72 + i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967295 - call $~lib/internal/number/utoa64 - i32.const 2072 + call $~lib/util/number/utoa64 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 219 + i32.const 72 + i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 68719476735 - call $~lib/internal/number/utoa64 - i32.const 2144 + call $~lib/util/number/utoa64 + i32.const 3176 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 220 + i32.const 72 + i32.const 221 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 868719476735 - call $~lib/internal/number/utoa64 - i32.const 2176 + call $~lib/util/number/utoa64 + i32.const 3216 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 221 + i32.const 72 + i32.const 222 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2208 + call $~lib/util/number/utoa64 + i32.const 3256 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 222 + i32.const 72 + i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 9999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2248 + call $~lib/util/number/utoa64 + i32.const 3304 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 223 + i32.const 72 + i32.const 224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 19999868719476735 - call $~lib/internal/number/utoa64 - i32.const 2288 + call $~lib/util/number/utoa64 + i32.const 3352 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 224 + i32.const 72 + i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/u64.MAX_VALUE - call $~lib/internal/number/utoa64 - i32.const 2328 + call $~lib/util/number/utoa64 + i32.const 3408 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 225 + i32.const 72 + i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 0 - call $~lib/internal/number/itoa64 - i32.const 480 + call $~lib/util/number/itoa64 + i32.const 848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 227 + i32.const 72 + i32.const 228 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -1234 - call $~lib/internal/number/itoa64 - i32.const 2376 + call $~lib/util/number/itoa64 + i32.const 3464 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 228 + i32.const 72 + i32.const 229 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 4294967295 - call $~lib/internal/number/itoa64 - i32.const 2072 + call $~lib/util/number/itoa64 + i32.const 3064 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 229 + i32.const 72 + i32.const 230 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -4294967295 - call $~lib/internal/number/itoa64 - i32.const 2392 + call $~lib/util/number/itoa64 + i32.const 3496 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 230 + i32.const 72 + i32.const 231 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const 68719476735 - call $~lib/internal/number/itoa64 - i32.const 2144 + call $~lib/util/number/itoa64 + i32.const 3176 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 231 + i32.const 72 + i32.const 232 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -68719476735 - call $~lib/internal/number/itoa64 - i32.const 2424 + call $~lib/util/number/itoa64 + i32.const 3536 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 232 + i32.const 72 + i32.const 233 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -868719476735 - call $~lib/internal/number/itoa64 - i32.const 2456 + call $~lib/util/number/itoa64 + i32.const 3576 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 233 + i32.const 72 + i32.const 234 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2488 + call $~lib/util/number/itoa64 + i32.const 3624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 234 + i32.const 72 + i32.const 235 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i64.const -19999868719476735 - call $~lib/internal/number/itoa64 - i32.const 2528 + call $~lib/util/number/itoa64 + i32.const 3672 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 235 + i32.const 72 + i32.const 236 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i64.MAX_VALUE - call $~lib/internal/number/itoa64 - i32.const 2568 + call $~lib/util/number/itoa64 + i32.const 3728 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 236 + i32.const 72 + i32.const 237 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/i64.MIN_VALUE - call $~lib/internal/number/itoa64 - i32.const 2616 + call $~lib/util/number/itoa64 + i32.const 3784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 237 + i32.const 72 + i32.const 238 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 2664 + call $~lib/util/number/dtoa + i32.const 3840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 240 + i32.const 72 + i32.const 241 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0 - call $~lib/internal/number/dtoa - i32.const 2664 + call $~lib/util/number/dtoa + i32.const 3840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 241 + i32.const 72 + i32.const 242 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const nan:0x8000000000000 - call $~lib/internal/number/dtoa - i32.const 2680 + call $~lib/util/number/dtoa + i32.const 3864 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 242 + i32.const 72 + i32.const 243 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 2720 + call $~lib/util/number/dtoa + i32.const 3928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 243 + i32.const 72 + i32.const 244 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf f64.neg - call $~lib/internal/number/dtoa - i32.const 2696 + call $~lib/util/number/dtoa + i32.const 3888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 244 + i32.const 72 + i32.const 245 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON - call $~lib/internal/number/dtoa - i32.const 4112 + call $~lib/util/number/dtoa + i32.const 5016 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 245 + i32.const 72 + i32.const 246 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.EPSILON f64.neg - call $~lib/internal/number/dtoa - i32.const 4160 + call $~lib/util/number/dtoa + i32.const 5080 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 246 + i32.const 72 + i32.const 247 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE - call $~lib/internal/number/dtoa - i32.const 4208 + call $~lib/util/number/dtoa + i32.const 5144 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 247 + i32.const 72 + i32.const 248 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/builtins/f64.MAX_VALUE f64.neg - call $~lib/internal/number/dtoa - i32.const 4264 + call $~lib/util/number/dtoa + i32.const 5208 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 248 + i32.const 72 + i32.const 249 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4185580496821356722454785e274 - call $~lib/internal/number/dtoa - i32.const 4320 + call $~lib/util/number/dtoa + i32.const 5272 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 249 + i32.const 72 + i32.const 250 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.2250738585072014e-308 - call $~lib/internal/number/dtoa - i32.const 4368 + call $~lib/util/number/dtoa + i32.const 5336 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 250 + i32.const 72 + i32.const 251 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4.940656e-318 - call $~lib/internal/number/dtoa - i32.const 4424 + call $~lib/util/number/dtoa + i32.const 5400 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 253 + i32.const 72 + i32.const 254 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9060801153433600 - call $~lib/internal/number/dtoa - i32.const 4456 + call $~lib/util/number/dtoa + i32.const 5448 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 254 + i32.const 72 + i32.const 255 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4708356024711512064 - call $~lib/internal/number/dtoa - i32.const 4496 + call $~lib/util/number/dtoa + i32.const 5504 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 255 + i32.const 72 + i32.const 256 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 9409340012568248320 - call $~lib/internal/number/dtoa - i32.const 4544 + call $~lib/util/number/dtoa + i32.const 5568 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 256 + i32.const 72 + i32.const 257 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 5e-324 - call $~lib/internal/number/dtoa - i32.const 4592 + call $~lib/util/number/dtoa + i32.const 5632 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 257 + i32.const 72 + i32.const 258 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 4608 + call $~lib/util/number/dtoa + i32.const 5664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 263 + i32.const 72 + i32.const 264 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.1 - call $~lib/internal/number/dtoa - i32.const 592 + call $~lib/util/number/dtoa + i32.const 1072 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 264 + i32.const 72 + i32.const 265 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1 - call $~lib/internal/number/dtoa - i32.const 4624 + call $~lib/util/number/dtoa + i32.const 5688 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 265 + i32.const 72 + i32.const 266 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -0.1 - call $~lib/internal/number/dtoa - i32.const 4640 + call $~lib/util/number/dtoa + i32.const 5712 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 266 + i32.const 72 + i32.const 267 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e6 - call $~lib/internal/number/dtoa - i32.const 4656 + call $~lib/util/number/dtoa + i32.const 5736 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 268 + i32.const 72 + i32.const 269 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-06 - call $~lib/internal/number/dtoa - i32.const 4680 + call $~lib/util/number/dtoa + i32.const 5776 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 269 + i32.const 72 + i32.const 270 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e6 - call $~lib/internal/number/dtoa - i32.const 4704 + call $~lib/util/number/dtoa + i32.const 5808 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 270 + i32.const 72 + i32.const 271 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-06 - call $~lib/internal/number/dtoa - i32.const 4728 + call $~lib/util/number/dtoa + i32.const 5848 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 271 + i32.const 72 + i32.const 272 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e7 - call $~lib/internal/number/dtoa - i32.const 4752 + call $~lib/util/number/dtoa + i32.const 5888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 272 + i32.const 72 + i32.const 273 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-07 - call $~lib/internal/number/dtoa - i32.const 4776 + call $~lib/util/number/dtoa + i32.const 5928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 273 + i32.const 72 + i32.const 274 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.e+308 - call $~lib/internal/number/dtoa - i32.const 4792 + call $~lib/util/number/dtoa + i32.const 5952 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 275 + i32.const 72 + i32.const 276 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1.e+308 - call $~lib/internal/number/dtoa - i32.const 4808 + call $~lib/util/number/dtoa + i32.const 5984 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 276 + i32.const 72 + i32.const 277 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const inf - call $~lib/internal/number/dtoa - i32.const 2720 + call $~lib/util/number/dtoa + i32.const 3928 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 277 + i32.const 72 + i32.const 278 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -inf - call $~lib/internal/number/dtoa - i32.const 2696 + call $~lib/util/number/dtoa + i32.const 3888 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 278 + i32.const 72 + i32.const 279 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-308 - call $~lib/internal/number/dtoa - i32.const 4832 + call $~lib/util/number/dtoa + i32.const 6016 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 279 + i32.const 72 + i32.const 280 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-308 - call $~lib/internal/number/dtoa - i32.const 4848 + call $~lib/util/number/dtoa + i32.const 6048 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 280 + i32.const 72 + i32.const 281 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1e-323 - call $~lib/internal/number/dtoa - i32.const 4872 + call $~lib/util/number/dtoa + i32.const 6080 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 281 + i32.const 72 + i32.const 282 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const -1e-323 - call $~lib/internal/number/dtoa - i32.const 4888 + call $~lib/util/number/dtoa + i32.const 6112 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 282 + i32.const 72 + i32.const 283 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0 - call $~lib/internal/number/dtoa - i32.const 2664 + call $~lib/util/number/dtoa + i32.const 3840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 283 + i32.const 72 + i32.const 284 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 4294967272 - call $~lib/internal/number/dtoa - i32.const 4912 + call $~lib/util/number/dtoa + i32.const 6144 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 285 + i32.const 72 + i32.const 286 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.2312145673456234e-08 - call $~lib/internal/number/dtoa - i32.const 4944 + call $~lib/util/number/dtoa + i32.const 6184 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 286 + i32.const 72 + i32.const 287 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 555555555.5555556 - call $~lib/internal/number/dtoa - i32.const 4992 + call $~lib/util/number/dtoa + i32.const 6248 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 288 + i32.const 72 + i32.const 289 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.9999999999999999 - call $~lib/internal/number/dtoa - i32.const 5032 + call $~lib/util/number/dtoa + i32.const 6304 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 289 + i32.const 72 + i32.const 290 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 - call $~lib/internal/number/dtoa - i32.const 4608 + call $~lib/util/number/dtoa + i32.const 5664 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 290 + i32.const 72 + i32.const 291 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 12.34 - call $~lib/internal/number/dtoa - i32.const 5072 + call $~lib/util/number/dtoa + i32.const 6360 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 291 + i32.const 72 + i32.const 292 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1 f64.const 3 f64.div - call $~lib/internal/number/dtoa - i32.const 5088 + call $~lib/util/number/dtoa + i32.const 6392 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 293 + i32.const 72 + i32.const 294 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1234e17 - call $~lib/internal/number/dtoa - i32.const 5128 + call $~lib/util/number/dtoa + i32.const 6448 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 294 + i32.const 72 + i32.const 295 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1234e18 - call $~lib/internal/number/dtoa - i32.const 5184 + call $~lib/util/number/dtoa + i32.const 6512 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 295 + i32.const 72 + i32.const 296 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 2.71828 - call $~lib/internal/number/dtoa - i32.const 5208 + call $~lib/util/number/dtoa + i32.const 6552 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 296 + i32.const 72 + i32.const 297 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.0271828 - call $~lib/internal/number/dtoa - i32.const 5232 + call $~lib/util/number/dtoa + i32.const 6584 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 297 + i32.const 72 + i32.const 298 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 271.828 - call $~lib/internal/number/dtoa - i32.const 5256 + call $~lib/util/number/dtoa + i32.const 6624 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 298 + i32.const 72 + i32.const 299 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1e+128 - call $~lib/internal/number/dtoa - i32.const 5280 + call $~lib/util/number/dtoa + i32.const 6656 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 299 + i32.const 72 + i32.const 300 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 1.1e-64 - call $~lib/internal/number/dtoa - i32.const 5304 + call $~lib/util/number/dtoa + i32.const 6688 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 300 + i32.const 72 + i32.const 301 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end f64.const 0.000035689 - call $~lib/internal/number/dtoa - i32.const 5328 + call $~lib/util/number/dtoa + i32.const 6720 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 48 - i32.const 301 + i32.const 72 + i32.const 302 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/string/getString (; 66 ;) (type $FUNCSIG$i) (result i32) + (func $std/string/getString (; 67 ;) (type $FUNCSIG$i) (result i32) global.get $std/string/str ) - (func $start (; 67 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 68 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 69 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 71 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 73 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 74 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 75 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 76 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 77 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 78 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 79 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 80 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 81 ;) (type $FUNCSIG$v) call $start:std/string + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 68 ;) (type $FUNCSIG$v) + (func $null (; 82 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/symbol.json b/tests/compiler/std/symbol.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 b49424c1d1..a9129fb90a 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,47 +1,69 @@ (module - (type $FUNCSIG$v (func)) (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))) (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$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\001\002\003") - (data (i32.const 24) "\0d\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") - (data (i32.const 56) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 104) "\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") - (data (i32.const 176) "\0b\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") - (data (i32.const 208) "\12\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") - (data (i32.const 248) "\08\00\00\00i\00s\00R\00e\00g\00E\00x\00p") - (data (i32.const 272) "\05\00\00\00m\00a\00t\00c\00h") - (data (i32.const 288) "\07\00\00\00r\00e\00p\00l\00a\00c\00e") - (data (i32.const 312) "\06\00\00\00s\00e\00a\00r\00c\00h") - (data (i32.const 328) "\07\00\00\00s\00p\00e\00c\00i\00e\00s") - (data (i32.const 352) "\05\00\00\00s\00p\00l\00i\00t") - (data (i32.const 368) "\0b\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") - (data (i32.const 400) "\0b\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") - (data (i32.const 432) "\0b\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") - (data (i32.const 464) "\07\00\00\00S\00y\00m\00b\00o\00l\00(") - (data (i32.const 488) "\04\00\00\00n\00u\00l\00l") - (data (i32.const 504) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 536) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") - (data (i32.const 592) "\01\00\00\00)") - (data (i32.const 600) "\08\00\00\00S\00y\00m\00b\00o\00l\00(\00)") - (data (i32.const 624) "\0b\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)") - (data (i32.const 656) "\13\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") - (data (i32.const 704) "\1a\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)") - (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) "\10\00\00\00\06") + (data (i32.const 24) "1\002\003") + (data (i32.const 32) "\10\00\00\00\1a") + (data (i32.const 48) "s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") + (data (i32.const 80) "\10\00\00\00(") + (data (i32.const 96) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 136) "\10\00\00\00&") + (data (i32.const 152) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 192) "\10") + (data (i32.const 208) "\10\00\00\00\16") + (data (i32.const 224) "h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e") + (data (i32.const 248) "\10\00\00\00$") + (data (i32.const 264) "i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e") + (data (i32.const 304) "\10\00\00\00\10") + (data (i32.const 320) "i\00s\00R\00e\00g\00E\00x\00p") + (data (i32.const 336) "\10\00\00\00\n") + (data (i32.const 352) "m\00a\00t\00c\00h") + (data (i32.const 368) "\10\00\00\00\0e") + (data (i32.const 384) "r\00e\00p\00l\00a\00c\00e") + (data (i32.const 400) "\10\00\00\00\0c") + (data (i32.const 416) "s\00e\00a\00r\00c\00h") + (data (i32.const 432) "\10\00\00\00\0e") + (data (i32.const 448) "s\00p\00e\00c\00i\00e\00s") + (data (i32.const 464) "\10\00\00\00\n") + (data (i32.const 480) "s\00p\00l\00i\00t") + (data (i32.const 496) "\10\00\00\00\16") + (data (i32.const 512) "t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e") + (data (i32.const 536) "\10\00\00\00\16") + (data (i32.const 552) "t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g") + (data (i32.const 576) "\10\00\00\00\16") + (data (i32.const 592) "u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s") + (data (i32.const 616) "\10\00\00\00\0e") + (data (i32.const 632) "S\00y\00m\00b\00o\00l\00(") + (data (i32.const 648) "\10\00\00\00\08") + (data (i32.const 664) "n\00u\00l\00l") + (data (i32.const 672) "\10\00\00\00\02") + (data (i32.const 688) ")") + (data (i32.const 696) "\10\00\00\00\10") + (data (i32.const 712) "S\00y\00m\00b\00o\00l\00(\00)") + (data (i32.const 728) "\10\00\00\00\16") + (data (i32.const 744) "S\00y\00m\00b\00o\00l\00(\001\002\003\00)") + (data (i32.const 768) "\10\00\00\00&") + (data (i32.const 784) "S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)") + (data (i32.const 824) "\10\00\00\004") + (data (i32.const 840) "S\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)") + (data (i32.const 896) "\10\00\00\00\1e") + (data (i32.const 912) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 944) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00I\00\00\00\0e") (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/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) @@ -52,9 +74,17 @@ (global $std/symbol/hasInstance (mut i32) (i32.const 0)) (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -116,307 +146,349 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (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 104 - 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.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 3 ;) (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 + i32.store offset=4 local.get $1 + i32.const 16 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 + ) + (func $~lib/util/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) 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.const 1104 i32.le_u if - return + i32.const 0 + i32.const 96 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end - i32.const 0 local.get $0 + i32.const 16 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 + i32.load + i32.const -1520547049 + i32.ne if - return + i32.const 0 + i32.const 96 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable 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/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - local.get $0 - i32.const 1073741816 - i32.gt_u - if + block $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 i32.const 0 - i32.const 56 - i32.const 47 - i32.const 40 - call $~lib/env/abort - unreachable - end - local.get $0 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $2 - local.get $1 - i32.eqz - if - local.get $2 - i32.const 8 + 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 + br_if $~lib/util/memory/memset|inlined.0 local.get $0 - call $~lib/internal/memory/memset - end - local.get $2 - ) - (func $~lib/map/Map<~lib/string/String,usize>#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32) - local.get $0 - i32.const 16 - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store - local.get $0 - i32.const 3 - i32.store offset=4 - local.get $0 - i32.const 48 - i32.const 1 - call $~lib/arraybuffer/ArrayBuffer#constructor - i32.store offset=8 - local.get $0 - i32.const 4 - i32.store offset=12 - local.get $0 - i32.const 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + local.get $1 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $1 + i32.sub + local.set $2 + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + i32.store + local.get $2 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + 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 + end + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741808 + i32.gt_u + if + i32.const 0 + i32.const 152 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable + end + local.get $0 + call $~lib/util/runtime/allocate + local.tee $1 + local.get $0 + call $~lib/memory/memory.fill + local.get $1 + i32.const 15 + call $~lib/util/runtime/register + ) + (func $~lib/map/Map<~lib/string/String,usize>#clear (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + i32.const 16 + call $~lib/arraybuffer/ArrayBuffer#constructor + i32.store + local.get $0 + i32.const 3 + i32.store offset=4 + local.get $0 + i32.const 48 + call $~lib/arraybuffer/ArrayBuffer#constructor + i32.store offset=8 + local.get $0 + i32.const 4 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $0 + i32.const 0 + i32.store offset=20 + ) + (func $~lib/map/Map<~lib/string/String,usize>#constructor (; 7 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + i32.const 24 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $0 + i32.const 0 i32.store offset=16 local.get $0 i32.const 0 i32.store offset=20 + local.get $0 + call $~lib/map/Map<~lib/string/String,usize>#clear + local.get $0 ) - (func $~lib/map/Map<~lib/string/String,usize>#constructor (; 6 ;) (type $FUNCSIG$i) (result i32) + (func $~lib/map/Map#constructor (; 8 ;) (type $FUNCSIG$i) (result i32) (local $0 i32) i32.const 24 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.tee $0 i32.const 0 i32.store @@ -439,55 +511,64 @@ call $~lib/map/Map<~lib/string/String,usize>#clear local.get $0 ) - (func $~lib/internal/hash/hashStr (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hashStr (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const -2128831035 - local.set $2 + local.set $1 local.get $0 - i32.load - i32.const 1 - i32.shl - local.set $3 - loop $repeat|0 + if block $break|0 - local.get $1 - local.get $3 - i32.ge_u - br_if $break|0 local.get $0 - local.get $1 - i32.add - i32.load8_u offset=4 - local.get $2 - i32.xor - i32.const 16777619 - i32.mul - local.set $2 - local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 i32.const 1 - i32.add - local.set $1 - br $repeat|0 + i32.shr_u + i32.const 1 + i32.shl + local.set $3 + loop $repeat|0 + local.get $2 + local.get $3 + i32.ge_u + br_if $break|0 + local.get $0 + local.get $2 + i32.add + i32.load8_u + local.get $1 + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end + unreachable end end - local.get $2 + local.get $1 ) - (func $~lib/internal/string/compareUnsafe (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) loop $continue|0 local.get $2 if (result i32) local.get $0 - i32.load16_u offset=4 + i32.load16_u local.get $1 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $3 i32.eqz else - local.get $2 + i32.const 0 end if local.get $2 @@ -507,7 +588,7 @@ end local.get $3 ) - (func $~lib/string/String.__eq (; 9 ;) (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.get $0 local.get $1 @@ -516,25 +597,28 @@ i32.const 1 return end - local.get $0 - i32.eqz - local.tee $2 + local.get $1 i32.eqz - if - local.get $1 - i32.eqz - local.set $2 - end - local.get $2 + i32.const 1 + local.get $0 + select if i32.const 0 return end local.get $0 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u local.tee $2 local.get $1 - i32.load + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u i32.ne if i32.const 0 @@ -543,10 +627,10 @@ local.get $0 local.get $1 local.get $2 - call $~lib/internal/string/compareUnsafe + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 i32.load local.get $0 @@ -556,40 +640,38 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $1 + i32.load + local.set $0 loop $continue|0 - local.get $1 + local.get $0 if - local.get $1 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 if (result i32) - local.get $1 - i32.load - i32.const 8 - call $~lib/string/String.__eq + i32.const 0 else local.get $0 + i32.load + i32.const 24 + call $~lib/string/String.__eq end if - local.get $1 + local.get $0 return end - local.get $1 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $1 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -600,13 +682,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -614,13 +695,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -628,9 +706,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -654,19 +730,19 @@ local.get $3 local.get $2 i32.load - call $~lib/internal/hash/hashStr + call $~lib/util/hash/hashStr local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -680,13 +756,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -696,13 +772,13 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 - i32.const 8 - call $~lib/internal/hash/hashStr + i32.const 24 + call $~lib/util/hash/hashStr local.tee $3 call $~lib/map/Map<~lib/string/String,usize>#find local.tee $2 @@ -750,15 +826,13 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 12 i32.mul + local.get $2 i32.add local.tee $2 - i32.const 8 + i32.const 24 i32.store local.get $2 local.get $1 @@ -780,14 +854,14 @@ i32.shl i32.add local.tee $0 - i32.load offset=8 + i32.load i32.store offset=8 local.get $0 local.get $2 - i32.store offset=8 + i32.store end ) - (func $~lib/internal/hash/hash32 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -818,7 +892,7 @@ i32.const 16777619 i32.mul ) - (func $~lib/map/Map#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.load local.get $0 @@ -828,40 +902,38 @@ i32.const 2 i32.shl i32.add - i32.load offset=8 - local.set $2 + i32.load + local.set $0 loop $continue|0 - local.get $2 + local.get $0 if - local.get $2 + local.get $0 i32.load offset=8 i32.const 1 i32.and - i32.eqz - local.tee $0 - if - local.get $2 + if (result i32) + i32.const 0 + else + local.get $0 i32.load local.get $1 i32.eq - local.set $0 end - local.get $0 if - local.get $2 + local.get $0 return end - local.get $2 + local.get $0 i32.load offset=8 i32.const -2 i32.and - local.set $2 + local.set $0 br $continue|0 end end i32.const 0 ) - (func $~lib/map/Map#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -872,13 +944,12 @@ local.get $1 i32.const 1 i32.add - local.tee $2 + local.tee $4 i32.const 2 i32.shl - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $4 - local.get $2 + local.set $5 + local.get $4 f64.convert_i32_s f64.const 2.6666666666666665 f64.mul @@ -886,13 +957,10 @@ local.tee $6 i32.const 12 i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $5 + local.set $4 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.tee $2 local.get $0 i32.load offset=16 @@ -900,9 +968,7 @@ i32.mul i32.add local.set $7 - local.get $5 - i32.const 8 - i32.add + local.get $4 local.set $3 loop $continue|0 local.get $2 @@ -926,19 +992,19 @@ local.get $3 local.get $2 i32.load - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.get $1 i32.and i32.const 2 i32.shl - local.get $4 + local.get $5 i32.add local.tee $8 - i32.load offset=8 + i32.load i32.store offset=8 local.get $8 local.get $3 - i32.store offset=8 + i32.store local.get $3 i32.const 12 i32.add @@ -952,13 +1018,13 @@ end end local.get $0 - local.get $4 + local.get $5 i32.store local.get $0 local.get $1 i32.store offset=4 local.get $0 - local.get $5 + local.get $4 i32.store offset=8 local.get $0 local.get $6 @@ -968,20 +1034,20 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#set (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 local.get $1 local.get $1 - call $~lib/internal/hash/hash32 + call $~lib/util/hash/hash32 local.tee $3 call $~lib/map/Map#find local.tee $2 if local.get $2 - i32.const 8 + i32.const 24 i32.store offset=4 else local.get $0 @@ -1023,1071 +1089,204 @@ i32.const 1 i32.add i32.store offset=16 - local.get $2 - i32.const 8 - i32.add local.get $4 i32.const 12 i32.mul + local.get $2 i32.add local.tee $2 local.get $1 i32.store local.get $2 - i32.const 8 + i32.const 24 i32.store offset=4 local.get $0 local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $2 - local.get $0 - i32.load - local.get $0 - i32.load offset=4 - local.get $3 - i32.and - i32.const 2 - i32.shl - i32.add - local.tee $0 - i32.load offset=8 - i32.store offset=8 - local.get $0 - local.get $2 - i32.store offset=8 - end - ) - (func $~lib/symbol/Symbol.for (; 17 ;) (type $FUNCSIG$i) (result i32) - (local $0 i32) - global.get $~lib/symbol/stringToId - if - global.get $~lib/symbol/stringToId - i32.const 8 - call $~lib/internal/hash/hashStr - call $~lib/map/Map<~lib/string/String,usize>#find - if - global.get $~lib/symbol/stringToId - i32.const 8 - call $~lib/internal/hash/hashStr - call $~lib/map/Map<~lib/string/String,usize>#find - local.tee $0 - if (result i32) - local.get $0 - i32.load offset=4 - else - unreachable - end - return - end - else - call $~lib/map/Map<~lib/string/String,usize>#constructor - global.set $~lib/symbol/stringToId - call $~lib/map/Map<~lib/string/String,usize>#constructor - global.set $~lib/symbol/idToString - end - global.get $~lib/symbol/nextId - local.tee $0 - i32.const 1 - i32.add - global.set $~lib/symbol/nextId - local.get $0 - i32.eqz - if - unreachable - end - global.get $~lib/symbol/stringToId - local.get $0 - call $~lib/map/Map<~lib/string/String,usize>#set - global.get $~lib/symbol/idToString - local.get $0 - call $~lib/map/Map#set - local.get $0 - ) - (func $~lib/map/Map#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/internal/hash/hash32 - call $~lib/map/Map#find - i32.const 0 - i32.ne - ) - (func $~lib/map/Map#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - local.get $1 - local.get $1 - call $~lib/internal/hash/hash32 - call $~lib/map/Map#find - local.tee $0 - if (result i32) - local.get $0 - i32.load offset=4 - else - unreachable - end - ) - (func $~lib/symbol/Symbol.keyFor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - global.get $~lib/symbol/idToString - i32.const 0 - i32.ne - local.tee $1 - if - global.get $~lib/symbol/idToString - local.get $0 - call $~lib/map/Map#has - local.set $1 - end - local.get $1 - if (result i32) - global.get $~lib/symbol/idToString - local.get $0 - call $~lib/map/Map#get - else - i32.const 0 - end - ) - (func $~lib/internal/string/allocateUnsafe (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if - local.get $0 - i32.const 536870910 - i32.le_s - local.set $1 - end - local.get $1 - i32.eqz - if - i32.const 0 - i32.const 536 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.const 1 - i32.shl - i32.const 4 - i32.add - call $~lib/allocator/arena/__memory_allocate - local.tee $1 - local.get $0 - i32.store - local.get $1 - ) - (func $~lib/internal/memory/memcpy (; 22 ;) (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.load offset=20 i32.const 1 i32.add - local.set $1 + i32.store offset=20 + local.get $2 + local.get $0 + i32.load + local.get $0 + i32.load offset=4 local.get $3 - local.get $4 - i32.load8_u - i32.store8 - end - local.get $2 - i32.const 1 - i32.and - if + i32.and + i32.const 2 + i32.shl + i32.add + local.tee $0 + i32.load + i32.store offset=8 local.get $0 - local.get $1 - i32.load8_u - i32.store8 + local.get $2 + i32.store end ) - (func $~lib/internal/memory/memmove (; 23 ;) (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 + (func $~lib/symbol/_Symbol.for (; 19 ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + global.get $~lib/symbol/stringToId if - return + global.get $~lib/symbol/stringToId + i32.const 24 + call $~lib/util/hash/hashStr + call $~lib/map/Map<~lib/string/String,usize>#find + if + global.get $~lib/symbol/stringToId + i32.const 24 + call $~lib/util/hash/hashStr + call $~lib/map/Map<~lib/string/String,usize>#find + local.tee $0 + if (result i32) + local.get $0 + i32.load offset=4 + else + unreachable + end + return + end + else + call $~lib/map/Map<~lib/string/String,usize>#constructor + global.set $~lib/symbol/stringToId + call $~lib/map/Map#constructor + global.set $~lib/symbol/idToString end - local.get $1 - local.get $2 + global.get $~lib/symbol/nextId + local.tee $0 + i32.const 1 i32.add + global.set $~lib/symbol/nextId local.get $0 - i32.le_u - local.tee $3 i32.eqz if + unreachable + end + global.get $~lib/symbol/stringToId + local.get $0 + call $~lib/map/Map<~lib/string/String,usize>#set + global.get $~lib/symbol/idToString + local.get $0 + call $~lib/map/Map#set + local.get $0 + ) + (func $~lib/map/Map#has (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + i32.const 0 + i32.ne + ) + (func $~lib/map/Map#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + local.get $1 + local.get $1 + call $~lib/util/hash/hash32 + call $~lib/map/Map#find + local.tee $0 + if (result i32) local.get $0 - local.get $2 - i32.add - local.get $1 - i32.le_u - local.set $3 + i32.load offset=4 + else + unreachable end - local.get $3 - if + ) + (func $~lib/symbol/_Symbol.keyFor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + global.get $~lib/symbol/idToString + if (result i32) + global.get $~lib/symbol/idToString local.get $0 - local.get $1 - local.get $2 - call $~lib/internal/memory/memcpy - return + call $~lib/map/Map#has + else + i32.const 0 end - local.get $0 - local.get $1 - i32.lt_u - if - local.get $1 - i32.const 7 - i32.and + if (result i32) + global.get $~lib/symbol/idToString local.get $0 - i32.const 7 - i32.and + call $~lib/map/Map#get + else + i32.const 0 + end + ) + (func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u if - loop $continue|0 - local.get $0 - i32.const 7 - i32.and - if - local.get $2 - i32.eqz + 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 - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 1 - i32.sub - local.set $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 @@ -2102,100 +1301,71 @@ 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.const 1 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 + br $continue|2 end end - end - loop $continue|2 - local.get $2 + else + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq 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 + loop $continue|3 + local.get $0 local.get $2 - i32.eqz + i32.add + i32.const 7 + i32.and if - return + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 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 + 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|4 + loop $continue|5 local.get $2 - i32.const 8 - i32.ge_u if local.get $2 - i32.const 8 + i32.const 1 i32.sub local.tee $2 local.get $0 @@ -2203,106 +1373,77 @@ local.get $1 local.get $2 i32.add - i64.load - i64.store - br $continue|4 + i32.load8_u + i32.store8 + br $continue|5 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/string/copyUnsafe (; 24 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - local.get $1 - i32.const 1 - i32.shl - local.get $0 - i32.add - i32.const 4 - i32.add - local.get $2 - i32.const 4 - i32.add - local.get $3 - i32.const 1 - i32.shl - call $~lib/internal/memory/memmove - ) - (func $~lib/string/String#concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.eqz - if - i32.const 0 - i32.const 504 - i32.const 110 - i32.const 4 - call $~lib/env/abort - unreachable - end - local.get $0 - i32.load - local.tee $3 local.get $1 - i32.const 488 + i32.const 664 local.get $1 select - local.tee $1 - i32.load + local.tee $3 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl local.tee $4 + local.get $0 + i32.const 16 + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + i32.const 1 + i32.shl + local.tee $1 i32.add local.tee $2 i32.eqz if - i32.const 168 + i32.const 208 return end local.get $2 - call $~lib/internal/string/allocateUnsafe + call $~lib/util/runtime/allocate local.tee $2 - i32.const 0 local.get $0 - local.get $3 - call $~lib/internal/string/copyUnsafe + local.get $1 + call $~lib/memory/memory.copy + local.get $1 local.get $2 + i32.add local.get $3 - local.get $1 local.get $4 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $2 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/string/String.__concat (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.const 488 + i32.const 664 local.get $0 select local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/symbol#toString (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) - i32.const 168 - local.set $2 - i32.const 464 + i32.const 208 + local.set $1 + i32.const 632 block $break|0 (result i32) block $case11|0 block $case10|0 @@ -2320,80 +1461,73 @@ i32.ne if local.get $0 - local.tee $1 + local.tee $2 i32.const 2 i32.eq br_if $case1|0 block $tablify|0 - local.get $1 + local.get $2 i32.const 3 i32.sub br_table $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $tablify|0 end br $case11|0 end - i32.const 176 + i32.const 224 br $break|0 end - i32.const 208 + i32.const 264 br $break|0 end - i32.const 248 + i32.const 320 br $break|0 end - i32.const 272 + i32.const 352 br $break|0 end - i32.const 288 + i32.const 384 br $break|0 end - i32.const 312 + i32.const 416 br $break|0 end - i32.const 328 + i32.const 448 br $break|0 end - i32.const 352 + i32.const 480 br $break|0 end - i32.const 368 + i32.const 512 br $break|0 end - i32.const 400 + i32.const 552 br $break|0 end - i32.const 432 + i32.const 592 br $break|0 end global.get $~lib/symbol/idToString - i32.const 0 - i32.ne - local.tee $1 - if + if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#has - local.set $1 + else + i32.const 0 end - local.get $1 if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#get else - i32.const 168 + i32.const 208 end end call $~lib/string/String.__concat - i32.const 592 + i32.const 688 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 28 ;) (type $FUNCSIG$v) + (func $start:std/symbol (; 27 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 760 - global.set $~lib/allocator/arena/startOffset - global.get $~lib/allocator/arena/startOffset - global.set $~lib/allocator/arena/offset global.get $~lib/symbol/nextId local.tee $0 i32.const 1 @@ -2423,67 +1557,83 @@ i32.eq if i32.const 0 - i32.const 24 - i32.const 6 + i32.const 48 + i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $~lib/symbol/Symbol.for + i32.const 1104 + global.set $~lib/allocator/arena/startOffset + global.get $~lib/allocator/arena/startOffset + global.set $~lib/allocator/arena/offset + call $~lib/symbol/_Symbol.for global.set $std/symbol/sym3 - call $~lib/symbol/Symbol.for + call $~lib/symbol/_Symbol.for global.set $std/symbol/sym4 global.get $std/symbol/sym3 global.get $std/symbol/sym4 i32.ne if i32.const 0 - i32.const 24 - i32.const 11 + i32.const 48 + i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym1 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key1 global.get $std/symbol/sym2 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key2 global.get $std/symbol/key1 if i32.const 0 - i32.const 24 - i32.const 16 + i32.const 48 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/key2 if i32.const 0 - i32.const 24 - i32.const 17 + i32.const 48 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym3 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 global.set $std/symbol/key3 global.get $std/symbol/sym4 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor + local.tee $0 + i32.eqz + if + unreachable + end + local.get $0 global.set $std/symbol/key4 global.get $std/symbol/key3 - i32.const 8 + i32.const 24 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 22 + i32.const 48 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/key3 @@ -2492,10 +1642,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 23 + i32.const 48 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/symbol/nextId @@ -2509,29 +1659,29 @@ unreachable end local.get $0 - call $~lib/symbol/symbol#toString - i32.const 600 + call $~lib/symbol/_Symbol#toString + i32.const 712 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 25 + i32.const 48 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym3 - call $~lib/symbol/symbol#toString - i32.const 624 + call $~lib/symbol/_Symbol#toString + i32.const 744 call $~lib/string/String.__eq i32.eqz if i32.const 0 + i32.const 48 i32.const 24 - i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -2539,36 +1689,213 @@ i32.const 2 global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance - call $~lib/symbol/symbol#toString - i32.const 656 + call $~lib/symbol/_Symbol#toString + i32.const 784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 30 + i32.const 48 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/isConcatSpreadable - call $~lib/symbol/symbol#toString - i32.const 704 + call $~lib/symbol/_Symbol#toString + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 31 + i32.const 48 + i32.const 29 + i32.const 0 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/runtime/runtime.instanceof (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 944 + i32.load + i32.le_u + else i32.const 0 - call $~lib/env/abort + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 944 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 944 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 944 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 944 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 944 + i32.add + i32.load + end + local.tee $3 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $2 + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $0 + local.get $1 + i32.store + local.get $0 + local.get $1 + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $3 + i32.const 1024 + i32.and + if + local.get $1 + local.get $2 + i32.add + local.set $2 + loop $continue|0 + local.get $1 + local.get $2 + i32.lt_u + if + local.get $1 + i32.load + if + i32.const 0 + i32.const 912 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 34 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 35 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 912 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable ) - (func $start (; 29 ;) (type $FUNCSIG$v) + (func $start (; 36 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 30 ;) (type $FUNCSIG$v) + (func $null (; 37 ;) (type $FUNCSIG$v) nop ) ) diff --git a/tests/compiler/std/symbol.ts b/tests/compiler/std/symbol.ts index e5168b36aa..9fb8c76a71 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"); @@ -16,8 +14,8 @@ var key2 = Symbol.keyFor(sym2); assert(key1 === null); assert(key2 === null); -var key3 = Symbol.keyFor(sym3); -var key4 = Symbol.keyFor(sym4); +var key3 = Symbol.keyFor(sym3)!; +var key4 = Symbol.keyFor(sym4)!; assert(key3 == "123"); assert(key3 == key4); diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 91393d7c6d..d5a21860a9 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -1,49 +1,52 @@ (module - (type $FUNCSIG$v (func)) (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))) (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$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$viiiii (func (param i32 i32 i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$v (func)) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\03\00\00\001\002\003\00") - (data (i32.const 24) "\0d\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") - (data (i32.const 56) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 104) "\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") - (data (i32.const 168) "\00\00\00\00") - (data (i32.const 176) "\0b\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") - (data (i32.const 208) "\12\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") - (data (i32.const 248) "\08\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") - (data (i32.const 272) "\05\00\00\00m\00a\00t\00c\00h\00") - (data (i32.const 288) "\07\00\00\00r\00e\00p\00l\00a\00c\00e\00") - (data (i32.const 312) "\06\00\00\00s\00e\00a\00r\00c\00h\00") - (data (i32.const 328) "\07\00\00\00s\00p\00e\00c\00i\00e\00s\00") - (data (i32.const 352) "\05\00\00\00s\00p\00l\00i\00t\00") - (data (i32.const 368) "\0b\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") - (data (i32.const 400) "\0b\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") - (data (i32.const 432) "\0b\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") - (data (i32.const 464) "\07\00\00\00S\00y\00m\00b\00o\00l\00(\00") - (data (i32.const 488) "\04\00\00\00n\00u\00l\00l\00") - (data (i32.const 504) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 536) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 592) "\01\00\00\00)\00") - (data (i32.const 600) "\08\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") - (data (i32.const 624) "\0b\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") - (data (i32.const 656) "\13\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") - (data (i32.const 704) "\1a\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") + (data (i32.const 8) "\10\00\00\00\06\00\00\00\00\00\00\00\00\00\00\001\002\003\00") + (data (i32.const 32) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") + (data (i32.const 80) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 136) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 192) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 208) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00") + (data (i32.const 248) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00i\00s\00C\00o\00n\00c\00a\00t\00S\00p\00r\00e\00a\00d\00a\00b\00l\00e\00") + (data (i32.const 304) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00i\00s\00R\00e\00g\00E\00x\00p\00") + (data (i32.const 336) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00m\00a\00t\00c\00h\00") + (data (i32.const 368) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00r\00e\00p\00l\00a\00c\00e\00") + (data (i32.const 400) "\10\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00s\00e\00a\00r\00c\00h\00") + (data (i32.const 432) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00s\00p\00e\00c\00i\00e\00s\00") + (data (i32.const 464) "\10\00\00\00\n\00\00\00\00\00\00\00\00\00\00\00s\00p\00l\00i\00t\00") + (data (i32.const 496) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00t\00o\00P\00r\00i\00m\00i\00t\00i\00v\00e\00") + (data (i32.const 536) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00T\00a\00g\00") + (data (i32.const 576) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00u\00n\00s\00c\00o\00p\00a\00b\00l\00e\00s\00") + (data (i32.const 616) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\00") + (data (i32.const 648) "\10\00\00\00\08\00\00\00\00\00\00\00\00\00\00\00n\00u\00l\00l\00") + (data (i32.const 672) "\10\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00)\00") + (data (i32.const 696) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\00)\00") + (data (i32.const 728) "\10\00\00\00\16\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\001\002\003\00)\00") + (data (i32.const 768) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00S\00y\00m\00b\00o\00l\00(\00h\00a\00s\00I\00n\00s\00t\00a\00n\00c\00e\00)\00") + (data (i32.const 824) "\10\00\00\004\00\00\00\00\00\00\00\00\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") + (data (i32.const 896) "\10\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 944) "\13\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00L \00\00\00\00\00\00L \00\00\00\00\00\00I\00\00\00\0e\00\00\00") (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)) (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/util/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/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049)) + (global $~lib/ASC_NO_ASSERT i32 (i32.const 0)) + (global $~lib/util/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808)) (global $~lib/symbol/idToString (mut i32) (i32.const 0)) (global $std/symbol/sym3 (mut i32) (i32.const 0)) (global $std/symbol/sym4 (mut i32) (i32.const 0)) @@ -51,27 +54,24 @@ (global $std/symbol/key2 (mut i32) (i32.const 0)) (global $std/symbol/key3 (mut i32) (i32.const 0)) (global $std/symbol/key4 (mut i32) (i32.const 0)) - (global $~lib/symbol/Symbol.hasInstance i32 (i32.const 1)) + (global $~lib/symbol/_Symbol.hasInstance i32 (i32.const 1)) (global $std/symbol/hasInstance (mut i32) (i32.const 0)) - (global $~lib/symbol/Symbol.isConcatSpreadable i32 (i32.const 2)) + (global $~lib/symbol/_Symbol.isConcatSpreadable i32 (i32.const 2)) (global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 760)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 944)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1104)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (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/symbol/Symbol (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/Symbol (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) block (result i32) @@ -90,7 +90,19 @@ end local.get $2 ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 1 + i32.const 32 + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.add + i32.const 1 + i32.sub + i32.clz + i32.sub + i32.shl + ) + (func $~lib/allocator/arena/__mem_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -171,348 +183,346 @@ ) (func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate return ) - (func $~lib/internal/arraybuffer/computeSize (; 5 ;) (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/allocateUnsafe (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 104 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 7 ;) (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 + i32.store offset=4 local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u - if - return - end - local.get $0 - i32.const 3 + global.get $~lib/util/runtime/HEADER_SIZE i32.add - local.get $1 - i32.store8 + ) + (func $~lib/util/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 8 - i32.le_u + global.get $~lib/memory/HEAP_BASE + i32.gt_u + i32.eqz if - return + i32.const 0 + i32.const 96 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + global.get $~lib/util/runtime/HEADER_SIZE 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 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz if - return + i32.const 0 + i32.const 96 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable 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 + local.get $1 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/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.fill (; 7 ;) (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.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 56 - i32.const 47 - i32.const 40 - call $~lib/env/abort - unreachable - end - local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - local.get $2 - i32.const 0 - i32.ne - i32.eqz - if - local.get $3 - i32.const 8 + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + if + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 i32.add - local.set $4 + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + if + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + end i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and local.set $5 + local.get $0 + local.get $5 + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 - local.set $6 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 + br $~lib/util/memory/memset|inlined.0 + 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 $5 + local.get $0 local.get $5 - local.get $6 - call $~lib/internal/memory/memset + i32.add + local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 end - local.get $3 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.gt_u + if + i32.const 0 + i32.const 152 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/util/runtime/allocate + local.set $2 + local.get $2 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $2 + i32.const 15 + call $~lib/util/runtime/register ) (func $~lib/map/Map<~lib/string/String,usize>#clear (; 9 ;) (type $FUNCSIG$vi) (param $0 i32) local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -523,7 +533,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -542,7 +551,9 @@ i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -572,7 +583,6 @@ local.get $0 i32.const 0 i32.const 16 - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store local.get $0 @@ -583,7 +593,6 @@ local.get $0 i32.const 0 i32.const 48 - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 local.get $0 @@ -602,7 +611,9 @@ i32.eqz if i32.const 24 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -628,49 +639,62 @@ call $~lib/map/Map#clear local.get $0 ) - (func $~lib/internal/hash/hashStr (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/string/String#get:length (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + i32.const 1 + i32.shr_u + ) + (func $~lib/util/hash/hashStr (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) i32.const -2128831035 local.set $1 - block $break|0 - block - i32.const 0 - local.set $2 - local.get $0 - i32.load - i32.const 1 - i32.shl - local.set $3 - end - loop $repeat|0 - local.get $2 - local.get $3 - i32.lt_u - i32.eqz - br_if $break|0 - local.get $1 - local.get $0 - local.get $2 - i32.add - i32.load8_u offset=4 - i32.xor - i32.const 16777619 - i32.mul - local.set $1 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $repeat|0 + local.get $0 + i32.const 0 + i32.ne + if + block $break|0 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/string/String#get:length + i32.const 1 + i32.shl + local.set $3 + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_u + i32.eqz + br_if $break|0 + local.get $1 + local.get $0 + local.get $2 + i32.add + i32.load8_u + i32.xor + i32.const 16777619 + i32.mul + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + unreachable + end unreachable end - unreachable end local.get $1 ) - (func $~lib/internal/string/compareUnsafe (; 14 ;) (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 (; 15 ;) (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) @@ -693,14 +717,14 @@ local.get $4 if (result i32) local.get $6 - i32.load16_u offset=4 + i32.load16_u local.get $7 - i32.load16_u offset=4 + i32.load16_u i32.sub local.tee $5 i32.eqz else - local.get $4 + i32.const 0 end if block @@ -723,9 +747,8 @@ end local.get $5 ) - (func $~lib/string/String.__eq (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - (local $3 i32) local.get $0 local.get $1 i32.eq @@ -736,9 +759,8 @@ local.get $0 i32.const 0 i32.eq - local.tee $2 if (result i32) - local.get $2 + i32.const 1 else local.get $1 i32.const 0 @@ -749,11 +771,11 @@ return end local.get $0 - i32.load - local.set $3 - local.get $3 + call $~lib/string/String#get:length + local.set $2 + local.get $2 local.get $1 - i32.load + call $~lib/string/String#get:length i32.ne if i32.const 0 @@ -763,13 +785,12 @@ i32.const 0 local.get $1 i32.const 0 - local.get $3 - call $~lib/internal/string/compareUnsafe + local.get $2 + call $~lib/util/string/compareImpl i32.eqz ) - (func $~lib/map/Map<~lib/string/String,usize>#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#find (; 17 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -779,7 +800,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -791,14 +812,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 call $~lib/string/String.__eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -818,32 +838,32 @@ end i32.const 0 ) - (func $~lib/map/Map<~lib/string/String,usize>#has (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.0 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.0 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.0 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.0 end call $~lib/map/Map<~lib/string/String,usize>#find i32.const 0 i32.ne ) - (func $~lib/map/Map<~lib/string/String,usize>#get (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map<~lib/string/String,usize>#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.1 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.1 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.1 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.1 end call $~lib/map/Map<~lib/string/String,usize>#find local.set $3 @@ -855,7 +875,7 @@ unreachable end ) - (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map<~lib/string/String,usize>#rehash (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -875,7 +895,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -890,13 +909,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -908,8 +924,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -936,13 +950,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.3 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.3 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.3 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.3 end local.get $1 i32.and @@ -955,11 +969,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE<~lib/string/String,usize>|inlined.3 (result i32) i32.const 12 @@ -995,17 +1009,17 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map<~lib/string/String,usize>#set (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH<~lib/string/String>|inlined.2 (result i32) + block $~lib/util/hash/HASH<~lib/string/String>|inlined.2 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hashStr - br $~lib/internal/hash/HASH<~lib/string/String>|inlined.2 + call $~lib/util/hash/hashStr + br $~lib/util/hash/HASH<~lib/string/String>|inlined.2 end local.set $4 local.get $0 @@ -1052,8 +1066,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -1094,14 +1106,14 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/internal/hash/hash32 (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/hash/hash32 (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) i32.const -2128831035 local.set $1 @@ -1143,9 +1155,8 @@ local.set $1 local.get $1 ) - (func $~lib/map/Map#find (; 22 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load local.get $2 @@ -1155,7 +1166,7 @@ i32.const 4 i32.mul i32.add - i32.load offset=8 + i32.load local.set $3 block $break|0 loop $continue|0 @@ -1167,14 +1178,13 @@ i32.const 1 i32.and i32.eqz - local.tee $4 if (result i32) local.get $3 i32.load local.get $1 i32.eq else - local.get $4 + i32.const 0 end if local.get $3 @@ -1194,7 +1204,7 @@ end i32.const 0 ) - (func $~lib/map/Map#rehash (; 23 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 24 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1214,7 +1224,6 @@ local.get $2 i32.const 4 i32.mul - i32.const 0 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 local.get $2 @@ -1229,13 +1238,10 @@ i32.const 12 end i32.mul - i32.const 1 call $~lib/arraybuffer/ArrayBuffer#constructor local.set $5 local.get $0 i32.load offset=8 - i32.const 8 - i32.add local.set $6 local.get $6 local.get $0 @@ -1247,8 +1253,6 @@ i32.add local.set $7 local.get $5 - i32.const 8 - i32.add local.set $8 block $break|0 loop $continue|0 @@ -1275,13 +1279,13 @@ local.get $9 i32.load offset=4 i32.store offset=4 - block $~lib/internal/hash/HASH|inlined.1 (result i32) + block $~lib/util/hash/HASH|inlined.1 (result i32) local.get $9 i32.load local.set $11 local.get $11 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.1 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.1 end local.get $1 i32.and @@ -1294,11 +1298,11 @@ local.set $12 local.get $10 local.get $12 - i32.load offset=8 + i32.load i32.store offset=8 local.get $12 local.get $8 - i32.store offset=8 + i32.store local.get $8 block $~lib/map/ENTRY_SIZE|inlined.3 (result i32) i32.const 12 @@ -1334,17 +1338,17 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map#set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/internal/hash/HASH|inlined.0 (result i32) + block $~lib/util/hash/HASH|inlined.0 (result i32) local.get $1 local.set $3 local.get $3 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.0 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.0 end local.set $4 local.get $0 @@ -1391,8 +1395,6 @@ i32.load offset=8 local.set $3 local.get $3 - i32.const 8 - i32.add block (result i32) local.get $0 local.get $0 @@ -1433,14 +1435,14 @@ local.set $6 local.get $5 local.get $6 - i32.load offset=8 + i32.load i32.store offset=8 local.get $6 local.get $5 - i32.store offset=8 + i32.store end ) - (func $~lib/symbol/Symbol.for (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol.for (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) global.get $~lib/symbol/stringToId @@ -1487,32 +1489,32 @@ call $~lib/map/Map#set local.get $2 ) - (func $~lib/map/Map#has (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.2 (result i32) + block $~lib/util/hash/HASH|inlined.2 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.2 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.2 end call $~lib/map/Map#find i32.const 0 i32.ne ) - (func $~lib/map/Map#get (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) local.get $0 local.get $1 - block $~lib/internal/hash/HASH|inlined.3 (result i32) + block $~lib/util/hash/HASH|inlined.3 (result i32) local.get $1 local.set $2 local.get $2 - call $~lib/internal/hash/hash32 - br $~lib/internal/hash/HASH|inlined.3 + call $~lib/util/hash/hash32 + br $~lib/util/hash/HASH|inlined.3 end call $~lib/map/Map#find local.set $3 @@ -1524,18 +1526,16 @@ unreachable end ) - (func $~lib/symbol/Symbol.keyFor (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/symbol/_Symbol.keyFor (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) global.get $~lib/symbol/idToString i32.const 0 i32.ne - local.tee $1 if (result i32) global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#has else - local.get $1 + i32.const 0 end if (result i32) global.get $~lib/symbol/idToString @@ -1545,1532 +1545,236 @@ i32.const 0 end ) - (func $~lib/internal/string/allocateUnsafe (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.const 0 - i32.gt_s - local.tee $1 - if (result i32) + (func $~lib/memory/memory.copy (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 local.get $0 - i32.const 536870910 - i32.le_s - else local.get $1 - end - i32.eqz - if - i32.const 0 - i32.const 536 - i32.const 14 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 4 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + end local.get $0 - i32.const 1 - i32.shl - i32.add - local.set $1 local.get $1 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 - end - local.set $2 - local.get $2 - local.get $0 - i32.store - local.get $2 - ) - (func $~lib/internal/memory/memcpy (; 30 ;) (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 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq if - block - block (result i32) + block $break|0 + loop $continue|0 local.get $0 - local.tee $5 - i32.const 1 - i32.add - local.set $0 - local.get $5 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + br $continue|0 + end end - block (result i32) - local.get $1 - local.tee $5 - i32.const 1 - i32.add - local.set $1 - local.get $5 + 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 - i32.load8_u - i32.store8 + end + end + block $break|2 + loop $continue|2 local.get $2 - i32.const 1 - i32.sub - local.set $2 + 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|2 + end 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 + 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 - i32.const 8 + local.get $2 i32.add - local.get $1 + i32.const 7 + i32.and + if + block + local.get $2 + i32.eqz + if + br $~lib/util/memory/memmove|inlined.0 + 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.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 + local.get $2 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 + i32.sub + local.set $2 local.get $0 - i32.const 12 + local.get $2 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 + i32.add + i64.load + i64.store end - br $continue|5 + br $continue|4 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 (; 31 ;) (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 + block $break|5 + loop $continue|5 local.get $2 - i32.add - i32.load8_u - i32.store8 - br $continue|5 + 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 end ) - (func $~lib/internal/string/copyUnsafe (; 32 ;) (type $FUNCSIG$viiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (param $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $5 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - i32.const 4 - i32.add - local.set $6 - local.get $4 - i32.const 1 - i32.shl - local.set $7 - local.get $5 - local.get $6 - local.get $7 - call $~lib/internal/memory/memmove - ) - (func $~lib/string/String#concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - local.get $0 - i32.const 0 - i32.ne - i32.eqz - if - i32.const 0 - i32.const 504 - i32.const 110 - i32.const 4 - call $~lib/env/abort - unreachable - end local.get $1 i32.const 0 i32.eq if - i32.const 488 + i32.const 664 local.set $1 end local.get $0 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $2 local.get $1 - i32.load + call $~lib/string/String#get:length + i32.const 1 + i32.shl local.set $3 local.get $2 local.get $3 @@ -3080,44 +1784,43 @@ i32.const 0 i32.eq if - i32.const 168 + i32.const 208 return end local.get $4 - call $~lib/internal/string/allocateUnsafe + call $~lib/util/runtime/allocate local.set $5 local.get $5 - i32.const 0 local.get $0 - i32.const 0 local.get $2 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $5 local.get $2 + i32.add local.get $1 - i32.const 0 local.get $3 - call $~lib/internal/string/copyUnsafe + call $~lib/memory/memory.copy local.get $5 + i32.const 16 + call $~lib/util/runtime/register ) - (func $~lib/string/String.__concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if - i32.const 488 - local.set $0 - end + i32.const 664 local.get $0 + i32.const 0 + i32.ne + select local.get $1 call $~lib/string/String#concat ) - (func $~lib/symbol/symbol#toString (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/symbol/_Symbol#toString (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) local.get $0 local.set $1 - i32.const 168 + i32.const 208 local.set $2 block $break|0 block $case11|0 @@ -3181,7 +1884,7 @@ br $case11|0 end block - i32.const 176 + i32.const 224 local.set $2 br $break|0 unreachable @@ -3189,7 +1892,7 @@ unreachable end block - i32.const 208 + i32.const 264 local.set $2 br $break|0 unreachable @@ -3197,7 +1900,7 @@ unreachable end block - i32.const 248 + i32.const 320 local.set $2 br $break|0 unreachable @@ -3205,7 +1908,7 @@ unreachable end block - i32.const 272 + i32.const 352 local.set $2 br $break|0 unreachable @@ -3213,7 +1916,7 @@ unreachable end block - i32.const 288 + i32.const 384 local.set $2 br $break|0 unreachable @@ -3221,7 +1924,7 @@ unreachable end block - i32.const 312 + i32.const 416 local.set $2 br $break|0 unreachable @@ -3229,7 +1932,7 @@ unreachable end block - i32.const 328 + i32.const 448 local.set $2 br $break|0 unreachable @@ -3237,7 +1940,7 @@ unreachable end block - i32.const 352 + i32.const 480 local.set $2 br $break|0 unreachable @@ -3245,7 +1948,7 @@ unreachable end block - i32.const 368 + i32.const 512 local.set $2 br $break|0 unreachable @@ -3253,7 +1956,7 @@ unreachable end block - i32.const 400 + i32.const 552 local.set $2 br $break|0 unreachable @@ -3261,7 +1964,7 @@ unreachable end block - i32.const 432 + i32.const 592 local.set $2 br $break|0 unreachable @@ -3272,13 +1975,12 @@ global.get $~lib/symbol/idToString i32.const 0 i32.ne - local.tee $3 if (result i32) global.get $~lib/symbol/idToString local.get $1 call $~lib/map/Map#has else - local.get $3 + i32.const 0 end if global.get $~lib/symbol/idToString @@ -3291,18 +1993,18 @@ end unreachable end - i32.const 464 + i32.const 632 local.get $2 call $~lib/string/String.__concat - i32.const 592 + i32.const 688 call $~lib/string/String.__concat ) - (func $start:std/symbol (; 36 ;) (type $FUNCSIG$v) - call $start:~lib/allocator/arena - i32.const 8 + (func $start:std/symbol (; 34 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 24 call $~lib/symbol/Symbol global.set $std/symbol/sym1 - i32.const 8 + i32.const 24 call $~lib/symbol/Symbol global.set $std/symbol/sym2 global.get $std/symbol/sym1 @@ -3311,17 +2013,27 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 6 + i32.const 48 + i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 8 - call $~lib/symbol/Symbol.for + 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 + i32.const 24 + call $~lib/symbol/_Symbol.for global.set $std/symbol/sym3 - i32.const 8 - call $~lib/symbol/Symbol.for + i32.const 24 + call $~lib/symbol/_Symbol.for global.set $std/symbol/sym4 global.get $std/symbol/sym3 global.get $std/symbol/sym4 @@ -3329,17 +2041,17 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 11 + i32.const 48 + i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym1 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key1 global.get $std/symbol/sym2 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor global.set $std/symbol/key2 global.get $std/symbol/key1 i32.const 0 @@ -3347,10 +2059,10 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 16 + i32.const 48 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/key2 @@ -3359,28 +2071,40 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 17 + i32.const 48 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym3 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor + local.tee $0 + if (result i32) + local.get $0 + else + unreachable + end global.set $std/symbol/key3 global.get $std/symbol/sym4 - call $~lib/symbol/Symbol.keyFor + call $~lib/symbol/_Symbol.keyFor + local.tee $0 + if (result i32) + local.get $0 + else + unreachable + end global.set $std/symbol/key4 global.get $std/symbol/key3 - i32.const 8 + i32.const 24 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 22 + i32.const 48 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/key3 @@ -3389,77 +2113,275 @@ i32.eqz if i32.const 0 - i32.const 24 - i32.const 23 + i32.const 48 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 call $~lib/symbol/Symbol - call $~lib/symbol/symbol#toString - i32.const 600 + call $~lib/symbol/_Symbol#toString + i32.const 712 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 25 + i32.const 48 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/sym3 - call $~lib/symbol/symbol#toString - i32.const 624 + call $~lib/symbol/_Symbol#toString + i32.const 744 call $~lib/string/String.__eq i32.eqz if i32.const 0 + i32.const 48 i32.const 24 - i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $~lib/symbol/Symbol.hasInstance + global.get $~lib/symbol/_Symbol.hasInstance global.set $std/symbol/hasInstance - global.get $~lib/symbol/Symbol.isConcatSpreadable + global.get $~lib/symbol/_Symbol.isConcatSpreadable global.set $std/symbol/isConcatSpreadable global.get $std/symbol/hasInstance - call $~lib/symbol/symbol#toString - i32.const 656 + call $~lib/symbol/_Symbol#toString + i32.const 784 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 30 + i32.const 48 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/symbol/isConcatSpreadable - call $~lib/symbol/symbol#toString - i32.const 704 + call $~lib/symbol/_Symbol#toString + i32.const 840 call $~lib/string/String.__eq i32.eqz if i32.const 0 - i32.const 24 - i32.const 31 + i32.const 48 + i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $~lib/symbol/Symbol.hasInstance + global.get $~lib/symbol/_Symbol.hasInstance drop - global.get $~lib/symbol/Symbol.isConcatSpreadable + global.get $~lib/symbol/_Symbol.isConcatSpreadable drop ) - (func $start (; 37 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 38 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 39 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 40 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 41 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $7 + block $break|0 + loop $continue|0 + local.get $6 + local.get $7 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $8 + local.get $8 + if + i32.const 0 + i32.eqz + if + i32.const 0 + i32.const 912 + i32.const 97 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/runtime.retain (; 42 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.release (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/runtime/runtime.collect (; 44 ;) (type $FUNCSIG$v) + i32.const 0 + i32.const 912 + i32.const 139 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/runtime/runtime#constructor (; 45 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 46 ;) (type $FUNCSIG$v) call $start:std/symbol ) - (func $null (; 38 ;) (type $FUNCSIG$v) + (func $null (; 47 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/std/trace.json b/tests/compiler/std/trace.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/trace.optimized.wat b/tests/compiler/std/trace.optimized.wat index fb24789172..ecaca42aa3 100644 --- a/tests/compiler/std/trace.optimized.wat +++ b/tests/compiler/std/trace.optimized.wat @@ -1,87 +1,92 @@ (module (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") - (data (i32.const 40) "\0d\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") - (data (i32.const 72) "\07\00\00\00o\00n\00e\00_\00i\00n\00t") - (data (i32.const 96) "\07\00\00\00t\00w\00o\00_\00i\00n\00t") - (data (i32.const 120) "\t\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t") - (data (i32.const 144) "\08\00\00\00f\00o\00u\00r\00_\00i\00n\00t") - (data (i32.const 168) "\08\00\00\00f\00i\00v\00e\00_\00i\00n\00t") - (data (i32.const 192) "\08\00\00\00f\00i\00v\00e\00_\00d\00b\00l") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\1a") + (data (i32.const 24) "z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") + (data (i32.const 56) "\10\00\00\00\1a") + (data (i32.const 72) "z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") + (data (i32.const 104) "\10\00\00\00\0e") + (data (i32.const 120) "o\00n\00e\00_\00i\00n\00t") + (data (i32.const 136) "\10\00\00\00\0e") + (data (i32.const 152) "t\00w\00o\00_\00i\00n\00t") + (data (i32.const 168) "\10\00\00\00\12") + (data (i32.const 184) "t\00h\00r\00e\00e\00_\00i\00n\00t") + (data (i32.const 208) "\10\00\00\00\10") + (data (i32.const 224) "f\00o\00u\00r\00_\00i\00n\00t") + (data (i32.const 240) "\10\00\00\00\10") + (data (i32.const 256) "f\00i\00v\00e\00_\00i\00n\00t") + (data (i32.const 272) "\10\00\00\00\10") + (data (i32.const 288) "f\00i\00v\00e\00_\00d\00b\00l") (global $~lib/started (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $std/trace/main)) (func $start:std/trace (; 1 ;) (type $FUNCSIG$v) - i32.const 8 + i32.const 24 i32.const 0 f64.const 0 f64.const 0 f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 40 + call $~lib/builtins/trace + i32.const 72 i32.const 0 f64.const 0 f64.const 0 f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 72 + call $~lib/builtins/trace + i32.const 120 i32.const 1 f64.const 1 f64.const 0 f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 96 + call $~lib/builtins/trace + i32.const 152 i32.const 2 f64.const 1 f64.const 2 f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 120 + call $~lib/builtins/trace + i32.const 184 i32.const 3 f64.const 1 f64.const 2 f64.const 3 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 144 + call $~lib/builtins/trace + i32.const 224 i32.const 4 f64.const 1 f64.const 2 f64.const 3 f64.const 4 f64.const 0 - call $~lib/env/trace - i32.const 168 + call $~lib/builtins/trace + i32.const 256 i32.const 5 f64.const 1 f64.const 2 f64.const 3 f64.const 4 f64.const 5 - call $~lib/env/trace - i32.const 192 + call $~lib/builtins/trace + i32.const 288 i32.const 5 f64.const 1.1 f64.const 2.2 f64.const 3.3 f64.const 4.4 f64.const 5.5 - call $~lib/env/trace + call $~lib/builtins/trace ) (func $std/trace/main (; 2 ;) (type $FUNCSIG$v) global.get $~lib/started diff --git a/tests/compiler/std/trace.untouched.wat b/tests/compiler/std/trace.untouched.wat index 2486b5ad66..d653dde323 100644 --- a/tests/compiler/std/trace.untouched.wat +++ b/tests/compiler/std/trace.untouched.wat @@ -1,88 +1,86 @@ (module (type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64))) (type $FUNCSIG$v (func)) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) - (data (i32.const 8) "\0d\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") - (data (i32.const 40) "\0d\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") - (data (i32.const 72) "\07\00\00\00o\00n\00e\00_\00i\00n\00t\00") - (data (i32.const 96) "\07\00\00\00t\00w\00o\00_\00i\00n\00t\00") - (data (i32.const 120) "\t\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") - (data (i32.const 144) "\08\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") - (data (i32.const 168) "\08\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") - (data (i32.const 192) "\08\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") + (data (i32.const 8) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") + (data (i32.const 56) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") + (data (i32.const 104) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00o\00n\00e\00_\00i\00n\00t\00") + (data (i32.const 136) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00t\00w\00o\00_\00i\00n\00t\00") + (data (i32.const 168) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00t\00h\00r\00e\00e\00_\00i\00n\00t\00") + (data (i32.const 208) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") + (data (i32.const 240) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") + (data (i32.const 272) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/started (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 212)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "main" (func $std/trace/main)) (func $start:std/trace (; 1 ;) (type $FUNCSIG$v) - i32.const 8 + i32.const 24 i32.const 0 f64.const 0 f64.const 0 f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 40 + call $~lib/builtins/trace + i32.const 72 i32.const 0 f64.const 0 f64.const 0 f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 72 + call $~lib/builtins/trace + i32.const 120 i32.const 1 f64.const 1 f64.const 0 f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 96 + call $~lib/builtins/trace + i32.const 152 i32.const 2 f64.const 1 f64.const 2 f64.const 0 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 120 + call $~lib/builtins/trace + i32.const 184 i32.const 3 f64.const 1 f64.const 2 f64.const 3 f64.const 0 f64.const 0 - call $~lib/env/trace - i32.const 144 + call $~lib/builtins/trace + i32.const 224 i32.const 4 f64.const 1 f64.const 2 f64.const 3 f64.const 4 f64.const 0 - call $~lib/env/trace - i32.const 168 + call $~lib/builtins/trace + i32.const 256 i32.const 5 f64.const 1 f64.const 2 f64.const 3 f64.const 4 f64.const 5 - call $~lib/env/trace - i32.const 192 + call $~lib/builtins/trace + i32.const 288 i32.const 5 f64.const 1.1 f64.const 2.2 f64.const 3.3 f64.const 4.4 f64.const 5.5 - call $~lib/env/trace + call $~lib/builtins/trace ) (func $std/trace/main (; 2 ;) (type $FUNCSIG$v) global.get $~lib/started diff --git a/tests/compiler/std/typedarray.json b/tests/compiler/std/typedarray.json new file mode 100644 index 0000000000..85b9ce0f6e --- /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 cf31cc7f03..0042d0a3d2 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,15 +1,16 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) (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$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$viij (func (param i32 i32 i64))) (type $FUNCSIG$jjjii (func (param i64 i64 i32 i32) (result i64))) (type $FUNCSIG$viif (func (param i32 i32 f32))) @@ -23,7 +24,6 @@ (type $FUNCSIG$ijii (func (param i64 i32 i32) (result i32))) (type $FUNCSIG$ifii (func (param f32 i32 i32) (result i32))) (type $FUNCSIG$idii (func (param f64 i32 i32) (result i32))) - (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$vjii (func (param i64 i32 i32))) (type $FUNCSIG$vfii (func (param f32 i32 i32))) (type $FUNCSIG$vdii (func (param f64 i32 i32))) @@ -31,54 +31,70 @@ (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) (type $FUNCSIG$dd (func (param f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 48) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 112) "\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") - (data (i32.const 176) "\05\00\00\00\00\00\00\00\01\01\01\04\05") - (data (i32.const 192) "\b0\00\00\00\05") - (data (i32.const 200) "\05") - (data (i32.const 216) "\c8\00\00\00\05") - (data (i32.const 224) "\05\00\00\00\00\00\00\00\01\01") - (data (i32.const 240) "\e0\00\00\00\05") - (data (i32.const 248) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 264) "\f8\00\00\00\05") - (data (i32.const 272) "\05\00\00\00\00\00\00\00\01\01\00\02\02") - (data (i32.const 288) "\10\01\00\00\05") - (data (i32.const 296) "\03") - (data (i32.const 312) "(\01\00\00\03") - (data (i32.const 320) "\05\00\00\00\00\00\00\00\01\00\00\00\02") - (data (i32.const 336) "@\01\00\00\05") - (data (i32.const 344) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") - (data (i32.const 376) "X\01\00\00\05") - (data (i32.const 384) "\14") - (data (i32.const 416) "\80\01\00\00\05") - (data (i32.const 424) "\14\00\00\00\00\00\00\00\01\00\00\00\01") - (data (i32.const 456) "\a8\01\00\00\05") - (data (i32.const 464) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 496) "\d0\01\00\00\05") - (data (i32.const 504) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") - (data (i32.const 536) "\f8\01\00\00\05") - (data (i32.const 544) "\0c") - (data (i32.const 576) " \02\00\00\03") - (data (i32.const 584) "\14\00\00\00\00\00\00\00\01") - (data (i32.const 608) "\02") - (data (i32.const 616) "H\02\00\00\05") - (data (i32.const 624) "\0f\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 664) "\14\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 712) "\0c\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e") - (data (i32.const 744) "\c8\02\00\00\03") - (data (i32.const 752) "\16\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 800) "\16\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 848) "\1f\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 920) "\1b\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 984) "$\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") - (data (i32.const 1048) "\d8\03\00\00\t") - (data (i32.const 1056) "!\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") - (data (i32.const 1128) "+\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 8) "\10\00\00\00\"") + (data (i32.const 24) "s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 64) "\10\00\00\00&") + (data (i32.const 80) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 120) "\10\00\00\00(") + (data (i32.const 136) "~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s") + (data (i32.const 176) "\10\00\00\00$") + (data (i32.const 192) "~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 232) "\0f\00\00\00\05") + (data (i32.const 248) "\01\01\01\04\05") + (data (i32.const 256) "\10\00\00\00\1a") + (data (i32.const 272) "~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 304) "\0f\00\00\00\05") + (data (i32.const 328) "\0f\00\00\00\05") + (data (i32.const 344) "\01\01") + (data (i32.const 352) "\0f\00\00\00\05") + (data (i32.const 368) "\01\01\00\02\02") + (data (i32.const 376) "\0f\00\00\00\05") + (data (i32.const 392) "\01\01\00\02\02") + (data (i32.const 400) "\0f\00\00\00\03") + (data (i32.const 424) "\0f\00\00\00\05") + (data (i32.const 440) "\01\00\00\00\02") + (data (i32.const 448) "\0f\00\00\00\14") + (data (i32.const 464) "\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05") + (data (i32.const 488) "\0f\00\00\00\14") + (data (i32.const 528) "\0f\00\00\00\14") + (data (i32.const 544) "\01\00\00\00\01") + (data (i32.const 568) "\0f\00\00\00\14") + (data (i32.const 584) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 608) "\0f\00\00\00\14") + (data (i32.const 624) "\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02") + (data (i32.const 648) "\0f\00\00\00\0c") + (data (i32.const 680) "\0f\00\00\00\14") + (data (i32.const 696) "\01") + (data (i32.const 712) "\02") + (data (i32.const 720) "\10\00\00\00\1e") + (data (i32.const 736) "r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 768) "\10\00\00\00(") + (data (i32.const 784) "f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 824) "\0f\00\00\00\0c") + (data (i32.const 840) "\n\00\00\00\0c\00\00\00\0e") + (data (i32.const 856) "\1d\00\00\00\10") + (data (i32.const 872) "H\03\00\00H\03\00\00\0c\00\00\00\03") + (data (i32.const 888) "\10\00\00\00,") + (data (i32.const 904) "f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 952) "\10\00\00\00,") + (data (i32.const 968) "f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1016) "\10\00\00\00>") + (data (i32.const 1032) "f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1096) "\10\00\00\006") + (data (i32.const 1112) "f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1168) "\0f\00\00\00$") + (data (i32.const 1184) "\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t") + (data (i32.const 1224) "\1d\00\00\00\10") + (data (i32.const 1240) "\a0\04\00\00\a0\04\00\00$\00\00\00\t") + (data (i32.const 1256) "\10\00\00\00B") + (data (i32.const 1272) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1344) "\10\00\00\00V") + (data (i32.const 1360) "T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h") + (data (i32.const 1448) "\1e\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\08") (table $0 112 funcref) - (elem (i32.const 0) $null $~lib/internal/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 0) $~lib/runtime/runtime.collect $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/typedarray/arr (mut i32) (i32.const 0)) @@ -95,12 +111,21 @@ (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 744)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1048)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 872)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1240)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.retain)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -162,294 +187,341 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/allocate (; 2 ;) (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 112 - 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.const 15 i32.add i32.clz i32.sub i32.shl - call $~lib/allocator/arena/__memory_allocate + call $~lib/allocator/arena/__mem_allocate local.tee $1 - local.get $0 + i32.const -1520547049 i32.store local.get $1 + 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 + i32.const 16 + i32.add ) - (func $~lib/internal/memory/memset (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) - local.get $2 - i32.eqz - if - return + block $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.eqz + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + local.get $1 + i32.store8 + local.get $0 + local.get $2 + i32.add + i32.const 1 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 2 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + local.tee $3 + i32.const 2 + i32.sub + local.get $1 + i32.store8 + local.get $3 + i32.const 3 + i32.sub + local.get $1 + i32.store8 + local.get $2 + i32.const 6 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + 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 + br_if $~lib/util/memory/memset|inlined.0 + local.get $2 + i32.const 0 + local.get $0 + i32.sub + i32.const 3 + i32.and + local.tee $2 + i32.sub + local.set $3 + local.get $0 + local.get $2 + i32.add + local.tee $0 + local.get $1 + i32.const 255 + i32.and + i32.const 16843009 + i32.mul + local.tee $1 + i32.store + local.get $3 + i32.const -4 + i32.and + local.tee $2 + local.get $0 + i32.add + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 8 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 4 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 12 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 8 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const 24 + i32.le_u + br_if $~lib/util/memory/memset|inlined.0 + local.get $0 + i32.const 12 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 16 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 20 + i32.add + local.get $1 + i32.store + local.get $0 + i32.const 24 + i32.add + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.add + local.tee $3 + i32.const 28 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 24 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 20 + i32.sub + local.get $1 + i32.store + local.get $3 + i32.const 16 + i32.sub + local.get $1 + i32.store + local.get $0 + i32.const 4 + i32.and + i32.const 24 + i32.add + local.tee $3 + local.get $0 + i32.add + local.set $0 + local.get $2 + local.get $3 + i32.sub + local.set $2 + local.get $1 + i64.extend_i32_u + local.tee $4 + local.get $4 + i64.const 32 + i64.shl + i64.or + local.set $4 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + local.get $0 + local.get $4 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $4 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $4 + i64.store + local.get $2 + i32.const 32 + i32.sub + local.set $2 + local.get $0 + i32.const 32 + i32.add + local.set $0 + br $continue|0 + end + end end + ) + (func $~lib/util/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) 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.const 1696 i32.le_u if - return + i32.const 0 + i32.const 136 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort + unreachable end local.get $0 - i32.const 1 - i32.add + i32.const 16 + i32.sub + local.tee $2 + i32.load + i32.const -1520547049 + i32.ne + if + i32.const 0 + i32.const 136 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 local.get $1 - i32.store8 + i32.store local.get $0 - i32.const 2 - i32.add - local.get $1 - i32.store8 + ) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 2 - i32.sub - local.get $1 - i32.store8 - local.get $3 - i32.const 3 - i32.sub - local.get $1 - i32.store8 - local.get $2 - i32.const 6 - i32.le_u + i32.const 1073741808 + i32.gt_u if - return + i32.const 0 + i32.const 80 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable 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 - local.get $2 - i32.const 0 - local.get $0 - i32.sub - i32.const 3 - i32.and - local.tee $2 - i32.sub - local.set $3 - local.get $0 - local.get $2 - i32.add - local.tee $0 - local.get $1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul + call $~lib/util/runtime/allocate local.tee $1 - i32.store - local.get $3 - i32.const -4 - i32.and - local.tee $2 - local.get $0 - i32.add - i32.const 4 - i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 8 - i32.le_u - if - return - end - local.get $0 - i32.const 4 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 12 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 8 - i32.sub - local.get $1 - i32.store - local.get $2 - i32.const 24 - i32.le_u - if - return - end - local.get $0 - i32.const 12 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 16 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 20 - i32.add - local.get $1 - i32.store - local.get $0 - i32.const 24 - i32.add - local.get $1 - i32.store - local.get $0 - local.get $2 - i32.add - local.tee $3 - i32.const 28 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 24 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 20 - i32.sub - local.get $1 - i32.store - local.get $3 - i32.const 16 - i32.sub - local.get $1 - i32.store - local.get $0 - i32.const 4 - i32.and - i32.const 24 - i32.add - local.tee $3 + i32.const 0 local.get $0 - i32.add - local.set $0 - local.get $2 - local.get $3 - i32.sub - local.set $2 + call $~lib/memory/memory.fill local.get $1 - i64.extend_i32_u - local.tee $4 - local.get $4 - i64.const 32 - i64.shl - i64.or - local.set $4 - loop $continue|0 - local.get $2 - i32.const 32 - i32.ge_u - if - local.get $0 - local.get $4 - i64.store - local.get $0 - i32.const 8 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 16 - i32.add - local.get $4 - i64.store - local.get $0 - i32.const 24 - i32.add - local.get $4 - i64.store - local.get $2 - i32.const 32 - i32.sub - local.set $2 - local.get $0 - i32.const 32 - i32.add - local.set $0 - br $continue|0 - end - end + i32.const 15 + call $~lib/util/runtime/register ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $1 - i32.const 1073741816 + i32.const 1073741808 + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort + i32.const 80 + i32.const 12 + i32.const 57 + call $~lib/builtins/abort unreachable end local.get $1 - call $~lib/internal/arraybuffer/allocateUnsafe + local.get $2 + i32.shl local.tee $2 - i32.const 8 - i32.add - i32.const 0 - local.get $1 - call $~lib/internal/memory/memset + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 local.get $0 i32.eqz if i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -462,218 +534,133 @@ i32.const 0 i32.store offset=8 local.get $0 - local.get $2 + i32.load + drop + local.get $0 + local.get $1 i32.store local.get $0 - i32.const 0 + local.get $1 i32.store offset=4 local.get $0 - local.get $1 + local.get $2 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int8Array#constructor (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.get $0 - call $~lib/typedarray/Int8Array#constructor - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 536870908 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 1 - i32.shl - local.tee $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $2 - i32.const 8 - i32.add - i32.const 0 - local.get $1 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.set $0 - end + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register local.get $0 i32.const 0 - i32.store + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint8Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register local.get $0 i32.const 0 - i32.store offset=4 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register local.get $0 i32.const 0 - i32.store offset=8 - local.get $0 - local.get $2 - i32.store + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Int16Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register local.get $0 - i32.const 0 - i32.store offset=4 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Uint16Array#constructor (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register local.get $0 - local.get $1 - i32.store offset=8 + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Int32Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register local.get $0 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int16Array#constructor (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#constructor (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register local.get $0 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.tee $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $2 - i32.const 8 - i32.add - i32.const 0 - local.get $1 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_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 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $2 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 + (func $~lib/typedarray/Int64Array#constructor (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register local.get $0 + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int32Array#constructor (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#constructor (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register local.get $0 - call $~lib/internal/typedarray/TypedArray#constructor - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - local.get $1 - i32.const 134217727 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 i32.const 3 - i32.shl - local.tee $1 - call $~lib/internal/arraybuffer/allocateUnsafe - local.tee $2 - i32.const 8 - i32.add - i32.const 0 - local.get $1 - call $~lib/internal/memory/memset - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/allocator/arena/__memory_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 - i32.const 0 - i32.store offset=8 - local.get $0 - local.get $2 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 + call $~lib/arraybuffer/ArrayBufferView#constructor + ) + (func $~lib/typedarray/Float32Array#constructor (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register local.get $0 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $~lib/typedarray/Int64Array#constructor (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 12 - call $~lib/allocator/arena/__memory_allocate + call $~lib/util/runtime/allocate + i32.const 27 + call $~lib/util/runtime/register local.get $0 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor ) - (func $std/typedarray/testInstantiate (; 13 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testInstantiate (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) - i32.const 0 local.get $0 call $~lib/typedarray/Int8Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -682,35 +669,37 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 local.get $0 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -719,34 +708,37 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 40 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 call $~lib/typedarray/Uint8ClampedArray#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 44 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -755,34 +747,37 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 45 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 call $~lib/typedarray/Int16Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 49 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -793,36 +788,39 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 50 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 i32.const 1 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 54 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -833,36 +831,39 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 55 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 i32.const 1 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 56 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 call $~lib/typedarray/Int32Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 59 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -873,36 +874,39 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 i32.const 2 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -913,36 +917,39 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 i32.const 2 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 call $~lib/typedarray/Int64Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -953,36 +960,39 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 70 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 i32.const 3 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -993,36 +1003,39 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 75 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 i32.const 3 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 76 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 79 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1033,36 +1046,39 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 80 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 i32.const 2 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 81 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $1 i32.load offset=4 + local.get $1 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 84 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -1073,28 +1089,28 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 85 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $0 local.get $1 i32.load offset=8 i32.const 3 i32.shr_u + local.get $0 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int32Array#__set (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1103,25 +1119,22 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 444 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 2 i32.shl i32.add - i32.add local.get $2 - i32.store offset=8 + i32.store ) - (func $~lib/internal/typedarray/TypedArray#__get (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#__get (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1130,25 +1143,23 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 438 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 2 i32.shl i32.add - i32.add - i32.load offset=8 + i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 21 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=8 i32.const 2 @@ -1205,17 +1216,26 @@ end local.set $3 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $2 + call $~lib/util/runtime/allocate + local.set $2 + local.get $0 + i32.load offset=4 + local.set $4 local.get $0 i32.load - i32.store + local.tee $0 + local.get $2 + i32.load + i32.ne + drop local.get $2 local.get $0 - i32.load offset=4 + i32.store + local.get $2 local.get $1 i32.const 2 i32.shl + local.get $4 i32.add i32.store offset=4 local.get $2 @@ -1226,8 +1246,10 @@ i32.shl i32.store offset=8 local.get $2 + i32.const 22 + call $~lib/util/runtime/register ) - (func $~lib/internal/typedarray/TypedArray#__set (; 17 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/typedarray/Float64Array#__set (; 22 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -1236,26 +1258,24 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 854 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 3 i32.shl i32.add - i32.add local.get $2 - f64.store offset=8 + f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 23 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=8 i32.const 3 @@ -1312,17 +1332,26 @@ end local.set $3 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $2 + call $~lib/util/runtime/allocate + local.set $2 + local.get $0 + i32.load offset=4 + local.set $4 local.get $0 i32.load - i32.store + local.tee $0 + local.get $2 + i32.load + i32.ne + drop local.get $2 local.get $0 - i32.load offset=4 + i32.store + local.get $2 local.get $1 i32.const 3 i32.shl + local.get $4 i32.add i32.store offset=4 local.get $2 @@ -1333,141 +1362,135 @@ i32.shl i32.store offset=8 local.get $2 + i32.const 27 + call $~lib/util/runtime/register ) - (func $~lib/internal/sort/insertionSort (; 19 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/insertionSort (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f64) (local $6 f64) - (local $7 f64) - (local $8 i32) + (local $7 i32) block $break|0 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.ge_s br_if $break|0 - local.get $4 + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 - local.set $6 - local.get $4 + f64.load + local.set $5 + local.get $3 i32.const 1 i32.sub - local.set $5 + local.set $4 loop $continue|1 - local.get $5 + local.get $4 i32.const 0 i32.ge_s if block $break|1 - local.get $5 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 - local.set $7 + f64.load + local.set $6 i32.const 2 global.set $~lib/argc + local.get $5 local.get $6 - local.get $7 - local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.ge_s br_if $break|1 - local.get $5 - local.tee $8 + local.get $4 + local.tee $7 i32.const 1 i32.sub - local.set $5 - local.get $8 + local.set $4 + local.get $7 i32.const 1 i32.add i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - local.get $7 - f64.store offset=8 + local.get $6 + f64.store br $continue|1 end end end - local.get $5 + local.get $4 i32.const 1 i32.add i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - local.get $6 - f64.store offset=8 - local.get $4 + local.get $5 + f64.store + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/internal/sort/weakHeapSort (; 20 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/util/sort/weakHeapSort (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) (local $4 i32) - (local $5 i32) + (local $5 f64) (local $6 f64) - (local $7 f64) + (local $7 i32) (local $8 i32) - (local $9 i32) - local.get $2 + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl - local.tee $4 - call $~lib/allocator/arena/__memory_allocate - local.tee $8 + local.tee $3 + call $~lib/allocator/arena/__mem_allocate + local.tee $7 i32.const 0 - local.get $4 - call $~lib/internal/memory/memset - local.get $2 + local.get $3 + call $~lib/memory/memory.fill + local.get $1 i32.const 1 i32.sub - local.set $5 + local.set $4 loop $repeat|0 - local.get $5 + local.get $4 i32.const 0 i32.gt_s if - local.get $5 - local.set $4 + local.get $4 + local.set $3 loop $continue|1 - local.get $4 + local.get $3 i32.const 1 i32.and - local.get $4 + local.get $3 i32.const 6 i32.shr_s i32.const 2 i32.shl - local.get $8 + local.get $7 i32.add i32.load - local.get $4 + local.get $3 i32.const 1 i32.shr_s i32.const 31 @@ -1477,317 +1500,270 @@ i32.and i32.eq if - local.get $4 + local.get $3 i32.const 1 i32.shr_s - local.set $4 + local.set $3 br $continue|1 end end - local.get $4 + local.get $3 i32.const 1 i32.shr_s - local.tee $4 + local.tee $3 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 - local.set $6 - local.get $5 + f64.load + local.set $5 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 - local.set $7 + f64.load + local.set $6 i32.const 2 global.set $~lib/argc + local.get $5 local.get $6 - local.get $7 - local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $5 + local.get $4 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $8 + local.get $7 i32.add - local.tee $9 - local.get $9 + local.tee $8 + local.get $8 i32.load i32.const 1 - local.get $5 + local.get $4 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $5 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - local.get $6 - f64.store offset=8 - local.get $4 + local.get $5 + f64.store + local.get $3 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - local.get $7 - f64.store offset=8 + local.get $6 + f64.store end - local.get $5 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 br $repeat|0 end end - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $5 + local.set $4 loop $repeat|2 - local.get $5 + local.get $4 i32.const 2 i32.ge_s if local.get $0 - local.get $1 - i32.add - local.tee $2 - f64.load offset=8 - local.set $6 - local.get $2 - local.get $5 + f64.load + local.set $5 + local.get $0 + local.get $4 i32.const 3 i32.shl local.get $0 i32.add + local.tee $1 + f64.load + f64.store local.get $1 - i32.add - local.tee $2 - f64.load offset=8 - f64.store offset=8 - local.get $2 - local.get $6 - f64.store offset=8 + local.get $5 + f64.store i32.const 1 - local.set $2 + local.set $1 loop $continue|3 - local.get $2 + local.get $1 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $8 + local.get $7 i32.add i32.load - local.get $2 + local.get $1 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and - local.get $2 + local.get $1 i32.const 1 i32.shl i32.add - local.tee $4 - local.get $5 + local.tee $3 + local.get $4 i32.lt_s if - local.get $4 - local.set $2 + local.get $3 + local.set $1 br $continue|3 end end loop $continue|4 - local.get $2 + local.get $1 i32.const 0 i32.gt_s if local.get $0 + f64.load + local.set $5 local.get $1 - i32.add - f64.load offset=8 - local.set $6 - local.get $2 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - f64.load offset=8 - local.set $7 + f64.load + local.set $6 i32.const 2 global.set $~lib/argc + local.get $5 local.get $6 - local.get $7 - local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if - local.get $2 + local.get $1 i32.const 5 i32.shr_s i32.const 2 i32.shl - local.get $8 + local.get $7 i32.add - local.tee $4 - local.get $4 + local.tee $3 + local.get $3 i32.load i32.const 1 - local.get $2 + local.get $1 i32.const 31 i32.and i32.shl i32.xor i32.store - local.get $2 + local.get $1 i32.const 3 i32.shl local.get $0 i32.add - local.get $1 - i32.add - local.get $6 - f64.store offset=8 + local.get $5 + f64.store local.get $0 - local.get $1 - i32.add - local.get $7 - f64.store offset=8 + local.get $6 + f64.store end - local.get $2 + local.get $1 i32.const 1 i32.shr_s - local.set $2 + local.set $1 br $continue|4 end end - local.get $5 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 br $repeat|2 end end local.get $0 - i32.const 8 - i32.add - local.get $1 - i32.add - local.tee $2 f64.load offset=8 - local.set $6 - local.get $2 + local.set $5 local.get $0 - local.get $1 - i32.add - local.tee $0 - f64.load offset=8 - f64.store offset=8 local.get $0 - local.get $6 + f64.load f64.store offset=8 + local.get $0 + local.get $5 + f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 21 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#sort (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f64) (local $4 f64) - (local $5 f64) - local.get $0 - i32.load offset=4 - local.set $2 - block $~lib/internal/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $3 + local.tee $2 i32.const 1 i32.le_s - br_if $~lib/internal/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 - i32.load + i32.load offset=4 local.set $0 - local.get $3 + local.get $2 i32.const 2 i32.eq if local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add f64.load offset=8 - local.set $4 + local.set $3 local.get $0 - local.get $2 - i32.add - f64.load offset=8 - local.set $5 + f64.load + local.set $4 i32.const 2 global.set $~lib/argc + local.get $3 local.get $4 - local.get $5 local.get $1 call_indirect (type $FUNCSIG$idd) i32.const 0 i32.lt_s if local.get $0 - i32.const 8 - i32.add - local.get $2 - i32.add - local.get $5 - f64.store offset=8 - local.get $0 - local.get $2 - i32.add local.get $4 f64.store offset=8 + local.get $0 + local.get $3 + f64.store end - br $~lib/internal/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $3 + local.get $2 i32.const 256 i32.lt_s if local.get $0 local.get $2 - local.get $3 local.get $1 - call $~lib/internal/sort/insertionSort + call $~lib/util/sort/insertionSort else local.get $0 local.get $2 - local.get $3 local.get $1 - call $~lib/internal/sort/weakHeapSort + call $~lib/util/sort/weakHeapSort end end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 22 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 27 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -1816,7 +1792,7 @@ i64.lt_s i32.sub ) - (func $~lib/internal/typedarray/TypedArray#__get (; 23 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/typedarray/Float64Array#__get (; 28 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -1825,49 +1801,37 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 848 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 3 i32.shl i32.add - i32.add - f64.load offset=8 + f64.load ) - (func $~lib/internal/typedarray/TypedArray#__set (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort + i32.const 192 + i32.const 198 + i32.const 44 + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 local.get $1 - local.get $0 - i32.load i32.add - i32.add - local.get $2 - i32.store8 offset=8 - ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 i32.const 255 local.get $2 i32.sub @@ -1881,40 +1845,53 @@ i32.const -1 i32.xor i32.and - call $~lib/internal/typedarray/TypedArray#__set + i32.store8 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort + i32.const 192 + i32.const 192 + i32.const 44 + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 local.get $1 - local.get $0 - i32.load - i32.add i32.add - i32.load8_u offset=8 + i32.load8_u ) - (func $~lib/typedarray/Int8Array#fill (; 27 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Int8Array#__set (; 31 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 local.get $0 - i32.load - local.set $5 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 34 + i32.const 44 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 + ) + (func $~lib/typedarray/Int8Array#fill (; 32 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.set $6 + local.set $5 local.get $0 i32.load offset=8 local.set $4 @@ -1939,7 +1916,7 @@ i32.lt_s select end - local.tee $2 + local.tee $0 local.get $3 i32.const 0 i32.lt_s @@ -1947,9 +1924,9 @@ local.get $3 local.get $4 i32.add - local.tee $0 + local.tee $2 i32.const 0 - local.get $0 + local.get $2 i32.const 0 i32.gt_s select @@ -1961,53 +1938,276 @@ i32.lt_s select end - local.tee $0 + local.tee $2 i32.lt_s if - local.get $2 + local.get $0 local.get $5 i32.add - local.get $6 - i32.add - i32.const 8 - i32.add local.get $1 - local.get $0 local.get $2 + local.get $0 i32.sub - call $~lib/internal/memory/memset + call $~lib/memory/memory.fill + end + ) + (func $~lib/memory/memory.copy (; 33 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/util/runtime/makeArray (; 34 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (local $4 i32) + (local $5 i32) + i32.const 16 + call $~lib/util/runtime/allocate + local.get $2 + call $~lib/util/runtime/register + local.set $2 + local.get $0 + local.get $1 + i32.shl + local.tee $4 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register + local.tee $1 + local.set $5 + local.get $2 + i32.load + drop + local.get $2 + local.get $5 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $4 + i32.store offset=8 + local.get $2 + local.get $0 + i32.store offset=12 + local.get $3 + if + local.get $1 + local.get $3 + local.get $4 + call $~lib/memory/memory.copy end + local.get $2 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#__get (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort + i32.const 192 + i32.const 28 + i32.const 44 + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 local.get $1 - local.get $0 - i32.load i32.add + i32.load8_s + ) + (func $~lib/array/Array#__get (; 36 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 272 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 i32.add - i32.load8_s offset=8 + i32.load8_s ) - (func $std/typedarray/isInt8ArrayEqual (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i32.load offset=8 local.get $1 - i32.load offset=4 + i32.load offset=12 i32.ne if i32.const 0 @@ -2023,25 +2223,10 @@ if local.get $0 local.get $2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and - local.get $2 + call $~lib/typedarray/Int8Array#__get local.get $1 - i32.load - local.tee $4 - i32.load - i32.lt_u - if (result i32) - local.get $2 - local.get $4 - i32.add - i32.load8_s offset=8 - else - unreachable - end - i32.const 255 - i32.and + local.get $2 + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -2058,33 +2243,9 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#fill|trampoline (; 30 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/Int8Array#fill - ) - (func $~lib/typedarray/Int8Array#subarray (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 38 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) local.get $0 i32.load offset=8 local.set $3 @@ -2139,15 +2300,24 @@ end local.set $3 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $2 + call $~lib/util/runtime/allocate + local.set $2 local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load + local.tee $0 + local.get $2 i32.load + i32.ne + drop + local.get $2 + local.get $0 i32.store local.get $2 local.get $1 - local.get $0 - i32.load offset=4 + local.get $4 i32.add i32.store offset=4 local.get $2 @@ -2156,20 +2326,18 @@ i32.sub i32.store offset=8 local.get $2 + i32.const 17 + call $~lib/util/runtime/register ) - (func $~lib/typedarray/Int32Array#fill (; 32 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/typedarray/Int32Array#fill (; 39 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $1 local.set $4 local.get $0 - i32.load + i32.load offset=4 local.set $5 local.get $0 - i32.load offset=4 - local.set $6 - local.get $0 i32.load offset=8 i32.const 2 i32.shr_u @@ -2228,10 +2396,8 @@ i32.shl local.get $5 i32.add - local.get $6 - i32.add local.get $4 - i32.store offset=8 + i32.store local.get $0 i32.const 1 i32.add @@ -2240,12 +2406,34 @@ end end ) - (func $std/typedarray/isInt32ArrayEqual (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 40 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 272 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load + ) + (func $std/typedarray/isInt32ArrayEqual (; 41 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $1 - i32.load offset=4 + i32.load offset=12 local.get $0 i32.load offset=8 i32.const 2 @@ -2267,25 +2455,10 @@ if local.get $0 local.get $2 - call $~lib/internal/typedarray/TypedArray#__get - local.get $2 + call $~lib/typedarray/Int32Array#__get local.get $1 - i32.load - local.tee $4 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - i32.const 2 - i32.shl - local.get $4 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $2 + call $~lib/array/Array#__get i32.ne if i32.const 0 @@ -2302,69 +2475,37 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#fill|trampoline (; 34 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - i32.const 2147483647 - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/Int32Array#fill - ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 35 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 42 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 36 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 43 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load + i32.load offset=8 local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 global.set $~lib/argc local.get $2 local.get $1 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $1 local.get $0 - i32.const 2 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -2375,23 +2516,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 37 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 44 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 call $~lib/typedarray/Int8Array#reduce i32.const 255 @@ -2400,42 +2540,56 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Uint8Array#__set (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 116 + i32.const 44 + call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 ) - (func $~lib/typedarray/Uint8Array#reduce (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 46 ;) (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 offset=8 + i32.load offset=4 local.set $4 local.get $0 - i32.load + i32.load offset=8 local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 loop $repeat|0 local.get $2 - local.get $4 + local.get $5 i32.lt_s if i32.const 4 global.set $~lib/argc local.get $3 local.get $2 - local.get $5 - i32.add - local.get $6 + local.get $4 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 @@ -2450,23 +2604,22 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 39 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 47 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 3 call $~lib/typedarray/Uint8Array#reduce @@ -2476,14 +2629,14 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 40 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 48 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -2508,14 +2661,14 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 41 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Int16Array#__set (; 49 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -2524,44 +2677,37 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 280 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 1 i32.shl i32.add - i32.add local.get $2 - i32.store16 offset=8 + i32.store16 ) - (func $~lib/typedarray/Int16Array#reduce (; 42 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 50 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 @@ -2570,15 +2716,12 @@ local.get $1 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $1 local.get $0 - i32.const 5 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -2589,22 +2732,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 43 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 51 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#reduce i32.const 65535 @@ -2613,33 +2756,53 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Uint16Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 362 + i32.const 63 + call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 ) - (func $~lib/typedarray/Uint16Array#reduce (; 44 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 53 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 @@ -2648,15 +2811,12 @@ local.get $1 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $1 local.get $0 - i32.const 6 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -2667,22 +2827,22 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 45 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 54 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#reduce i32.const 65535 @@ -2691,33 +2851,29 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reduce (; 46 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 55 ;) (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 offset=4 + local.set $4 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $4 - local.get $0 - i32.load local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 loop $repeat|0 local.get $2 - local.get $4 + local.get $5 i32.lt_s if i32.const 4 @@ -2726,11 +2882,9 @@ local.get $2 i32.const 2 i32.shl - local.get $5 - i32.add - local.get $6 + local.get $4 i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -2745,22 +2899,22 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 47 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 56 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 7 call $~lib/typedarray/Int32Array#reduce @@ -2768,29 +2922,53 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Uint32Array#__set (; 57 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 526 + i32.const 63 + call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 48 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 58 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 8 call $~lib/typedarray/Int32Array#reduce @@ -2798,14 +2976,14 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 49 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/typedarray/Int64Array#__set (; 59 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -2814,49 +2992,42 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 608 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 3 i32.shl i32.add - i32.add local.get $2 - i64.store offset=8 + i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 50 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 60 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 51 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 61 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) (local $5 i32) - (local $6 i32) + local.get $0 + i32.load offset=4 + local.set $4 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $4 - local.get $0 - i32.load local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 loop $repeat|0 local.get $2 - local.get $4 + local.get $5 i32.lt_s if i32.const 4 @@ -2865,11 +3036,9 @@ local.get $2 i32.const 3 i32.shl - local.get $5 - i32.add - local.get $6 + local.get $4 i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 @@ -2884,22 +3053,22 @@ end local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 52 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 62 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 9 call $~lib/typedarray/Int64Array#reduce @@ -2907,29 +3076,53 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Uint64Array#__set (; 63 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 690 + i32.const 63 + call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 53 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 64 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 10 call $~lib/typedarray/Int64Array#reduce @@ -2937,14 +3130,14 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 54 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/typedarray/Float32Array#__set (; 65 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -2953,49 +3146,42 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 772 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 2 i32.shl i32.add - i32.add local.get $2 - f32.store offset=8 + f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 55 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 66 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 56 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 67 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) (local $4 i32) - (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 @@ -3004,15 +3190,12 @@ local.get $1 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f32.load offset=8 + f32.load local.get $1 local.get $0 - i32.const 11 - call_indirect (type $FUNCSIG$fffii) + call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3023,60 +3206,56 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 57 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 68 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#reduce f32.const 6 f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 58 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 69 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 59 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 70 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) (local $4 i32) - (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 local.get $1 - local.get $3 + local.get $4 i32.lt_s if i32.const 4 @@ -3085,15 +3264,12 @@ local.get $1 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f64.load offset=8 + f64.load local.get $1 local.get $0 - i32.const 12 - call_indirect (type $FUNCSIG$dddii) + call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3104,46 +3280,42 @@ end local.get $2 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 60 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 71 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#reduce f64.const 6 f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int8Array#reduceRight (; 61 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 72 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 @@ -3160,13 +3332,10 @@ local.get $1 local.get $3 i32.add - local.get $4 - i32.add - i32.load8_s offset=8 + i32.load8_s local.get $1 local.get $0 - i32.const 13 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3177,23 +3346,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 62 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 73 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 call $~lib/typedarray/Int8Array#reduceRight i32.const 255 @@ -3202,24 +3370,20 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 63 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 74 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $4 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 local.get $0 i32.load offset=8 i32.const 1 @@ -3236,9 +3400,7 @@ local.get $2 local.get $4 i32.add - local.get $5 - i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 @@ -3253,23 +3415,22 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 64 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 75 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 14 call $~lib/typedarray/Uint8Array#reduceRight @@ -3279,14 +3440,14 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 65 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 76 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -3311,24 +3472,20 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reduceRight (; 66 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 77 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 @@ -3349,13 +3506,10 @@ i32.shl local.get $3 i32.add - local.get $4 - i32.add - i32.load16_s offset=8 + i32.load16_s local.get $1 local.get $0 - i32.const 16 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3366,22 +3520,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 67 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 78 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#reduceRight i32.const 65535 @@ -3390,24 +3544,20 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 68 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 79 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 @@ -3428,13 +3578,10 @@ i32.shl local.get $3 i32.add - local.get $4 - i32.add - i32.load16_u offset=8 + i32.load16_u local.get $1 local.get $0 - i32.const 17 - call_indirect (type $FUNCSIG$iiiii) + call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3445,22 +3592,22 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 69 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 80 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#reduceRight i32.const 65535 @@ -3469,24 +3616,20 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reduceRight (; 70 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 81 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $4 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 local.get $0 i32.load offset=8 i32.const 2 @@ -3507,9 +3650,7 @@ i32.shl local.get $4 i32.add - local.get $5 - i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -3524,22 +3665,22 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 71 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 82 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 18 call $~lib/typedarray/Int32Array#reduceRight @@ -3547,29 +3688,29 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 83 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 19 call $~lib/typedarray/Int32Array#reduceRight @@ -3577,24 +3718,20 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int64Array#reduceRight (; 73 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 84 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (local $3 i64) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load - local.set $4 local.get $0 i32.load offset=4 - local.set $5 + local.set $4 local.get $0 i32.load offset=8 i32.const 3 @@ -3615,9 +3752,7 @@ i32.shl local.get $4 i32.add - local.get $5 - i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 @@ -3632,22 +3767,22 @@ end local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 74 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 85 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 20 call $~lib/typedarray/Int64Array#reduceRight @@ -3655,29 +3790,29 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 86 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 21 call $~lib/typedarray/Int64Array#reduceRight @@ -3685,24 +3820,20 @@ i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reduceRight (; 76 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 87 ;) (type $FUNCSIG$fi) (param $0 i32) (result f32) (local $1 i32) (local $2 f32) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 @@ -3723,13 +3854,10 @@ i32.shl local.get $3 i32.add - local.get $4 - i32.add - f32.load offset=8 + f32.load local.get $1 local.get $0 - i32.const 22 - call_indirect (type $FUNCSIG$fffii) + call $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3740,46 +3868,42 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 77 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 88 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#reduceRight f32.const 6 f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reduceRight (; 78 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 89 ;) (type $FUNCSIG$di) (param $0 i32) (result f64) (local $1 i32) (local $2 f64) (local $3 i32) - (local $4 i32) - local.get $0 - i32.load - local.set $3 local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 @@ -3800,13 +3924,10 @@ i32.shl local.get $3 i32.add - local.get $4 - i32.add - f64.load offset=8 + f64.load local.get $1 local.get $0 - i32.const 23 - call_indirect (type $FUNCSIG$dddii) + call $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 local.set $2 local.get $1 i32.const 1 @@ -3817,61 +3938,58 @@ end local.get $2 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 90 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#reduceRight f64.const 6 f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 80 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 91 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 81 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 92 ;) (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.load - local.set $2 local.get $0 i32.load offset=4 local.set $3 - i32.const 0 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Int8Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -3880,19 +3998,16 @@ i32.const 3 global.set $~lib/argc local.get $1 - local.get $6 + local.get $5 i32.add local.get $1 - local.get $2 - i32.add local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $1 local.get $0 - i32.const 24 - call_indirect (type $FUNCSIG$iiii) - i32.store8 offset=8 + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + i32.store8 local.get $1 i32.const 1 i32.add @@ -3900,94 +4015,84 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 82 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 93 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 call $~lib/typedarray/Int8Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int8Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int8Array#__get i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#map (; 83 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 94 ;) (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.load - local.set $2 local.get $0 i32.load offset=4 local.set $3 - i32.const 0 local.get $0 i32.load offset=8 - local.tee $4 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Uint8Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -3996,19 +4101,16 @@ i32.const 3 global.set $~lib/argc local.get $1 - local.get $6 + local.get $5 i32.add local.get $1 - local.get $2 - i32.add local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $1 local.get $0 - i32.const 25 - call_indirect (type $FUNCSIG$iiii) - i32.store8 offset=8 + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + i32.store8 local.get $1 i32.const 1 i32.add @@ -4016,93 +4118,103 @@ br $repeat|0 end end - local.get $5 + local.get $2 + ) + (func $~lib/typedarray/Uint8Array#__get (; 95 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 110 + i32.const 44 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 84 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 96 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 call $~lib/typedarray/Uint8Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 85 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 97 ;) (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.load - local.set $2 local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 - local.tee $4 + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4111,19 +4223,16 @@ i32.const 3 global.set $~lib/argc local.get $1 - local.get $6 + local.get $5 i32.add local.get $1 - local.get $2 - i32.add local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $1 local.get $0 - i32.const 26 - call_indirect (type $FUNCSIG$iiii) - i32.store8 offset=8 + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + i32.store8 local.get $1 i32.const 1 i32.add @@ -4131,9 +4240,9 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 86 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 98 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -4153,51 +4262,45 @@ call $~lib/typedarray/Uint8ClampedArray#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int16Array#map (; 87 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 99 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4206,20 +4309,19 @@ (local $6 i32) (local $7 i32) local.get $0 - i32.load - local.set $2 - local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $4 + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Int16Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4230,20 +4332,19 @@ local.get $1 i32.const 1 i32.shl - local.tee $7 - local.get $6 - i32.add - local.get $2 - local.get $7 - i32.add + local.tee $6 local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $1 local.get $0 - i32.const 27 - call_indirect (type $FUNCSIG$iiii) - i32.store16 offset=8 + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i32.store16 local.get $1 i32.const 1 i32.add @@ -4251,9 +4352,9 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 88 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#__get (; 100 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4262,88 +4363,79 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 274 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 1 i32.shl i32.add - i32.add - i32.load16_s offset=8 + i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 89 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 101 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 call $~lib/typedarray/Int16Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Int16Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Int16Array#__get i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Int16Array#__get i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#map (; 90 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4352,20 +4444,19 @@ (local $6 i32) (local $7 i32) local.get $0 - i32.load - local.set $2 - local.get $0 i32.load offset=4 local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $4 - call $~lib/typedarray/Int16Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Uint16Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4376,20 +4467,19 @@ local.get $1 i32.const 1 i32.shl - local.tee $7 - local.get $6 - i32.add - local.get $2 - local.get $7 - i32.add + local.tee $6 local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $1 local.get $0 - i32.const 28 - call_indirect (type $FUNCSIG$iiii) - i32.store16 offset=8 + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i32.store16 local.get $1 i32.const 1 i32.add @@ -4397,9 +4487,9 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 91 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (; 103 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -4408,88 +4498,80 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 356 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 1 i32.shl i32.add - i32.add - i32.load16_u offset=8 + i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 92 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 104 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 call $~lib/typedarray/Uint16Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int32Array#map (; 93 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 105 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4497,236 +4579,304 @@ (local $6 i32) (local $7 i32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $5 + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Int32Array#constructor - local.tee $6 - i32.load - local.set $7 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $5 - i32.ge_s - br_if $break|0 + local.get $1 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc - local.get $7 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $2 + local.get $1 i32.const 2 i32.shl + local.tee $6 local.get $3 i32.add - local.get $4 - i32.add - i32.load offset=8 - local.get $2 + i32.load + local.get $1 local.get $0 + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i32.store local.get $1 - call_indirect (type $FUNCSIG$iiii) - i32.store offset=8 - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|0 end end - local.get $6 + local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 106 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 - i32.const 29 call $~lib/typedarray/Int32Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Uint32Array#map (; 107 ;) (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 $7 i32) + local.get $0 + i32.load offset=4 + local.set $3 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Uint32Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 + loop $repeat|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc + local.get $1 + i32.const 2 + i32.shl + local.tee $6 + local.get $3 + i32.add + i32.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i32.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + local.get $2 + ) + (func $~lib/typedarray/Uint32Array#__get (; 108 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 520 + i32.const 63 + call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 95 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 109 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 - i32.const 30 - call $~lib/typedarray/Int32Array#map + call $~lib/typedarray/Uint32Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 9 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 96 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 110 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 97 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 111 ;) (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 $7 i32) - local.get $0 - i32.load - local.set $3 + (local $7 i64) local.get $0 i32.load offset=4 - local.set $4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.tee $5 + local.tee $2 + local.set $4 + local.get $2 call $~lib/typedarray/Int64Array#constructor - local.tee $6 - i32.load - local.set $7 + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $5 - i32.ge_s - br_if $break|0 + local.get $1 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc - local.get $7 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $2 + local.get $1 i32.const 3 i32.shl + local.tee $6 local.get $3 i32.add - local.get $4 - i32.add - i64.load offset=8 - local.get $2 + i64.load + local.get $1 local.get $0 + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i64.store local.get $1 - call_indirect (type $FUNCSIG$jjii) - i64.store offset=8 - local.get $2 i32.const 1 i32.add - local.set $2 + local.set $1 br $repeat|0 end end - local.get $6 + local.get $2 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 98 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/typedarray/Int64Array#__get (; 112 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -4735,157 +4885,226 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 602 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 3 i32.shl i32.add - i32.add - i64.load offset=8 + i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 99 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 113 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 - i32.const 31 call $~lib/typedarray/Int64Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 1 i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 4 i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 9 i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 100 ;) (type $FUNCSIG$v) - (local $0 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + (func $~lib/typedarray/Uint64Array#map (; 114 ;) (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 $7 i64) local.get $0 - i32.const 2 - i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + i32.load offset=4 + local.set $3 local.get $0 - i32.const 32 - call $~lib/typedarray/Int64Array#map - local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i64.const 1 - i64.ne - if - i32.const 0 - i32.const 8 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Uint64Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 + loop $repeat|0 + local.get $1 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc + local.get $1 + i32.const 3 + i32.shl + local.tee $6 + local.get $3 + i32.add + i64.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + i64.store + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + local.get $2 + ) + (func $~lib/typedarray/Uint64Array#__get (; 115 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) + local.get $1 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 684 + i32.const 63 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load + ) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 116 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + call $~lib/typedarray/Uint64Array#map + local.tee $0 + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 1 + i64.ne + if + i32.const 0 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 4 i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 9 i64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 101 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 117 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 102 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 118 ;) (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 $7 i32) - local.get $0 - i32.load - local.set $2 + (local $7 f32) local.get $0 i32.load offset=4 local.set $3 @@ -4893,11 +5112,13 @@ i32.load offset=8 i32.const 2 i32.shr_u - local.tee $4 - call $~lib/typedarray/Int32Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Float32Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -4908,20 +5129,19 @@ local.get $1 i32.const 2 i32.shl - local.tee $7 - local.get $6 - i32.add - local.get $2 - local.get $7 - i32.add + local.tee $6 local.get $3 i32.add - f32.load offset=8 + f32.load local.get $1 local.get $0 - i32.const 33 - call_indirect (type $FUNCSIG$ffii) - f32.store offset=8 + call $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + f32.store local.get $1 i32.const 1 i32.add @@ -4929,9 +5149,9 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 103 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/typedarray/Float32Array#__get (; 119 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -4940,97 +5160,91 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 766 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.load offset=4 - local.get $0 - i32.load local.get $1 i32.const 2 i32.shl i32.add - i32.add - f32.load offset=8 + f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 104 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 120 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 call $~lib/typedarray/Float32Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 1 f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 4 f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 9 f32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 105 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 121 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 106 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 122 ;) (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 $7 i32) - local.get $0 - i32.load - local.set $2 + (local $7 f64) local.get $0 i32.load offset=4 local.set $3 @@ -5038,11 +5252,13 @@ i32.load offset=8 i32.const 3 i32.shr_u - local.tee $4 - call $~lib/typedarray/Int64Array#constructor - local.tee $5 - i32.load - local.set $6 + local.tee $2 + local.set $4 + local.get $2 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.load offset=4 + local.set $5 loop $repeat|0 local.get $1 local.get $4 @@ -5053,20 +5269,19 @@ local.get $1 i32.const 3 i32.shl - local.tee $7 - local.get $6 - i32.add - local.get $2 - local.get $7 - i32.add + local.tee $6 local.get $3 i32.add - f64.load offset=8 + f64.load local.get $1 local.get $0 - i32.const 34 - call_indirect (type $FUNCSIG$ddii) - f64.store offset=8 + call $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.set $7 + local.get $5 + local.get $6 + i32.add + local.get $7 + f64.store local.get $1 i32.const 1 i32.add @@ -5074,108 +5289,101 @@ br $repeat|0 end end - local.get $5 + local.get $2 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 107 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 123 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 call $~lib/typedarray/Float64Array#map local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 1 f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 4 f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 9 f64.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 124 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 109 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 125 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load + i32.load offset=8 local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 + br_if $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 drop local.get $2 i32.const 1 @@ -5187,39 +5395,38 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 110 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 126 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 111 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 127 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 35 call $~lib/typedarray/Int8Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5227,48 +5434,41 @@ call $~lib/typedarray/Int8Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#some (; 112 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 128 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load + i32.load offset=8 local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 + br_if $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 drop local.get $2 i32.const 1 @@ -5280,33 +5480,32 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 113 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 129 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 37 call $~lib/typedarray/Uint8Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5314,14 +5513,14 @@ call $~lib/typedarray/Uint8Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 114 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 130 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -5343,10 +5542,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5354,59 +5553,52 @@ call $~lib/typedarray/Uint8Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 115 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 116 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + br_if $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 drop local.get $2 i32.const 1 @@ -5418,38 +5610,38 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 117 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 133 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 118 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 134 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 41 call $~lib/typedarray/Int16Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5457,52 +5649,45 @@ call $~lib/typedarray/Int16Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#some (; 119 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 + br_if $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 drop local.get $2 i32.const 1 @@ -5514,32 +5699,32 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 120 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 136 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 43 call $~lib/typedarray/Uint16Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5547,57 +5732,50 @@ call $~lib/typedarray/Uint16Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 121 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 122 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 + br_if $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 drop local.get $2 i32.const 1 @@ -5609,36 +5787,36 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 123 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 139 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.eqz ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 140 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 45 call $~lib/typedarray/Int32Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5646,39 +5824,39 @@ call $~lib/typedarray/Int32Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 125 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 141 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 47 call $~lib/typedarray/Int32Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5686,57 +5864,50 @@ call $~lib/typedarray/Int32Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 126 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 142 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 127 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$ijii) - br_if $~lib/internal/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 + br_if $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 drop local.get $2 i32.const 1 @@ -5748,37 +5919,37 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 128 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 144 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 129 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 145 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 i32.const 0 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 49 call $~lib/typedarray/Int64Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5786,39 +5957,39 @@ call $~lib/typedarray/Int64Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 146 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 i32.const 0 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 51 call $~lib/typedarray/Int64Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5826,57 +5997,50 @@ call $~lib/typedarray/Int64Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 131 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 147 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f32.load offset=8 + f32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$ifii) - br_if $~lib/internal/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 + br_if $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 drop local.get $2 i32.const 1 @@ -5888,37 +6052,37 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 133 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 149 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 134 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 150 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 53 call $~lib/typedarray/Float32Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -5926,57 +6090,50 @@ call $~lib/typedarray/Float32Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 135 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 151 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 136 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc i32.const 1 local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f64.load offset=8 + f64.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$idii) - br_if $~lib/internal/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 + br_if $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 drop local.get $2 i32.const 1 @@ -5988,37 +6145,37 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 137 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 153 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 138 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 154 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 55 call $~lib/typedarray/Float64Array#some i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6026,50 +6183,43 @@ call $~lib/typedarray/Float64Array#some if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int8Array#findIndex (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - local.set $2 - local.get $0 - local.tee $3 - i32.load - local.set $4 local.get $0 + local.tee $2 i32.load offset=4 - local.set $5 + local.set $3 i32.const 0 local.set $0 - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $2 + i32.load offset=8 + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 local.get $0 i32.const 1 i32.add @@ -6082,41 +6232,40 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 156 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 141 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 157 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 57 call $~lib/typedarray/Int8Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6125,51 +6274,44 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#findIndex (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - local.get $0 - i32.load offset=8 - local.set $2 - local.get $0 - local.tee $3 - i32.load - local.set $4 local.get $0 + local.tee $2 i32.load offset=4 - local.set $5 + local.set $3 i32.const 0 local.set $0 - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 + local.get $2 + i32.load offset=8 + local.set $4 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 local.get $0 i32.const 1 i32.add @@ -6182,34 +6324,33 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 143 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 159 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 59 call $~lib/typedarray/Uint8Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6218,15 +6359,15 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 144 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 160 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -6248,11 +6389,11 @@ i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6261,55 +6402,48 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int16Array#findIndex (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 local.get $0 i32.const 1 i32.add @@ -6322,40 +6456,40 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 146 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 162 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 163 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 63 call $~lib/typedarray/Int16Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6364,55 +6498,48 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#findIndex (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 164 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 local.get $0 i32.const 1 i32.add @@ -6425,33 +6552,33 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 149 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 165 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 65 call $~lib/typedarray/Uint16Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6460,55 +6587,48 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int32Array#findIndex (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load offset=8 + i32.load local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$iiii) - br_if $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 local.get $0 i32.const 1 i32.add @@ -6521,38 +6641,38 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 151 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 167 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 152 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 168 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 67 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6561,41 +6681,41 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 153 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 169 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 69 call $~lib/typedarray/Int32Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6604,55 +6724,48 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int64Array#findIndex (; 154 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 i32.const 3 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 - i32.const 3 - global.set $~lib/argc + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc local.get $0 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i64.load offset=8 + i64.load local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$ijii) - br_if $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 local.get $0 i32.const 1 i32.add @@ -6665,38 +6778,38 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 155 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 171 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 156 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 172 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 71 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6705,41 +6818,41 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 157 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 173 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 73 call $~lib/typedarray/Int64Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6748,55 +6861,48 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Float32Array#findIndex (; 158 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 i32.const 2 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f32.load offset=8 + f32.load local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$ifii) - br_if $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 local.get $0 i32.const 1 i32.add @@ -6809,38 +6915,38 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 159 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 175 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 160 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 176 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 75 call $~lib/typedarray/Float32Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6849,55 +6955,48 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Float64Array#findIndex (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 + local.tee $2 + i32.load offset=4 + local.set $3 + i32.const 0 + local.set $0 + local.get $2 i32.load offset=8 i32.const 3 i32.shr_u - local.set $2 - local.get $0 - local.tee $3 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 - i32.const 0 - local.set $0 - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 loop $repeat|0 - block $break|0 - local.get $0 - local.get $2 - i32.ge_s - br_if $break|0 + local.get $0 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $0 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f64.load offset=8 + f64.load local.get $0 - local.get $3 + local.get $2 local.get $1 call_indirect (type $FUNCSIG$idii) - br_if $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 + br_if $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 local.get $0 i32.const 1 i32.add @@ -6910,38 +7009,38 @@ end local.get $0 ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 162 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 178 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 179 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 77 call $~lib/typedarray/Float64Array#findIndex i32.const 1 i32.ne if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -6950,15 +7049,15 @@ i32.const -1 i32.ne if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 164 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 180 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -6968,44 +7067,36 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int8Array#every (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load + i32.load offset=8 local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 - end + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7016,33 +7107,32 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 166 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 182 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 79 call $~lib/typedarray/Int8Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7050,57 +7140,49 @@ call $~lib/typedarray/Int8Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 167 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 1 i32.and i32.eqz ) - (func $~lib/typedarray/Uint8Array#every (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load + i32.load offset=8 local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 - end + br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7111,33 +7193,32 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 169 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 185 ;) (type $FUNCSIG$v) (local $0 i32) - i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 81 call $~lib/typedarray/Uint8Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7145,14 +7226,14 @@ call $~lib/typedarray/Uint8Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 170 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 186 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor @@ -7174,10 +7255,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7185,14 +7266,14 @@ call $~lib/typedarray/Uint8Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -7202,48 +7283,40 @@ i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int16Array#every (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#every (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 - end + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7254,32 +7327,32 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 173 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 189 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int16Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 85 call $~lib/typedarray/Int16Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7287,55 +7360,47 @@ call $~lib/typedarray/Int16Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#every (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 190 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 1 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 - end + br_if $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7346,32 +7411,32 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 175 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 191 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 87 call $~lib/typedarray/Uint16Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7379,61 +7444,53 @@ call $~lib/typedarray/Uint16Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 176 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 192 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.eqz ) - (func $~lib/typedarray/Int32Array#every (; 177 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 193 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$iiii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 - end + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7444,32 +7501,32 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 194 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int32Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 89 call $~lib/typedarray/Int32Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7477,39 +7534,39 @@ call $~lib/typedarray/Int32Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 179 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 195 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 91 call $~lib/typedarray/Int32Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7517,62 +7574,54 @@ call $~lib/typedarray/Int32Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 180 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 196 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 181 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 197 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$ijii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 - end + br_if $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7583,32 +7632,32 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 198 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor local.tee $0 i32.const 0 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 93 call $~lib/typedarray/Int64Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7616,46 +7665,46 @@ call $~lib/typedarray/Int64Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 183 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 199 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 184 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 200 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $0 i32.const 0 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 95 call $~lib/typedarray/Int64Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7663,36 +7712,34 @@ call $~lib/typedarray/Int64Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/math/NativeMathf.mod (; 185 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) + (func $~lib/math/NativeMathf.mod (; 201 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) local.get $0 i32.reinterpret_f32 - local.tee $3 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.set $2 - local.get $3 + local.tee $2 i32.const -2147483648 i32.and local.set $4 local.get $2 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.tee $3 i32.const 255 i32.eq - local.tee $1 if (result i32) - local.get $1 + i32.const 1 else i32.const 0 end @@ -7706,7 +7753,7 @@ return end block $folding-inner0 - local.get $3 + local.get $2 i32.const 1 i32.shl local.tee $1 @@ -7720,36 +7767,36 @@ local.get $0 return end - local.get $2 + local.get $3 if (result i32) - local.get $3 + local.get $2 i32.const 8388607 i32.and i32.const 8388608 i32.or else - local.get $3 - i32.const 1 local.get $2 + i32.const 1 local.get $3 + local.get $2 i32.const 9 i32.shl i32.clz i32.sub - local.tee $2 + local.tee $3 i32.sub i32.shl end local.set $1 loop $continue|0 - local.get $2 + local.get $3 i32.const 128 i32.gt_s if local.get $1 i32.const 8388608 i32.ge_u - if + if (result i32) local.get $1 i32.const 8388608 i32.eq @@ -7757,16 +7804,16 @@ local.get $1 i32.const 8388608 i32.sub - local.set $1 + else + local.get $1 end - local.get $1 i32.const 1 i32.shl local.set $1 - local.get $2 + local.get $3 i32.const 1 i32.sub - local.set $2 + local.set $3 br $continue|0 end end @@ -7788,27 +7835,27 @@ i32.const 8 i32.shl i32.clz - local.tee $3 + local.tee $1 i32.shl - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.get $1 i32.sub - local.tee $2 + local.tee $1 i32.const 0 i32.gt_s if (result i32) - local.get $1 + local.get $2 i32.const 8388608 i32.sub - local.get $2 + local.get $1 i32.const 23 i32.shl i32.or else - local.get $1 - i32.const 1 local.get $2 + i32.const 1 + local.get $1 i32.sub i32.shr_u end @@ -7821,54 +7868,46 @@ local.get $0 f32.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 186 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 202 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 187 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 203 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f32.load offset=8 + f32.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$ifii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 - end + br_if $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -7879,32 +7918,32 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 188 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 204 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $0 i32.const 0 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 97 call $~lib/typedarray/Float32Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -7912,37 +7951,34 @@ call $~lib/typedarray/Float32Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/math/NativeMath.mod (; 189 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) + (func $~lib/math/NativeMath.mod (; 205 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i64) (local $2 i64) (local $3 i64) (local $4 i64) - (local $5 i32) local.get $0 i64.reinterpret_f64 - local.tee $1 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - local.set $2 - local.get $1 + local.tee $2 i64.const 63 i64.shr_u local.set $4 local.get $2 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + local.tee $3 i64.const 2047 i64.eq - local.tee $5 if (result i32) - local.get $5 + i32.const 1 else i32.const 0 end @@ -7956,38 +7992,38 @@ return end block $folding-inner0 - local.get $1 + local.get $2 i64.const 1 i64.shl - local.tee $3 + local.tee $1 i64.const -9223372036854775808 i64.le_u if - local.get $3 + local.get $1 i64.const -9223372036854775808 i64.eq br_if $folding-inner0 local.get $0 return end - local.get $2 + local.get $3 i64.eqz if (result i64) - local.get $1 + local.get $2 i64.const 0 + local.get $3 local.get $2 - local.get $1 i64.const 12 i64.shl i64.clz i64.sub - local.tee $2 + local.tee $3 i64.sub i64.const 1 i64.add i64.shl else - local.get $1 + local.get $2 i64.const 4503599627370495 i64.and i64.const 4503599627370496 @@ -7995,14 +8031,14 @@ end local.set $1 loop $continue|0 - local.get $2 + local.get $3 i64.const 1024 i64.gt_s if local.get $1 i64.const 4503599627370496 i64.ge_u - if + if (result i64) local.get $1 i64.const 4503599627370496 i64.eq @@ -8010,16 +8046,16 @@ local.get $1 i64.const 4503599627370496 i64.sub - local.set $1 + else + local.get $1 end - local.get $1 i64.const 1 i64.shl local.set $1 - local.get $2 + local.get $3 i64.const 1 i64.sub - local.set $2 + local.set $3 br $continue|0 end end @@ -8041,27 +8077,27 @@ i64.const 11 i64.shl i64.clz - local.tee $3 + local.tee $1 i64.shl - local.set $1 - local.get $2 + local.set $2 local.get $3 + local.get $1 i64.sub - local.tee $2 + local.tee $1 i64.const 0 i64.gt_s if (result i64) - local.get $1 + local.get $2 i64.const 4503599627370496 i64.sub - local.get $2 + local.get $1 i64.const 52 i64.shl i64.or else - local.get $1 - i64.const 0 local.get $2 + i64.const 0 + local.get $1 i64.sub i64.const 1 i64.add @@ -8078,54 +8114,46 @@ local.get $0 f64.mul ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 190 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 206 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 191 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 207 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc + i32.const 0 local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - f64.load offset=8 + f64.load local.get $2 local.get $0 local.get $1 call_indirect (type $FUNCSIG$idii) i32.eqz - if - i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 - end + br_if $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 + drop local.get $2 i32.const 1 i32.add @@ -8136,32 +8164,32 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 192 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 208 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 3 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $0 i32.const 0 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 99 call $~lib/typedarray/Float64Array#every i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -8169,66 +8197,51 @@ call $~lib/typedarray/Float64Array#every if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 193 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 209 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 255 i32.and - local.get $1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $1 + call $~lib/array/Array#__get i32.const 255 i32.and i32.ne if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -8236,37 +8249,30 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int8Array#forEach (; 194 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int8Array#forEach (; 210 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $2 local.get $0 - i32.load + i32.load offset=8 local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 loop $repeat|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if i32.const 3 global.set $~lib/argc local.get $1 - local.get $3 - i32.add - local.get $4 + local.get $2 i32.add - i32.load8_s offset=8 + i32.load8_s local.get $1 local.get $0 - i32.const 101 - call_indirect (type $FUNCSIG$viii) + call $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 local.get $1 i32.const 1 i32.add @@ -8275,125 +8281,79 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 195 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 211 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - i32.const 0 i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $0 i32.const 0 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $0 i32.const 1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 24 i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 + call $~lib/typedarray/Int8Array#__set + local.get $0 call $~lib/typedarray/Int8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#forEach (; 196 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 212 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 - i32.load offset=8 + i32.load offset=4 local.set $3 local.get $0 - i32.load + i32.load offset=8 local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $2 - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load8_u offset=8 + i32.load8_u local.get $2 local.get $0 local.get $1 @@ -8406,230 +8366,138 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 197 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 213 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount - i32.const 0 i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 + call $~lib/typedarray/Uint8Array#constructor + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $0 i32.const 0 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $0 i32.const 1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 + call $~lib/typedarray/Uint8Array#__set + local.get $0 i32.const 102 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 198 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 214 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $0 i32.const 0 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 1 + local.get $0 i32.const 1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 - i32.const 2 + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 255 i32.and call $~lib/typedarray/Uint8ClampedArray#__set - local.get $1 + local.get $0 i32.const 103 call $~lib/typedarray/Uint8Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 199 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 215 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 i32.const 65535 i32.and - local.get $1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $1 + call $~lib/array/Array#__get i32.const 65535 i32.and i32.ne if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -8637,25 +8505,21 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 200 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Int16Array#forEach (; 216 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $2 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 - local.get $0 - i32.load local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 loop $repeat|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if i32.const 3 @@ -8663,15 +8527,12 @@ local.get $1 i32.const 1 i32.shl - local.get $3 - i32.add - local.get $4 + local.get $2 i32.add - i32.load16_s offset=8 + i32.load16_s local.get $1 local.get $0 - i32.const 104 - call_indirect (type $FUNCSIG$viii) + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 local.get $1 i32.const 1 i32.add @@ -8680,115 +8541,73 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 201 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 217 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $0 i32.const 0 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $0 i32.const 1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 16 i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 + call $~lib/typedarray/Int16Array#__set + local.get $0 call $~lib/typedarray/Int16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#forEach (; 202 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 218 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) + local.get $0 + i32.load offset=4 + local.set $2 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.set $2 - local.get $0 - i32.load local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 loop $repeat|0 local.get $1 - local.get $2 + local.get $3 i32.lt_s if i32.const 3 @@ -8796,15 +8615,12 @@ local.get $1 i32.const 1 i32.shl - local.get $3 - i32.add - local.get $4 + local.get $2 i32.add - i32.load16_u offset=8 + i32.load16_u local.get $1 local.get $0 - i32.const 105 - call_indirect (type $FUNCSIG$viii) + call $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 local.get $1 i32.const 1 i32.add @@ -8813,139 +8629,86 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 203 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 219 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 + call $~lib/typedarray/Uint16Array#constructor + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $0 i32.const 0 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $0 i32.const 1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + i32.const 1 + call $~lib/array/Array#__get i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 + call $~lib/typedarray/Uint16Array#__set + local.get $0 call $~lib/typedarray/Uint16Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 204 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - local.get $0 - local.get $1 + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 220 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $0 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $1 + call $~lib/array/Array#__get + local.get $0 i32.ne if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -8953,38 +8716,31 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 205 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 221 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $2 i32.const 2 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i32.load offset=8 + i32.load local.get $2 local.get $0 local.get $1 @@ -8997,215 +8753,123 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 206 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 222 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int32Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $0 i32.const 0 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 i32.const 1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 i32.const 106 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 207 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 223 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 + call $~lib/typedarray/Uint32Array#constructor + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $0 i32.const 0 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 i32.const 1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 i32.const 107 call $~lib/typedarray/Int32Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 208 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $1 + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 224 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + local.get $0 global.get $std/typedarray/forEachValues - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $1 + call $~lib/array/Array#__get i64.extend_i32_s - local.get $0 i64.ne if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount local.get $1 + global.get $std/typedarray/forEachCallCount i32.ne if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf local.get $2 + global.get $std/typedarray/forEachSelf i32.ne if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -9213,38 +8877,31 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 209 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 225 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $3 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - local.set $3 - local.get $0 - i32.load local.set $4 - local.get $0 - i32.load offset=4 - local.set $5 loop $repeat|0 - block $break|0 - local.get $2 - local.get $3 - i32.ge_s - br_if $break|0 + local.get $2 + local.get $4 + i32.lt_s + if i32.const 3 global.set $~lib/argc local.get $2 i32.const 3 i32.shl - local.get $4 - i32.add - local.get $5 + local.get $3 i32.add - i64.load offset=8 + i64.load local.get $2 local.get $0 local.get $1 @@ -9257,668 +8914,859 @@ end end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 210 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 226 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $1 + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 + local.get $0 i32.const 0 + global.get $std/typedarray/forEachValues i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 i32.const 1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 + call $~lib/typedarray/Int64Array#__set + local.get $0 i32.const 108 call $~lib/typedarray/Int64Array#forEach global.get $std/typedarray/forEachCallCount i32.const 3 i32.ne if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 211 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 227 ;) (type $FUNCSIG$v) (local $0 i32) - (local $1 i32) i32.const 0 global.set $std/typedarray/forEachCallCount i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 + call $~lib/typedarray/Uint64Array#constructor + local.tee $0 global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $0 i32.const 0 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end + i32.const 0 + call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 i32.const 1 + global.get $std/typedarray/forEachValues i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 109 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 1112 + i32.const 24 + i32.const 430 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 228 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + local.get $0 + global.get $std/typedarray/forEachValues + local.get $1 + call $~lib/array/Array#__get + f32.convert_i32_s + f32.ne + if + i32.const 904 + i32.const 24 + i32.const 425 i32.const 4 - i32.add - i32.load offset=8 - else + call $~lib/builtins/abort unreachable end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 968 + i32.const 24 + i32.const 426 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 1032 + i32.const 24 + i32.const 427 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $~lib/typedarray/Float32Array#forEach (; 229 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 i32.const 2 + i32.shr_u + local.set $3 + loop $repeat|0 + local.get $1 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc + local.get $1 + i32.const 2 + i32.shl + local.get $2 + i32.add + f32.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 230 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + global.get $std/typedarray/forEachValues + i32.const 0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 i32.const 2 global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + call $~lib/typedarray/Float32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 1112 + i32.const 24 + i32.const 430 + i32.const 2 + call $~lib/builtins/abort unreachable end - i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 231 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + local.get $0 + global.get $std/typedarray/forEachValues local.get $1 - i32.const 109 - call $~lib/typedarray/Int64Array#forEach + call $~lib/array/Array#__get + f64.convert_i32_s + f64.ne + if + i32.const 904 + i32.const 24 + i32.const 425 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $1 + global.get $std/typedarray/forEachCallCount + i32.ne + if + i32.const 968 + i32.const 24 + i32.const 426 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + local.get $2 + global.get $std/typedarray/forEachSelf + i32.ne + if + i32.const 1032 + i32.const 24 + i32.const 427 + i32.const 4 + call $~lib/builtins/abort + unreachable + end global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $~lib/typedarray/Float64Array#forEach (; 232 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + local.get $0 + i32.load offset=4 + local.set $2 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $3 + loop $repeat|0 + local.get $1 + local.get $3 + i32.lt_s + if + i32.const 3 + global.set $~lib/argc + local.get $1 + i32.const 3 + i32.shl + local.get $2 + i32.add + f64.load + local.get $1 + local.get $0 + call $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|0 + end + end + ) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 233 ;) (type $FUNCSIG$v) + (local $0 i32) + i32.const 0 + global.set $std/typedarray/forEachCallCount i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + global.get $std/typedarray/forEachValues + i32.const 0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + global.get $std/typedarray/forEachValues + i32.const 1 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + global.get $std/typedarray/forEachValues + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + call $~lib/typedarray/Float64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + if + i32.const 1112 + i32.const 24 + i32.const 430 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Int8Array#reverse (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 + loop $repeat|0 + local.get $2 + local.get $1 + i32.lt_s + if + local.get $2 + local.get $4 + i32.add + local.tee $3 + i32.load8_s + local.set $5 + local.get $3 + local.get $1 + local.get $4 + i32.add + local.tee $3 + i32.load8_s + i32.store8 + local.get $3 + local.get $5 + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $repeat|0 + end + end + local.get $0 + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 235 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Int8Array#constructor + local.set $2 + i32.const 9 + call $~lib/typedarray/Int8Array#constructor + local.set $3 + loop $repeat|0 + block $break|0 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $2 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $3 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|0 + end + end + local.get $2 + call $~lib/typedarray/Int8Array#reverse + drop + i32.const 0 + local.set $0 + loop $repeat|1 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + local.get $0 + call $~lib/typedarray/Int8Array#__get + local.get $1 + i32.const 8 + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.ne + if + i32.const 1272 + i32.const 24 + i32.const 461 + i32.const 4 + call $~lib/builtins/abort + unreachable + else + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|1 + end + unreachable + end + end + local.get $3 + i32.const 4 + i32.const 8 + call $~lib/typedarray/Int8Array#subarray + call $~lib/typedarray/Int8Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 8 i32.ne if - i32.const 920 - i32.const 8 - i32.const 430 + i32.const 1360 + i32.const 24 + i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 212 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) - (local $3 i32) local.get $0 - local.get $1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - f32.ne + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 7 + i32.ne if - i32.const 752 - i32.const 8 - i32.const 425 - i32.const 4 - call $~lib/env/abort + i32.const 1360 + i32.const 24 + i32.const 467 + i32.const 2 + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - local.get $1 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 6 i32.ne if - i32.const 800 - i32.const 8 - i32.const 426 - i32.const 4 - call $~lib/env/abort + i32.const 1360 + i32.const 24 + i32.const 468 + i32.const 2 + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachSelf - local.get $2 + local.get $0 + i32.const 3 + call $~lib/typedarray/Int8Array#__get + i32.const 5 i32.ne if - i32.const 848 - i32.const 8 - i32.const 427 - i32.const 4 - call $~lib/env/abort + i32.const 1360 + i32.const 24 + i32.const 469 + i32.const 2 + call $~lib/builtins/abort unreachable end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 213 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Uint8Array#reverse (; 236 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $2 - local.get $0 - i32.load - local.set $3 + (local $5 i32) local.get $0 i32.load offset=4 local.set $4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $1 loop $repeat|0 - local.get $1 local.get $2 + local.get $1 i32.lt_s if - i32.const 3 - global.set $~lib/argc - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add + local.get $2 local.get $4 i32.add - f32.load offset=8 - local.get $1 - local.get $0 - i32.const 110 - call_indirect (type $FUNCSIG$vfii) + local.tee $3 + i32.load8_u + local.set $5 + local.get $3 local.get $1 + local.get $4 + i32.add + local.tee $3 + i32.load8_u + i32.store8 + local.get $3 + local.get $5 + i32.store8 + local.get $2 i32.const 1 i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub local.set $1 br $repeat|0 end end + local.get $0 ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 214 ;) (type $FUNCSIG$v) - (local $0 i32) + (func $~lib/typedarray/Uint8Array#subarray (; 237 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 - i32.const 0 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 - i32.const 1 - global.get $std/typedarray/forEachValues + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + local.get $0 + i32.load offset=8 + local.tee $2 + i32.const 8 + local.get $2 + i32.lt_s + select + local.set $3 + i32.const 12 + call $~lib/util/runtime/allocate + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 i32.load local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - call $~lib/typedarray/Float32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 i32.ne - if - i32.const 920 - i32.const 8 - i32.const 430 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 215 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) - (local $3 i32) - local.get $0 + drop local.get $1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $3 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - i32.load offset=8 - else - unreachable - end - f64.convert_i32_s - f64.ne - if - i32.const 752 - i32.const 8 - i32.const 425 - i32.const 4 - call $~lib/env/abort - unreachable - end - global.get $std/typedarray/forEachCallCount + local.get $0 + i32.store local.get $1 - i32.ne - if - i32.const 800 - i32.const 8 - i32.const 426 - i32.const 4 - call $~lib/env/abort - unreachable - end - global.get $std/typedarray/forEachSelf + local.get $4 + i32.const 4 local.get $2 - i32.ne - if - i32.const 848 - i32.const 8 - i32.const 427 - i32.const 4 - call $~lib/env/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 + i32.const 4 + local.get $2 + i32.lt_s + select + local.tee $0 i32.add - global.set $std/typedarray/forEachCallCount + i32.store offset=4 + local.get $1 + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.gt_s + select + local.get $0 + i32.sub + i32.store offset=8 + local.get $1 + i32.const 18 + call $~lib/util/runtime/register ) - (func $~lib/typedarray/Float64Array#forEach (; 216 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 238 ;) (type $FUNCSIG$v) + (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u + (local $3 i32) + global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Uint8Array#constructor local.set $2 - local.get $0 - i32.load + i32.const 9 + call $~lib/typedarray/Uint8Array#constructor local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 loop $repeat|0 - local.get $1 - local.get $2 - i32.lt_s - if - i32.const 3 - global.set $~lib/argc + block $break|0 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $2 + local.get $0 local.get $1 - i32.const 3 - i32.shl + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set local.get $3 - i32.add - local.get $4 - i32.add - f64.load offset=8 - local.get $1 local.get $0 - i32.const 111 - call_indirect (type $FUNCSIG$vdii) local.get $1 + local.get $0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $repeat|0 end end - ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 217 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - global.set $std/typedarray/forEachSelf - local.get $1 - i32.const 0 + local.get $2 + call $~lib/typedarray/Uint8Array#reverse + drop i32.const 0 - global.get $std/typedarray/forEachValues - i32.load + local.set $0 + loop $repeat|1 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + local.get $0 + call $~lib/typedarray/Uint8Array#__get + local.get $1 + i32.const 8 + local.get $0 + i32.sub + call $~lib/array/Array#__get + i32.const 255 + i32.and + i32.ne + if + i32.const 1272 + i32.const 24 + i32.const 461 + i32.const 4 + call $~lib/builtins/abort + unreachable + else + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|1 + end + unreachable + end + end + local.get $3 + call $~lib/typedarray/Uint8Array#subarray + call $~lib/typedarray/Uint8Array#reverse local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.load offset=8 - else + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 8 + i32.ne + if + i32.const 1360 + i32.const 24 + i32.const 466 + i32.const 2 + call $~lib/builtins/abort unreachable end - f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 1 + local.get $0 i32.const 1 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 4 - i32.add - i32.load offset=8 - else + call $~lib/typedarray/Uint8Array#__get + i32.const 7 + i32.ne + if + i32.const 1360 + i32.const 24 + i32.const 467 + i32.const 2 + call $~lib/builtins/abort unreachable end - f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - i32.const 2 - i32.const 2 - global.get $std/typedarray/forEachValues - i32.load - local.tee $0 - i32.load + local.get $0 i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 8 - i32.add - i32.load offset=8 - else + call $~lib/typedarray/Uint8Array#__get + i32.const 6 + i32.ne + if + i32.const 1360 + i32.const 24 + i32.const 468 + i32.const 2 + call $~lib/builtins/abort unreachable end - f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $1 - call $~lib/typedarray/Float64Array#forEach - global.get $std/typedarray/forEachCallCount + local.get $0 i32.const 3 + call $~lib/typedarray/Uint8Array#__get + i32.const 5 i32.ne if - i32.const 920 - i32.const 8 - i32.const 430 + i32.const 1360 + i32.const 24 + i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 218 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 239 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + i32.const 8 local.get $0 - i32.load + i32.load offset=8 + local.tee $2 + i32.const 8 + local.get $2 + i32.lt_s + select local.set $3 + i32.const 12 + call $~lib/util/runtime/allocate + local.set $1 local.get $0 i32.load offset=4 local.set $4 local.get $0 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $2 - loop $repeat|0 - block $break|0 - local.get $1 - local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - local.get $3 - i32.add - local.get $4 - i32.add - i32.load8_s offset=8 - local.set $5 - local.get $1 - local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.add - i32.load8_s offset=8 - i32.store8 offset=8 - local.get $2 - local.get $3 - i32.add - local.get $4 - i32.add - local.get $5 - i32.store8 offset=8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $repeat|0 - end - end + i32.load + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 + local.get $0 + i32.store + local.get $1 + local.get $4 + i32.const 4 + local.get $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.tee $0 + i32.add + i32.store offset=4 + local.get $1 + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.gt_s + select local.get $0 + i32.sub + i32.store offset=8 + local.get $1 + i32.const 19 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 219 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 240 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Uint8ClampedArray#constructor local.set $2 - i32.const 0 i32.const 9 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Uint8ClampedArray#constructor local.set $3 - i32.const 0 - i32.const 9 - call $~lib/typedarray/Int8Array#constructor - local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|0 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $2 local.get $0 + local.get $1 local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $3 local.get $0 + local.get $1 local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set local.get $0 i32.const 1 i32.add @@ -9926,51 +9774,34 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Int8Array#reverse + local.get $2 + call $~lib/typedarray/Uint8Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|1 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#__get + local.get $1 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 255 i32.and i32.ne if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -9982,397 +9813,216 @@ unreachable end end - local.get $4 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int8Array#subarray - call $~lib/typedarray/Int8Array#reverse + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#subarray + call $~lib/typedarray/Uint8Array#reverse local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 220 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 241 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 i32.load offset=8 i32.const 1 + i32.shr_u + i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - local.get $3 - i32.add + i32.const 1 + i32.shl local.get $4 i32.add - i32.load8_u offset=8 + local.tee $3 + i32.load16_s local.set $5 - local.get $1 - local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 local.get $3 - i32.add + local.get $1 + i32.const 1 + i32.shl local.get $4 i32.add - i32.load8_u offset=8 - i32.store8 offset=8 - local.get $2 + local.tee $3 + i32.load16_s + i32.store16 local.get $3 - i32.add - local.get $4 - i32.add local.get $5 - i32.store8 offset=8 - local.get $1 - i32.const 1 - i32.add - local.set $1 + i32.store16 local.get $2 i32.const 1 - i32.sub + i32.add local.set $2 - br $repeat|0 - end - end - local.get $0 - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 221 ;) (type $FUNCSIG$v) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - global.get $std/typedarray/testArrayReverseValues - local.set $2 - i32.const 0 - i32.const 9 - call $~lib/typedarray/Int8Array#constructor - local.set $3 - i32.const 0 - i32.const 9 - call $~lib/typedarray/Int8Array#constructor - local.set $4 - loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 - local.get $0 - local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 - local.get $0 - local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $0 + local.get $1 i32.const 1 - i32.add - local.set $0 - br $repeat|0 - end - end - local.get $3 - call $~lib/typedarray/Uint8Array#reverse - drop - i32.const 0 - local.set $0 - loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 - local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and - i32.const 8 - local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - i32.ne - if - i32.const 1056 - i32.const 8 - i32.const 461 - i32.const 4 - call $~lib/env/abort - unreachable - else - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $repeat|1 - end - unreachable + local.set $1 + br $repeat|0 end end - local.get $4 - i32.const 4 + local.get $0 + ) + (func $~lib/typedarray/Int16Array#subarray (; 242 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) i32.const 8 - call $~lib/typedarray/Int8Array#subarray - call $~lib/typedarray/Uint8Array#reverse - local.tee $0 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.tee $2 i32.const 8 + local.get $2 + i32.lt_s + select + local.set $3 + i32.const 12 + call $~lib/util/runtime/allocate + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load + local.tee $0 + local.get $1 + i32.load i32.ne - if - i32.const 1128 - i32.const 8 - i32.const 466 - i32.const 2 - call $~lib/env/abort - unreachable - end + drop + local.get $1 local.get $0 + i32.store + local.get $1 + i32.const 4 + local.get $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.tee $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and - i32.const 7 - i32.ne - if - i32.const 1128 - i32.const 8 - i32.const 467 - i32.const 2 - call $~lib/env/abort - unreachable - end + i32.shl + local.get $4 + i32.add + i32.store offset=4 + local.get $1 + local.get $3 local.get $0 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and - i32.const 6 - i32.ne - if - i32.const 1128 - i32.const 8 - i32.const 468 - i32.const 2 - call $~lib/env/abort - unreachable - end + local.get $3 local.get $0 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and - i32.const 5 - i32.ne - if - i32.const 1128 - i32.const 8 - i32.const 469 - i32.const 2 - call $~lib/env/abort - unreachable - end + i32.gt_s + select + local.get $0 + i32.sub + i32.const 1 + i32.shl + i32.store offset=8 + local.get $1 + i32.const 20 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 222 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 243 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Int16Array#constructor local.set $2 i32.const 9 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int16Array#constructor local.set $3 - i32.const 9 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 - local.get $0 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $4 local.get $0 + local.get $1 local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + local.get $3 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.add @@ -10380,51 +10030,36 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Uint8Array#reverse + local.get $2 + call $~lib/typedarray/Int16Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|1 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + local.get $0 + call $~lib/typedarray/Int16Array#__get + local.get $1 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 255 - i32.and + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s i32.ne if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -10436,82 +10071,69 @@ unreachable end end - local.get $4 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int8Array#subarray - call $~lib/typedarray/Uint8Array#reverse + local.get $3 + call $~lib/typedarray/Int16Array#subarray + call $~lib/typedarray/Int16Array#reverse local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int16Array#__get i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int16Array#__get i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int16Array#__get i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int16Array#__get i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 223 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 244 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 @@ -10520,181 +10142,141 @@ i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 i32.const 1 i32.shl - local.get $3 - i32.add local.get $4 i32.add - i32.load16_s offset=8 + local.tee $3 + i32.load16_u local.set $5 - local.get $1 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 - i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - i32.load16_s offset=8 - i32.store16 offset=8 - local.get $2 + local.get $3 + local.get $1 i32.const 1 i32.shl - local.get $3 - i32.add local.get $4 i32.add + local.tee $3 + i32.load16_u + i32.store16 + local.get $3 local.get $5 - i32.store16 offset=8 - local.get $1 + i32.store16 + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $~lib/typedarray/Int16Array#subarray (; 224 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 245 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) - i32.const 4 + (local $4 i32) + i32.const 8 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u - local.tee $1 - i32.const 4 - local.get $1 - i32.lt_s - select - local.set $2 - i32.const 8 - local.get $1 + local.tee $2 i32.const 8 - local.get $1 - i32.lt_s - select - local.tee $1 - local.get $2 - local.get $1 local.get $2 - i32.gt_s + i32.lt_s select local.set $3 i32.const 12 - call $~lib/allocator/arena/__memory_allocate - local.tee $1 + call $~lib/util/runtime/allocate + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 local.get $0 i32.load - i32.store + local.tee $0 + local.get $1 + i32.load + i32.ne + drop local.get $1 local.get $0 - i32.load offset=4 + i32.store + local.get $1 + i32.const 4 local.get $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.tee $0 i32.const 1 i32.shl + local.get $4 i32.add i32.store offset=4 local.get $1 local.get $3 - local.get $2 + local.get $0 + local.get $3 + local.get $0 + i32.gt_s + select + local.get $0 i32.sub i32.const 1 i32.shl i32.store offset=8 local.get $1 + i32.const 21 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 225 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 246 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Uint16Array#constructor local.set $2 i32.const 9 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.set $3 - i32.const 9 - call $~lib/typedarray/Int16Array#constructor - local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 - local.get $0 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 local.get $0 + local.get $1 local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $3 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.add @@ -10702,51 +10284,34 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Int16Array#reverse + local.get $2 + call $~lib/typedarray/Uint16Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|1 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + local.get $0 + call $~lib/typedarray/Uint16Array#__get + local.get $1 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i32.const 65535 i32.and i32.ne if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -10758,208 +10323,147 @@ unreachable end end - local.get $4 - call $~lib/typedarray/Int16Array#subarray - call $~lib/typedarray/Int16Array#reverse + local.get $3 + call $~lib/typedarray/Uint16Array#subarray + call $~lib/typedarray/Uint16Array#reverse local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 226 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 247 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - i32.const 1 + i32.const 2 i32.shl - local.get $3 - i32.add local.get $4 i32.add - i32.load16_u offset=8 + local.tee $3 + i32.load local.set $5 + local.get $3 local.get $1 - i32.const 1 + i32.const 2 i32.shl - local.get $3 - i32.add local.get $4 i32.add - local.get $2 - i32.const 1 - i32.shl + local.tee $3 + i32.load + i32.store local.get $3 - i32.add - local.get $4 - i32.add - i32.load16_u offset=8 - i32.store16 offset=8 + local.get $5 + i32.store local.get $2 i32.const 1 - i32.shl - local.get $3 - i32.add - local.get $4 i32.add - local.get $5 - i32.store16 offset=8 + local.set $2 local.get $1 i32.const 1 - i32.add - local.set $1 - local.get $2 - i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 227 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 248 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Int32Array#constructor local.set $2 i32.const 9 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Int32Array#constructor local.set $3 - i32.const 9 - call $~lib/typedarray/Int16Array#constructor - local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 - local.get $0 - local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 - local.get $0 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and - call $~lib/internal/typedarray/TypedArray#__set + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $3 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.add @@ -10967,51 +10471,32 @@ br $repeat|0 end end - local.get $3 - call $~lib/typedarray/Uint16Array#reverse + local.get $2 + call $~lib/typedarray/Int32Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|1 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + local.get $0 + call $~lib/typedarray/Int32Array#__get + local.get $1 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $2 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end - i32.const 65535 - i32.and + call $~lib/array/Array#__get i32.ne if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -11023,204 +10508,156 @@ unreachable end end - local.get $4 - call $~lib/typedarray/Int16Array#subarray - call $~lib/typedarray/Uint16Array#reverse + local.get $3 + i32.const 4 + i32.const 8 + call $~lib/typedarray/Int32Array#subarray + call $~lib/typedarray/Int32Array#reverse local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Int32Array#__get i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Int32Array#__get i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Int32Array#__get i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 228 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 249 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + i32.const 8 local.get $0 - i32.load + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 + i32.const 8 + local.get $2 + i32.lt_s + select local.set $3 + i32.const 12 + call $~lib/util/runtime/allocate + local.set $1 local.get $0 i32.load offset=4 local.set $4 local.get $0 - i32.load offset=8 + i32.load + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + local.get $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.tee $0 i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $2 - loop $repeat|0 - block $break|0 - local.get $1 - local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - i32.load offset=8 - local.set $5 - local.get $1 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - i32.load offset=8 - i32.store offset=8 - local.get $2 - i32.const 2 - i32.shl - local.get $3 - i32.add - local.get $4 - i32.add - local.get $5 - i32.store offset=8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $2 - i32.const 1 - i32.sub - local.set $2 - br $repeat|0 - end - end + i32.shl + local.get $4 + i32.add + i32.store offset=4 + local.get $1 + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.gt_s + select local.get $0 + i32.sub + i32.const 2 + i32.shl + i32.store offset=8 + local.get $1 + i32.const 23 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 229 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 250 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Uint32Array#constructor local.set $2 i32.const 9 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.set $3 - i32.const 9 - call $~lib/typedarray/Int32Array#constructor - local.set $4 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 - local.get $0 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set - local.get $4 local.get $0 + local.get $1 local.get $0 - local.get $2 - i32.load - local.tee $1 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $1 - i32.add - i32.load offset=8 - else - unreachable - end - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $3 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.add @@ -11228,47 +10665,32 @@ br $repeat|0 end end - local.get $3 + local.get $2 call $~lib/typedarray/Int32Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $3 + block $break|1 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 8 - local.get $0 - i32.sub - local.tee $1 + i32.const 9 + i32.ge_s + br_if $break|1 local.get $2 - i32.load - local.tee $5 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $5 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $0 + call $~lib/typedarray/Uint32Array#__get + local.get $1 + i32.const 8 + local.get $0 + i32.sub + call $~lib/array/Array#__get i32.ne if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -11280,74 +10702,69 @@ unreachable end end - local.get $4 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int32Array#subarray + local.get $3 + call $~lib/typedarray/Uint32Array#subarray call $~lib/typedarray/Int32Array#reverse local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int64Array#reverse (; 230 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#reverse (; 251 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 @@ -11356,125 +10773,334 @@ i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 i32.const 3 i32.shl - local.get $3 - i32.add local.get $4 i32.add - i64.load offset=8 + local.tee $3 + i64.load local.set $5 + local.get $3 local.get $1 i32.const 3 i32.shl - local.get $3 - i32.add local.get $4 i32.add - local.get $2 - i32.const 3 - i32.shl + local.tee $3 + i64.load + i64.store local.get $3 - i32.add - local.get $4 - i32.add - i64.load offset=8 - i64.store offset=8 + local.get $5 + i64.store local.get $2 - i32.const 3 - i32.shl - local.get $3 - i32.add - local.get $4 + i32.const 1 i32.add - local.get $5 - i64.store offset=8 + local.set $2 local.get $1 i32.const 1 - i32.add + i32.sub local.set $1 + br $repeat|0 + end + end + local.get $0 + ) + (func $~lib/typedarray/Int64Array#subarray (; 252 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 + i32.const 8 + local.get $2 + i32.lt_s + select + local.set $3 + i32.const 12 + call $~lib/util/runtime/allocate + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + local.get $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.tee $0 + i32.const 3 + i32.shl + local.get $4 + i32.add + i32.store offset=4 + local.get $1 + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.gt_s + select + local.get $0 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + local.get $1 + i32.const 24 + call $~lib/util/runtime/register + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 253 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $std/typedarray/testArrayReverseValues + local.set $1 + i32.const 9 + call $~lib/typedarray/Int64Array#constructor + local.set $2 + i32.const 9 + call $~lib/typedarray/Int64Array#constructor + local.set $3 + loop $repeat|0 + block $break|0 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 local.get $2 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $3 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 i32.const 1 - i32.sub - local.set $2 + i32.add + local.set $0 br $repeat|0 end end + local.get $2 + call $~lib/typedarray/Int64Array#reverse + drop + i32.const 0 + local.set $0 + loop $repeat|1 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 + local.get $0 + call $~lib/typedarray/Int64Array#__get + local.get $1 + i32.const 8 + local.get $0 + i32.sub + call $~lib/array/Array#__get + i64.extend_i32_s + i64.ne + if + i32.const 1272 + i32.const 24 + i32.const 461 + i32.const 4 + call $~lib/builtins/abort + unreachable + else + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $repeat|1 + end + unreachable + end + end + local.get $3 + call $~lib/typedarray/Int64Array#subarray + call $~lib/typedarray/Int64Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 8 + i64.ne + if + i32.const 1360 + i32.const 24 + i32.const 466 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 7 + i64.ne + if + i32.const 1360 + i32.const 24 + i32.const 467 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 6 + i64.ne + if + i32.const 1360 + i32.const 24 + i32.const 468 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne + if + i32.const 1360 + i32.const 24 + i32.const 469 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Uint64Array#subarray (; 254 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + i32.const 8 + local.get $0 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $2 + i32.const 8 + local.get $2 + i32.lt_s + select + local.set $3 + i32.const 12 + call $~lib/util/runtime/allocate + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + local.get $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.tee $0 + i32.const 3 + i32.shl + local.get $4 + i32.add + i32.store offset=4 + local.get $1 + local.get $3 + local.get $0 + local.get $3 local.get $0 + i32.gt_s + select + local.get $0 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + local.get $1 + i32.const 25 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 231 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 255 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $3 + local.set $1 i32.const 9 - call $~lib/typedarray/Int64Array#constructor - local.set $4 + call $~lib/typedarray/Uint64Array#constructor + local.set $2 i32.const 9 - call $~lib/typedarray/Int64Array#constructor - local.set $5 + call $~lib/typedarray/Uint64Array#constructor + local.set $3 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|0 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $2 local.get $0 + local.get $1 local.get $0 - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $5 - local.get $1 - local.get $1 + call $~lib/typedarray/Uint64Array#__set local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i32.add @@ -11482,48 +11108,33 @@ br $repeat|0 end end - local.get $4 + local.get $2 call $~lib/typedarray/Int64Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get + local.get $1 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get i64.extend_i32_s i64.ne if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -11535,74 +11146,69 @@ unreachable end end - local.get $5 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Float64Array#subarray + local.get $3 + call $~lib/typedarray/Uint64Array#subarray call $~lib/typedarray/Int64Array#reverse local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 8 i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 7 i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 6 i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 5 i64.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 232 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 256 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f32) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 @@ -11611,125 +11217,139 @@ i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 i32.const 2 i32.shl - local.get $3 - i32.add local.get $4 i32.add - f32.load offset=8 + local.tee $3 + f32.load local.set $5 - local.get $1 - i32.const 2 - i32.shl local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 + local.get $1 i32.const 2 i32.shl - local.get $3 - i32.add local.get $4 i32.add - f32.load offset=8 - f32.store offset=8 - local.get $2 - i32.const 2 - i32.shl + local.tee $3 + f32.load + f32.store local.get $3 - i32.add - local.get $4 - i32.add local.get $5 - f32.store offset=8 - local.get $1 + f32.store + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 233 ;) (type $FUNCSIG$v) - (local $0 i32) + (func $~lib/typedarray/Float32Array#subarray (; 257 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) - global.get $std/typedarray/testArrayReverseValues + i32.const 8 + local.get $0 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $2 + i32.const 8 + local.get $2 + i32.lt_s + select local.set $3 - i32.const 9 - call $~lib/typedarray/Int32Array#constructor + i32.const 12 + call $~lib/util/runtime/allocate + local.set $1 + local.get $0 + i32.load offset=4 local.set $4 + local.get $0 + i32.load + local.tee $0 + local.get $1 + i32.load + i32.ne + drop + local.get $1 + local.get $0 + i32.store + local.get $1 + i32.const 4 + local.get $2 + i32.const 4 + local.get $2 + i32.lt_s + select + local.tee $0 + i32.const 2 + i32.shl + local.get $4 + i32.add + i32.store offset=4 + local.get $1 + local.get $3 + local.get $0 + local.get $3 + local.get $0 + i32.gt_s + select + local.get $0 + i32.sub + i32.const 2 + i32.shl + i32.store offset=8 + local.get $1 + i32.const 26 + call $~lib/util/runtime/register + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 258 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + global.get $std/typedarray/testArrayReverseValues + local.set $1 i32.const 9 - call $~lib/typedarray/Int32Array#constructor - local.set $5 + call $~lib/typedarray/Float32Array#constructor + local.set $2 + i32.const 9 + call $~lib/typedarray/Float32Array#constructor + local.set $3 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $2 local.get $0 - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end - f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $5 - local.get $1 - local.get $1 - local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $1 + local.get $0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $3 + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 i32.add @@ -11737,48 +11357,33 @@ br $repeat|0 end end - local.get $4 + local.get $2 call $~lib/typedarray/Float32Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get + local.get $1 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get f32.convert_i32_s f32.ne if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -11790,74 +11395,69 @@ unreachable end end - local.get $5 - i32.const 4 - i32.const 8 - call $~lib/typedarray/Int32Array#subarray + local.get $3 + call $~lib/typedarray/Float32Array#subarray call $~lib/typedarray/Float32Array#reverse local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 8 f32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 7 f32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 6 f32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 5 f32.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 234 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#reverse (; 259 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 f64) local.get $0 - i32.load - local.set $3 - local.get $0 i32.load offset=4 local.set $4 local.get $0 @@ -11866,125 +11466,78 @@ i32.shr_u i32.const 1 i32.sub - local.set $2 + local.set $1 loop $repeat|0 - block $break|0 - local.get $1 + local.get $2 + local.get $1 + i32.lt_s + if local.get $2 - i32.ge_s - br_if $break|0 - local.get $1 i32.const 3 i32.shl - local.get $3 - i32.add local.get $4 i32.add - f64.load offset=8 + local.tee $3 + f64.load local.set $5 - local.get $1 - i32.const 3 - i32.shl local.get $3 - i32.add - local.get $4 - i32.add - local.get $2 + local.get $1 i32.const 3 i32.shl - local.get $3 - i32.add local.get $4 i32.add - f64.load offset=8 - f64.store offset=8 - local.get $2 - i32.const 3 - i32.shl + local.tee $3 + f64.load + f64.store local.get $3 - i32.add - local.get $4 - i32.add local.get $5 - f64.store offset=8 - local.get $1 + f64.store + local.get $2 i32.const 1 i32.add - local.set $1 - local.get $2 + local.set $2 + local.get $1 i32.const 1 i32.sub - local.set $2 + local.set $1 br $repeat|0 end end local.get $0 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 235 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 260 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) global.get $std/typedarray/testArrayReverseValues - local.set $3 + local.set $1 i32.const 9 - call $~lib/typedarray/Int64Array#constructor - local.set $4 + call $~lib/typedarray/Float64Array#constructor + local.set $2 i32.const 9 - call $~lib/typedarray/Int64Array#constructor - local.set $5 + call $~lib/typedarray/Float64Array#constructor + local.set $3 loop $repeat|0 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|0 local.get $0 + i32.const 9 + i32.ge_s + br_if $break|0 + local.get $2 local.get $0 - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end - f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set - local.get $5 - local.get $1 local.get $1 + local.get $0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $0 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + local.get $0 + local.get $1 + local.get $0 + call $~lib/array/Array#__get f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 i32.add @@ -11992,48 +11545,33 @@ br $repeat|0 end end - local.get $4 + local.get $2 call $~lib/typedarray/Float64Array#reverse drop i32.const 0 local.set $0 loop $repeat|1 - local.get $0 - i32.const 9 - i32.lt_s - if - local.get $4 + block $break|1 + local.get $0 + i32.const 9 + i32.ge_s + br_if $break|1 + local.get $2 local.get $0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get + local.get $1 i32.const 8 local.get $0 i32.sub - local.tee $1 - local.get $3 - i32.load - local.tee $2 - i32.load - i32.const 2 - i32.shr_u - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.shl - local.get $2 - i32.add - i32.load offset=8 - else - unreachable - end + call $~lib/array/Array#__get f64.convert_i32_s f64.ne if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable else local.get $0 @@ -12045,68 +11583,68 @@ unreachable end end - local.get $5 + local.get $3 i32.const 4 i32.const 8 call $~lib/typedarray/Float64Array#subarray call $~lib/typedarray/Float64Array#reverse local.tee $0 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 8 f64.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 7 f64.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 6 f64.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 5 f64.ne if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start:std/typedarray (; 236 ;) (type $FUNCSIG$v) + (func $start:std/typedarray (; 261 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) - i32.const 1224 + i32.const 1696 global.set $~lib/allocator/arena/startOffset global.get $~lib/allocator/arena/startOffset global.set $~lib/allocator/arena/offset @@ -12120,15 +11658,15 @@ global.get $std/typedarray/arr i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr i32.load offset=8 i32.const 2 @@ -12137,20 +11675,24 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub if i32.const 0 - i32.const 8 + i32.const 24 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -12159,49 +11701,49 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 98 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -12217,22 +11759,26 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -12241,60 +11787,60 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor global.set $std/typedarray/af64 global.get $std/typedarray/af64 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 2 f64.const 7 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 3 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 4 f64.const 5 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 5 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 6 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 7 f64.const 8 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 2 i32.const 6 @@ -12308,22 +11854,26 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/af64 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 16 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/af64 @@ -12332,16 +11882,18 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 global.set $~lib/argc global.get $std/typedarray/af64 local.set $1 + i32.const 0 + local.set $0 block $1of1 block $0of1 block $outOfRange @@ -12356,50 +11908,45 @@ local.get $1 local.get $0 call $~lib/typedarray/Float64Array#sort - block (result i32) - block (result i32) - global.get $std/typedarray/af64 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - f64.const 4 - f64.eq - local.tee $0 - if - global.get $std/typedarray/af64 - i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - f64.const 5 - f64.eq - local.set $0 - end - local.get $0 - end - if - global.get $std/typedarray/af64 - i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - f64.const 6 - f64.eq - local.set $0 - end - local.get $0 + global.get $std/typedarray/af64 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.eq + if (result i32) + global.get $std/typedarray/af64 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.eq + else + i32.const 0 + end + if (result i32) + global.get $std/typedarray/af64 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 6 + f64.eq + else + i32.const 0 end if (result i32) global.get $std/typedarray/af64 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -12419,104 +11966,104 @@ call $~lib/typedarray/Uint8ClampedArray#__set global.get $std/typedarray/clampedArr i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get if i32.const 0 - i32.const 8 + i32.const 24 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/clampedArr i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/clampedArr i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 255 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 0 i32.const 5 call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/arr8 global.get $std/typedarray/arr8 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 3 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 1 i32.const 1 i32.const 3 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 192 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 248 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/typedarray/arr8 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 216 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 320 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -12525,33 +12072,40 @@ i32.const -3 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 240 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 344 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/typedarray/arr8 i32.const 2 i32.const -2 - call $~lib/typedarray/Int8Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 264 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 368 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -12560,15 +12114,19 @@ i32.const 0 call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/arr8 - i32.const 288 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 392 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -12576,34 +12134,37 @@ i32.const 4 call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/sub8 - i32.const 1 - global.set $~lib/argc global.get $std/typedarray/sub8 i32.const 0 i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int8Array#fill global.get $std/typedarray/sub8 i32.load offset=8 i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 @@ -12612,34 +12173,42 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 - i32.const 312 + i32.const 3 + i32.const 0 + i32.const 28 + i32.const 416 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 - i32.const 336 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 440 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 5 @@ -12648,56 +12217,63 @@ global.get $std/typedarray/arr32 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 3 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 1 i32.const 1 i32.const 3 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 376 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 464 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 1 - global.set $~lib/argc global.get $std/typedarray/arr32 i32.const 0 i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 416 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 504 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -12706,33 +12282,40 @@ i32.const -3 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 456 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 544 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 2 - global.set $~lib/argc global.get $std/typedarray/arr32 i32.const 2 i32.const -2 - call $~lib/typedarray/Int32Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 496 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 584 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -12741,15 +12324,19 @@ i32.const 0 call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/arr32 - i32.const 536 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 624 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -12757,12 +12344,11 @@ i32.const 4 call $~lib/typedarray/Int32Array#subarray global.set $std/typedarray/sub32 - i32.const 1 - global.set $~lib/argc global.get $std/typedarray/sub32 i32.const 0 i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline + i32.const 2147483647 + call $~lib/typedarray/Int32Array#fill global.get $std/typedarray/sub32 i32.load offset=8 i32.const 2 @@ -12771,22 +12357,26 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 @@ -12795,67 +12385,74 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 - i32.const 576 + i32.const 3 + i32.const 2 + i32.const 29 + i32.const 664 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 - i32.const 616 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 696 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - i32.const 134217727 - call $~lib/typedarray/Int64Array#constructor + i32.const 134217726 + call $~lib/typedarray/Float64Array#constructor drop - i32.const 0 i32.const 6 call $~lib/typedarray/Int8Array#constructor global.set $std/typedarray/multisubarr global.get $std/typedarray/multisubarr i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 3 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 5 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 1 i32.const 6 @@ -12863,17 +12460,15 @@ global.set $std/typedarray/multisubarr1 global.get $std/typedarray/multisubarr1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int8Array#__get i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -12882,22 +12477,26 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 1 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -12906,10 +12505,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -12919,17 +12518,15 @@ global.set $std/typedarray/multisubarr2 global.get $std/typedarray/multisubarr2 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int8Array#__get i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -12938,22 +12535,26 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 2 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -12962,10 +12563,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -12975,17 +12576,15 @@ global.set $std/typedarray/multisubarr3 global.get $std/typedarray/multisubarr3 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 @@ -12994,22 +12593,26 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 + local.tee $0 i32.load offset=4 + local.get $0 + i32.load + i32.sub i32.const 3 i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 @@ -13018,10 +12621,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> @@ -13107,16 +12710,187 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> call $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> call $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> call $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 237 ;) (type $FUNCSIG$v) - call $start:std/typedarray + (func $~lib/runtime/runtime.instanceof (; 262 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.const 16 + i32.sub + i32.load + local.tee $0 + if (result i32) + local.get $0 + i32.const 1448 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $0 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $0 + i32.const 3 + i32.shl + i32.const 1448 + i32.add + i32.load offset=4 + local.tee $0 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 263 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + i32.const 1448 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $0 + i32.const 3 + i32.shl + i32.const 1448 + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 265 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 266 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArray (; 267 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 + local.tee $2 + if (result i32) + local.get $2 + i32.const 1448 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $2 + i32.const 3 + i32.shl + i32.const 1448 + i32.add + i32.load + end + local.tee $0 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $4 + local.get $1 + if (result i32) + local.get $1 + i32.const 16 + i32.sub + i32.load offset=4 + else + i32.const 0 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + i32.const 0 + end + local.set $3 + local.get $2 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.tee $2 + i32.load + drop + local.get $2 + local.get $1 + i32.store + local.get $2 + local.get $1 + i32.store offset=4 + local.get $2 + local.get $3 + i32.store offset=8 + local.get $2 + local.get $3 + local.get $4 + i32.shr_u + i32.store offset=12 + local.get $0 + i32.const 1024 + i32.and + if + local.get $1 + local.get $3 + i32.add + local.set $0 + loop $continue|0 + local.get $1 + local.get $0 + i32.lt_u + if + local.get $1 + i32.load + drop + local.get $1 + i32.const 4 + i32.add + local.set $1 + br $continue|0 + end + end + end + local.get $2 + ) + (func $~lib/runtime/runtime.retain (; 268 ;) (type $FUNCSIG$vi) (param $0 i32) + nop ) - (func $null (; 238 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.collect (; 269 ;) (type $FUNCSIG$v) nop ) + (func $start (; 270 ;) (type $FUNCSIG$v) + call $start:std/typedarray + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 30 + call $~lib/util/runtime/register + global.set $~lib/runtime/ROOT + ) ) diff --git a/tests/compiler/std/typedarray.ts b/tests/compiler/std/typedarray.ts index 743198c183..7e37eb4d19 100644 --- a/tests/compiler/std/typedarray.ts +++ b/tests/compiler/std/typedarray.ts @@ -1,3 +1,5 @@ +import "collector/dummy"; + assert(Int8Array.BYTES_PER_ELEMENT == 1); assert(Uint8Array.BYTES_PER_ELEMENT == 1); assert(Uint8ClampedArray.BYTES_PER_ELEMENT == 1); @@ -26,8 +28,6 @@ function isInt32ArrayEqual(a: Int32Array, b: Array): bool { return true; } -import "allocator/arena"; - function testInstantiate(len: i32): void { var i8a = new Int8Array(len); @@ -193,9 +193,9 @@ assert(sub32.byteLength == 3 * sizeof()); assert(isInt32ArrayEqual(sub32, [0, 0, 0])); assert(isInt32ArrayEqual(arr32, [1, 0, 0, 0, 2])); -import { MAX_BLENGTH } from "internal/arraybuffer"; +import { MAX_BYTELENGTH } from "util/runtime"; -const MAX_F64LENGTH = MAX_BLENGTH >> alignof(); +const MAX_F64LENGTH = MAX_BYTELENGTH >> alignof(); new Float64Array(MAX_F64LENGTH); // 1GB // new Float64Array(MAX_F64 + 1); // throws diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index fe461b5379..be12393a62 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -1,15 +1,16 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) - (type $FUNCSIG$v (func)) (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$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) - (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viid (func (param i32 i32 f64))) (type $FUNCSIG$idd (func (param f64 f64) (result i32))) (type $FUNCSIG$dii (func (param i32 i32) (result f64))) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) + (type $FUNCSIG$v (func)) (type $FUNCSIG$viij (func (param i32 i32 i64))) (type $FUNCSIG$jjjii (func (param i64 i64 i32 i32) (result i64))) (type $FUNCSIG$jiij (func (param i32 i32 i64) (result i64))) @@ -27,58 +28,48 @@ (type $FUNCSIG$ifii (func (param f32 i32 i32) (result i32))) (type $FUNCSIG$idii (func (param f64 i32 i32) (result i32))) (type $FUNCSIG$fff (func (param f32 f32) (result f32))) + (type $FUNCSIG$if (func (param f32) (result i32))) (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) - (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$id (func (param f64) (result i32))) (type $FUNCSIG$vjii (func (param i64 i32 i32))) (type $FUNCSIG$vfii (func (param f32 i32 i32))) (type $FUNCSIG$vdii (func (param f64 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\11\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 48) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 112) "\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") - (data (i32.const 176) "\05\00\00\00\00\00\00\00\01\01\01\04\05\00\00\00") - (data (i32.const 192) "\b0\00\00\00\05\00\00\00") - (data (i32.const 200) "\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 216) "\c8\00\00\00\05\00\00\00") - (data (i32.const 224) "\05\00\00\00\00\00\00\00\01\01\00\00\00\00\00\00") - (data (i32.const 240) "\e0\00\00\00\05\00\00\00") - (data (i32.const 248) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 264) "\f8\00\00\00\05\00\00\00") - (data (i32.const 272) "\05\00\00\00\00\00\00\00\01\01\00\02\02\00\00\00") - (data (i32.const 288) "\10\01\00\00\05\00\00\00") - (data (i32.const 296) "\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 312) "(\01\00\00\03\00\00\00") - (data (i32.const 320) "\05\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 336) "@\01\00\00\05\00\00\00") - (data (i32.const 344) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00\00\00\00\00") - (data (i32.const 376) "X\01\00\00\05\00\00\00") - (data (i32.const 384) "\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 416) "\80\01\00\00\05\00\00\00") - (data (i32.const 424) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 456) "\a8\01\00\00\05\00\00\00") - (data (i32.const 464) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 496) "\d0\01\00\00\05\00\00\00") - (data (i32.const 504) "\14\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 536) "\f8\01\00\00\05\00\00\00") - (data (i32.const 544) "\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 576) " \02\00\00\03\00\00\00") - (data (i32.const 584) "\14\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00") - (data (i32.const 616) "H\02\00\00\05\00\00\00") - (data (i32.const 624) "\0f\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 664) "\14\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 712) "\0c\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 744) "\c8\02\00\00\03\00\00\00") - (data (i32.const 752) "\16\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 800) "\16\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 848) "\1f\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 920) "\1b\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 984) "$\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 1048) "\d8\03\00\00\t\00\00\00") - (data (i32.const 1056) "!\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") - (data (i32.const 1128) "+\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 8) "\10\00\00\00\"\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 64) "\10\00\00\00&\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 120) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00") + (data (i32.const 176) "\10\00\00\00$\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 232) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\01\04\05") + (data (i32.const 256) "\10\00\00\00\1a\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 304) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 328) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\00\00") + (data (i32.const 352) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 376) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\01\00\02\02") + (data (i32.const 400) "\0f\00\00\00\03\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 424) "\0f\00\00\00\05\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02") + (data (i32.const 448) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\01\00\00\00\04\00\00\00\05\00\00\00") + (data (i32.const 488) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 528) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 568) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 608) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\01\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00") + (data (i32.const 648) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 680) "\0f\00\00\00\14\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00") + (data (i32.const 720) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 768) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00f\00a\00i\00l\00 \00r\00e\00s\00u\00l\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 824) "\0f\00\00\00\0c\00\00\00\00\00\00\00\00\00\00\00\n\00\00\00\0c\00\00\00\0e\00\00\00") + (data (i32.const 856) "\1d\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00H\03\00\00H\03\00\00\0c\00\00\00\03\00\00\00") + (data (i32.const 888) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 952) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00i\00n\00d\00e\00x\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1016) "\10\00\00\00>\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00s\00e\00l\00f\00 \00p\00a\00r\00a\00m\00e\00t\00e\00r\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1096) "\10\00\00\006\00\00\00\00\00\00\00\00\00\00\00f\00o\00r\00E\00a\00c\00h\00 \00c\00a\00l\00l\00 \00c\00o\00u\00n\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1168) "\0f\00\00\00$\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\03\00\00\00\04\00\00\00\05\00\00\00\06\00\00\00\07\00\00\00\08\00\00\00\t\00\00\00") + (data (i32.const 1224) "\1d\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00\a0\04\00\00\a0\04\00\00$\00\00\00\t\00\00\00") + (data (i32.const 1256) "\10\00\00\00B\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00v\00a\00l\00u\00e\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1344) "\10\00\00\00V\00\00\00\00\00\00\00\00\00\00\00T\00y\00p\00e\00d\00A\00r\00r\00a\00y\00 \00r\00e\00v\00e\00r\00s\00e\00 \00w\00i\00t\00h\00 \00b\00y\00t\00e\00O\00f\00f\00s\00e\00t\00 \00m\00i\00s\00m\00a\00t\00c\00h\00") + (data (i32.const 1448) "\1e\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\08\00\00\00\0e\00\00\00\19\00\00\00\0e\00\00\00I\00\00\00\0e\00\00\00\08\00\00\00\00\00\00\00") (table $0 112 funcref) - (elem (i32.const 0) $null $~lib/internal/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 0) $null $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8ClampedArray.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -90,8 +81,12 @@ (global $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) (global $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32 (i32.const 4)) (global $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32 (i32.const 8)) + (global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16)) + (global $~lib/util/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/util/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)) (global $~lib/argc (mut i32) (i32.const 0)) @@ -101,36 +96,34 @@ (global $std/typedarray/sub8 (mut i32) (i32.const 0)) (global $std/typedarray/arr32 (mut i32) (i32.const 0)) (global $std/typedarray/sub32 (mut i32) (i32.const 0)) - (global $std/typedarray/MAX_F64LENGTH i32 (i32.const 134217727)) + (global $std/typedarray/MAX_F64LENGTH i32 (i32.const 134217726)) (global $std/typedarray/multisubarr (mut i32) (i32.const 0)) (global $std/typedarray/multisubarr1 (mut i32) (i32.const 0)) (global $std/typedarray/multisubarr2 (mut i32) (i32.const 0)) (global $std/typedarray/multisubarr3 (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) (global $std/typedarray/forEachSelf (mut i32) (i32.const 0)) - (global $std/typedarray/forEachValues (mut i32) (i32.const 744)) - (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1048)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 1220)) + (global $std/typedarray/forEachValues (mut i32) (i32.const 872)) + (global $std/typedarray/testArrayReverseValues (mut i32) (i32.const 1240)) + (global $~lib/runtime/ROOT (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 1448)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 1696)) (export "memory" (memory $0)) - (export "table" (table $0)) + (export "$.instanceof" (func $~lib/runtime/runtime.instanceof)) + (export "$.flags" (func $~lib/runtime/runtime.flags)) + (export "$.newObject" (func $~lib/runtime/runtime.newObject)) + (export "$.newString" (func $~lib/runtime/runtime.newString)) + (export "$.newArrayBuffer" (func $~lib/runtime/runtime.newArrayBuffer)) + (export "$.newArray" (func $~lib/runtime/runtime.newArray)) + (export "$.retain" (func $~lib/runtime/runtime.retain)) + (export "$.release" (func $~lib/runtime/runtime.release)) + (export "$.collect" (func $~lib/runtime/runtime.collect)) (start $start) - (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/internal/arraybuffer/computeSize (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) i32.const 1 i32.const 32 local.get $0 - i32.const 8 + global.get $~lib/util/runtime/HEADER_SIZE i32.add i32.const 1 i32.sub @@ -138,7 +131,7 @@ i32.sub i32.shl ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__mem_allocate (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -217,838 +210,394 @@ global.set $~lib/allocator/arena/offset local.get $1 ) - (func $~lib/internal/arraybuffer/allocateUnsafe (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/allocator/arena/__mem_allocate + return + ) + (func $~lib/util/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) - (local $2 i32) local.get $0 - i32.const 1073741816 - i32.le_u - i32.eqz - if - i32.const 0 - i32.const 112 - i32.const 26 - i32.const 2 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.allocate|inlined.0 (result i32) - local.get $0 - call $~lib/internal/arraybuffer/computeSize - local.set $2 - local.get $2 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.0 - end + call $~lib/util/runtime/adjust + call $~lib/memory/memory.allocate local.set $1 local.get $1 - local.get $0 + global.get $~lib/util/runtime/HEADER_MAGIC i32.store local.get $1 - ) - (func $~lib/internal/memory/memset (; 5 ;) (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 + i32.store offset=4 local.get $1 - i32.store8 - local.get $0 - local.get $2 - i32.add - i32.const 4 - i32.sub + i32.const 0 + i32.store offset=8 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 + i32.store offset=12 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 + global.get $~lib/util/runtime/HEADER_SIZE 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/memory/memory.allocate (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) - local.get $0 - call $~lib/allocator/arena/__memory_allocate - return - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/memory/memory.fill (; 5 ;) (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.get $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.0 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 + (local $6 i64) + block $~lib/util/memory/memset|inlined.0 local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 i32.eqz if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 + local.get $1 + i32.store8 local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Int8Array#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (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 $1 - i32.const 1073741816 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 0 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.1 - local.get $3 - i32.const 8 + local.get $2 i32.add - local.set $4 - i32.const 0 - local.set $5 + i32.const 1 + i32.sub + local.get $1 + i32.store8 local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz + i32.const 2 + i32.le_u if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end local.get $0 - i32.const 0 - i32.store + i32.const 1 + i32.add + local.get $1 + i32.store8 local.get $0 - i32.const 0 - i32.store offset=4 + i32.const 2 + i32.add + local.get $1 + i32.store8 local.get $0 - i32.const 0 - i32.store offset=8 + local.get $2 + i32.add + i32.const 2 + i32.sub + local.get $1 + i32.store8 local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Uint8Array#constructor (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 - ) - (func $~lib/typedarray/Uint8ClampedArray#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/typedarray/Uint8Array#constructor - local.set $0 - local.get $0 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 12 ;) (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 $1 - i32.const 536870908 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.2 - local.get $3 - i32.const 8 + local.get $2 i32.add - local.set $4 - i32.const 0 - local.set $5 + i32.const 3 + i32.sub + local.get $1 + i32.store8 local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz + i32.const 6 + i32.le_u if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end local.get $0 - i32.const 0 - i32.store + 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 + br $~lib/util/memory/memset|inlined.0 + end i32.const 0 - i32.store offset=4 local.get $0 - i32.const 0 - i32.store offset=8 + i32.sub + i32.const 3 + i32.and + local.set $5 local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Int16Array#constructor (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate + local.get $5 + i32.add local.set $0 - end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 14 ;) (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 $1 - i32.const 536870908 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 1 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.3 - local.get $3 + local.get $2 + local.get $5 + 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 + br $~lib/util/memory/memset|inlined.0 + end + local.get $0 + i32.const 4 i32.add - local.set $4 - i32.const 0 - local.set $5 + local.get $4 + i32.store + local.get $0 + i32.const 8 + i32.add + local.get $4 + i32.store + local.get $0 local.get $2 - local.set $6 + i32.add + i32.const 12 + i32.sub local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) + i32.store local.get $0 - i32.eqz + 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 - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + br $~lib/util/memory/memset|inlined.0 end local.get $0 - i32.const 0 + i32.const 12 + i32.add + local.get $4 i32.store local.get $0 - i32.const 0 - i32.store offset=4 + i32.const 16 + i32.add + local.get $4 + i32.store local.get $0 - i32.const 0 - i32.store offset=8 + i32.const 20 + i32.add + local.get $4 + i32.store local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Uint16Array#constructor (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 - ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 16 ;) (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 $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.4 - local.get $3 - i32.const 8 + i32.const 24 i32.add - local.set $4 - i32.const 0 - local.set $5 + local.get $4 + i32.store + local.get $0 local.get $2 - local.set $6 + i32.add + i32.const 28 + i32.sub local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) + i32.store local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 - end + local.get $2 + i32.add + i32.const 24 + i32.sub + local.get $4 + i32.store local.get $0 - i32.const 0 + local.get $2 + i32.add + i32.const 20 + i32.sub + local.get $4 i32.store local.get $0 - i32.const 0 - i32.store offset=4 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.get $4 + i32.store + i32.const 24 local.get $0 - i32.const 0 - i32.store offset=8 + i32.const 4 + i32.and + i32.add + local.set $5 local.get $0 - end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 - local.get $0 - ) - (func $~lib/typedarray/Int32Array#constructor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.allocate + local.get $5 + i32.add local.set $0 + local.get $2 + local.get $5 + 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 $6 + block $break|0 + loop $continue|0 + local.get $2 + i32.const 32 + i32.ge_u + if + block + local.get $0 + local.get $6 + i64.store + local.get $0 + i32.const 8 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 16 + i32.add + local.get $6 + i64.store + local.get $0 + i32.const 24 + i32.add + local.get $6 + 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 end - local.get $0 - local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/collector/dummy/__ref_register (; 6 ;) (type $FUNCSIG$vi) (param $0 i32) + nop + ) + (func $~lib/util/runtime/register (; 7 ;) (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 $1 - i32.const 268435454 + local.get $0 + global.get $~lib/memory/HEAP_BASE i32.gt_u + i32.eqz if i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort + i32.const 136 + i32.const 129 + i32.const 4 + call $~lib/builtins/abort unreachable end - local.get $1 - i32.const 2 - i32.shl + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub local.set $2 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.5 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.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 + i32.load + global.get $~lib/util/runtime/HEADER_MAGIC + i32.eq + i32.eqz + if i32.const 0 - i32.store offset=8 - local.get $0 + i32.const 136 + i32.const 131 + i32.const 4 + call $~lib/builtins/abort + unreachable end - local.get $3 + local.get $2 + local.get $1 i32.store local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - local.get $2 - i32.store offset=8 + call $~lib/collector/dummy/__ref_register local.get $0 ) - (func $~lib/typedarray/Uint32Array#constructor (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - local.get $0 - i32.eqz + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $1 + global.get $~lib/util/runtime/MAX_BYTELENGTH + i32.gt_u if - i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + i32.const 0 + i32.const 80 + i32.const 54 + i32.const 43 + call $~lib/builtins/abort + unreachable end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor - local.set $0 - local.get $0 + call $~lib/util/runtime/allocate + local.set $2 + local.get $2 + i32.const 0 + local.get $1 + call $~lib/memory/memory.fill + local.get $2 + i32.const 15 + call $~lib/util/runtime/register ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) + (func $~lib/collector/dummy/__ref_link (; 9 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/collector/dummy/__ref_unlink (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + nop + ) + (func $~lib/arraybuffer/ArrayBufferView#constructor (; 11 ;) (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.get $1 - i32.const 134217727 + global.get $~lib/util/runtime/MAX_BYTELENGTH + local.get $2 + i32.shr_u i32.gt_u if i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort + i32.const 80 + i32.const 12 + i32.const 57 + call $~lib/builtins/abort unreachable end + i32.const 0 local.get $1 - i32.const 3 - i32.shl - local.set $2 local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe + i32.shl + local.tee $1 + call $~lib/arraybuffer/ArrayBuffer#constructor local.set $3 - block $~lib/memory/memory.fill|inlined.6 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end block (result i32) local.get $0 i32.eqz if i32.const 12 - call $~lib/memory/memory.allocate + call $~lib/util/runtime/allocate + i32.const 14 + call $~lib/util/runtime/register local.set $0 end local.get $0 @@ -1062,274 +611,284 @@ i32.store offset=8 local.get $0 end + local.tee $4 local.get $3 + local.tee $5 + local.get $4 + i32.load + local.tee $6 + i32.ne + if (result i32) + local.get $6 + if + local.get $6 + local.get $4 + call $~lib/collector/dummy/__ref_unlink + end + local.get $5 + local.get $4 + call $~lib/collector/dummy/__ref_link + local.get $5 + else + local.get $5 + end i32.store local.get $0 - i32.const 0 + local.get $3 i32.store offset=4 local.get $0 - local.get $2 + local.get $1 i32.store offset=8 local.get $0 ) - (func $~lib/typedarray/Int64Array#constructor (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#constructor (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/util/runtime/allocate + i32.const 17 + call $~lib/util/runtime/register end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 22 ;) (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 $1 - i32.const 134217727 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable + (func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + ) + (func $~lib/arraybuffer/ArrayBufferView#get:byteLength (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=8 + ) + (func $~lib/typedarray/Int8Array#get:length (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + ) + (func $~lib/typedarray/Uint8Array#constructor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 18 + call $~lib/util/runtime/register end local.get $1 - i32.const 3 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.7 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.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 - i32.const 0 - i32.store offset=8 + i32.const 0 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + local.get $0 + ) + (func $~lib/typedarray/Uint8Array#get:length (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + ) + (func $~lib/typedarray/Uint8ClampedArray#constructor (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) local.get $0 + else + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 19 + call $~lib/util/runtime/register end - local.get $3 - i32.store - local.get $0 + local.get $1 i32.const 0 - i32.store offset=4 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 local.get $0 - local.get $2 - i32.store offset=8 + ) + (func $~lib/typedarray/Uint8ClampedArray#get:length (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength ) - (func $~lib/typedarray/Uint64Array#constructor (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#constructor (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/util/runtime/allocate + i32.const 20 + call $~lib/util/runtime/register end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 24 ;) (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) + (func $~lib/typedarray/Int16Array#get:length (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + i32.const 1 + i32.shr_u + ) + (func $~lib/typedarray/Uint16Array#constructor (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 21 + call $~lib/util/runtime/register + end local.get $1 - i32.const 268435454 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable + i32.const 1 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + local.get $0 + ) + (func $~lib/typedarray/Uint16Array#get:length (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + i32.const 1 + i32.shr_u + ) + (func $~lib/typedarray/Int32Array#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 22 + call $~lib/util/runtime/register end local.get $1 i32.const 2 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.8 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.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 - i32.const 0 - i32.store offset=8 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + local.get $0 + ) + (func $~lib/typedarray/Int32Array#get:length (; 25 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + i32.const 2 + i32.shr_u + ) + (func $~lib/typedarray/Uint32Array#constructor (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) local.get $0 + else + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 23 + call $~lib/util/runtime/register end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 local.get $0 - local.get $2 - i32.store offset=8 + ) + (func $~lib/typedarray/Uint32Array#get:length (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + i32.const 2 + i32.shr_u ) - (func $~lib/typedarray/Float32Array#constructor (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#constructor (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/util/runtime/allocate + i32.const 24 + call $~lib/util/runtime/register end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 26 ;) (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 $1 - i32.const 134217727 - i32.gt_u - if - i32.const 0 - i32.const 48 - i32.const 23 - i32.const 34 - call $~lib/env/abort - unreachable + (func $~lib/typedarray/Int64Array#get:length (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + i32.const 3 + i32.shr_u + ) + (func $~lib/typedarray/Uint64Array#constructor (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) + local.get $0 + else + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 25 + call $~lib/util/runtime/register end local.get $1 i32.const 3 - i32.shl - local.set $2 - local.get $2 - call $~lib/internal/arraybuffer/allocateUnsafe - local.set $3 - block $~lib/memory/memory.fill|inlined.9 - local.get $3 - i32.const 8 - i32.add - local.set $4 - i32.const 0 - local.set $5 - local.get $2 - local.set $6 - local.get $4 - local.get $5 - local.get $6 - call $~lib/internal/memory/memset - end - block (result i32) - local.get $0 - i32.eqz - if - i32.const 12 - call $~lib/memory/memory.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 - i32.const 0 - i32.store offset=8 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 + local.get $0 + ) + (func $~lib/typedarray/Uint64Array#get:length (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + i32.const 3 + i32.shr_u + ) + (func $~lib/typedarray/Float32Array#constructor (; 32 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + if (result i32) local.get $0 + else + i32.const 12 + call $~lib/util/runtime/allocate + i32.const 26 + call $~lib/util/runtime/register end - local.get $3 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 + local.get $1 + i32.const 2 + call $~lib/arraybuffer/ArrayBufferView#constructor + local.set $0 local.get $0 - local.get $2 - i32.store offset=8 + ) + (func $~lib/typedarray/Float32Array#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + i32.const 2 + i32.shr_u ) - (func $~lib/typedarray/Float64Array#constructor (; 27 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#constructor (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.eqz - if + if (result i32) + local.get $0 + else i32.const 12 - call $~lib/memory/memory.allocate - local.set $0 + call $~lib/util/runtime/allocate + i32.const 27 + call $~lib/util/runtime/register end - local.get $0 local.get $1 - call $~lib/internal/typedarray/TypedArray#constructor + i32.const 3 + call $~lib/arraybuffer/ArrayBufferView#constructor local.set $0 local.get $0 ) - (func $std/typedarray/testInstantiate (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/typedarray/Float64Array#get:length (; 35 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength + i32.const 3 + i32.shr_u + ) + (func $std/typedarray/testInstantiate (; 36 ;) (type $FUNCSIG$vi) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1341,26 +900,25 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) i32.const 0 local.get $0 call $~lib/typedarray/Int8Array#constructor local.set $1 local.get $1 - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 34 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.mul @@ -1368,50 +926,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 35 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $1 + call $~lib/typedarray/Int8Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 36 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Uint8Array#constructor - local.set $3 - local.get $3 - i32.load offset=4 + local.set $2 + local.get $2 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $3 - i32.load offset=8 + local.get $2 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32.mul @@ -1419,50 +971,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 40 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $3 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $2 + call $~lib/typedarray/Uint8Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $4 - local.get $4 - i32.load offset=4 + local.set $3 + local.get $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 44 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $4 - i32.load offset=8 + local.get $3 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32.mul @@ -1470,50 +1016,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 45 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $4 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 46 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Int16Array#constructor - local.set $5 - local.get $5 - i32.load offset=4 + local.set $4 + local.get $4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 49 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $5 - i32.load offset=8 + local.get $4 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Int16Array.BYTES_PER_ELEMENT i32.mul @@ -1521,50 +1061,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 50 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $5 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $4 + call $~lib/typedarray/Int16Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Uint16Array#constructor - local.set $6 - local.get $6 - i32.load offset=4 + local.set $5 + local.get $5 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 54 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $6 - i32.load offset=8 + local.get $5 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint16Array.BYTES_PER_ELEMENT i32.mul @@ -1572,50 +1106,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 55 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $6 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Uint16Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 56 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Int32Array#constructor - local.set $7 - local.get $7 - i32.load offset=4 + local.set $6 + local.get $6 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 59 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $7 - i32.load offset=8 + local.get $6 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Int32Array.BYTES_PER_ELEMENT i32.mul @@ -1623,50 +1151,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $7 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $6 + call $~lib/typedarray/Int32Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 61 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Uint32Array#constructor - local.set $8 - local.get $8 - i32.load offset=4 + local.set $7 + local.get $7 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $8 - i32.load offset=8 + local.get $7 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint32Array.BYTES_PER_ELEMENT i32.mul @@ -1674,50 +1196,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 65 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $8 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $7 + call $~lib/typedarray/Uint32Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 66 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Int64Array#constructor - local.set $9 - local.get $9 - i32.load offset=4 + local.set $8 + local.get $8 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 69 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $9 - i32.load offset=8 + local.get $8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Int64Array.BYTES_PER_ELEMENT i32.mul @@ -1725,50 +1241,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 70 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $9 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $8 + call $~lib/typedarray/Int64Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 71 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 - local.get $0 - call $~lib/typedarray/Uint64Array#constructor - local.set $10 - local.get $10 - i32.load offset=4 + local.get $0 + call $~lib/typedarray/Uint64Array#constructor + local.set $9 + local.get $9 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 74 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $10 - i32.load offset=8 + local.get $9 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT i32.mul @@ -1776,50 +1286,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 75 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $10 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $9 + call $~lib/typedarray/Uint64Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 76 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Float32Array#constructor - local.set $11 - local.get $11 - i32.load offset=4 + local.set $10 + local.get $10 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 79 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $11 - i32.load offset=8 + local.get $10 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT i32.mul @@ -1827,50 +1331,44 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 80 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $11 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $10 + call $~lib/typedarray/Float32Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 81 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 local.get $0 call $~lib/typedarray/Float64Array#constructor - local.set $12 - local.get $12 - i32.load offset=4 + local.set $11 + local.get $11 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 84 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - local.get $12 - i32.load offset=8 + local.get $11 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength local.get $0 global.get $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT i32.mul @@ -1878,37 +1376,27 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 85 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.0 (result i32) - local.get $12 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $11 + call $~lib/typedarray/Float64Array#get:length local.get $0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 86 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__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) + (func $~lib/typedarray/Int32Array#__set (; 37 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -1917,38 +1405,22 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 444 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store ) - (func $~lib/internal/typedarray/TypedArray#__get (; 30 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Int32Array#__get (; 38 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -1957,52 +1429,39 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 438 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $~lib/typedarray/Int32Array#subarray (; 31 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 39 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Int32Array#get:length local.set $6 local.get $4 i32.const 0 @@ -2030,12 +1489,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -2044,9 +1503,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -2061,42 +1520,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.1 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.1 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 2 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 2 i32.shl i32.store offset=8 local.get $7 + i32.const 22 + call $~lib/util/runtime/register ) - (func $~lib/internal/typedarray/TypedArray#__set (; 32 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) - (local $3 i32) - (local $4 i32) - (local $5 f64) - (local $6 i32) + (func $~lib/typedarray/Float64Array#__set (; 40 ;) (type $FUNCSIG$viid) (param $0 i32) (param $1 i32) (param $2 f64) local.get $1 local.get $0 i32.load offset=8 @@ -2105,55 +1581,40 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 854 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - f64.store offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + f64.store ) - (func $~lib/typedarray/Float64Array#subarray (; 33 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float64Array#subarray (; 41 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Float64Array#get:length local.set $6 local.get $4 i32.const 0 @@ -2181,12 +1642,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -2195,9 +1656,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -2212,138 +1673,126 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.2 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.2 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 3 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 3 i32.shl i32.store offset=8 local.get $7 + i32.const 27 + call $~lib/util/runtime/register ) - (func $~lib/internal/sort/insertionSort (; 34 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - (local $4 i32) + (func $~lib/util/sort/insertionSort (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 f64) (local $5 i32) - (local $6 i32) + (local $6 f64) (local $7 i32) - (local $8 f64) - (local $9 i32) - (local $10 f64) - (local $11 f64) block $break|0 i32.const 0 - local.set $4 + local.set $3 loop $repeat|0 - local.get $4 - local.get $2 + local.get $3 + local.get $1 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f64) - local.get $0 - local.set $5 - local.get $4 - local.set $6 - local.get $1 - local.set $7 - local.get $5 - local.get $6 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - f64.load offset=8 - end - local.set $8 - local.get $4 + local.get $0 + local.get $3 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + local.get $3 i32.const 1 i32.sub - local.set $7 + local.set $5 block $break|1 loop $continue|1 - local.get $7 + local.get $5 i32.const 0 i32.ge_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f64) - local.get $0 - local.set $6 - local.get $7 - local.set $5 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $10 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 block (result i32) i32.const 2 global.set $~lib/argc - local.get $8 - local.get $10 - local.get $3 + local.get $4 + local.get $6 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if local.get $0 - local.set $9 block (result i32) - local.get $7 - local.tee $5 + local.get $5 + local.tee $7 i32.const 1 i32.sub - local.set $7 - local.get $5 + local.set $5 + local.get $7 end i32.const 1 i32.add - local.set $5 - local.get $10 - local.set $11 - local.get $1 - local.set $6 - local.get $9 - local.get $5 i32.const 3 i32.shl i32.add local.get $6 - i32.add - local.get $11 - f64.store offset=8 + f64.store else br $break|1 end @@ -2352,110 +1801,85 @@ end end end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $0 - local.set $6 - local.get $7 - i32.const 1 - i32.add - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $6 - local.get $5 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $10 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store end - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 + local.set $3 br $repeat|0 unreachable end unreachable end ) - (func $~lib/allocator/arena/__memory_free (; 35 ;) (type $FUNCSIG$vi) (param $0 i32) + (func $~lib/allocator/arena/__mem_free (; 43 ;) (type $FUNCSIG$vi) (param $0 i32) nop ) - (func $~lib/internal/sort/weakHeapSort (; 36 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/memory/memory.free (; 44 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + call $~lib/allocator/arena/__mem_free + ) + (func $~lib/util/sort/weakHeapSort (; 45 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 f64) - (local $13 f64) - (local $14 f64) - (local $15 f64) - local.get $2 + (local $8 f64) + (local $9 f64) + (local $10 f64) + local.get $1 i32.const 31 i32.add i32.const 5 i32.shr_s i32.const 2 i32.shl + local.set $3 + local.get $3 + call $~lib/memory/memory.allocate local.set $4 - block $~lib/memory/memory.allocate|inlined.3 (result i32) - local.get $4 - local.set $5 - local.get $5 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.3 - end - local.set $6 - block $~lib/memory/memory.fill|inlined.10 - local.get $6 - local.set $5 - i32.const 0 - local.set $7 - local.get $4 - local.set $8 - local.get $5 - local.get $7 - local.get $8 - call $~lib/internal/memory/memset - end + local.get $4 + i32.const 0 + local.get $3 + call $~lib/memory/memory.fill block $break|0 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|0 - local.get $8 + local.get $5 i32.const 0 i32.gt_s i32.eqz br_if $break|0 block - local.get $8 - local.set $7 + local.get $5 + local.set $6 block $break|1 loop $continue|1 - local.get $7 + local.get $6 i32.const 1 i32.and + local.get $4 local.get $6 - local.get $7 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $7 + local.get $6 i32.const 1 i32.shr_s i32.const 31 @@ -2465,72 +1889,52 @@ i32.and i32.eq if - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $7 + local.set $6 br $continue|1 end end end - local.get $7 + local.get $6 i32.const 1 i32.shr_s - local.set $5 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result f64) - local.get $0 - local.set $9 - local.get $5 - local.set $10 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f64) - local.get $0 - local.set $11 - local.get $8 - local.set $10 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 + local.set $7 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $9 block (result i32) i32.const 2 global.set $~lib/argc - local.get $12 - local.get $13 - local.get $3 + local.get $8 + local.get $9 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $8 + local.get $4 + local.get $5 i32.const 5 i32.shr_s i32.const 2 @@ -2538,236 +1942,136 @@ i32.add i32.load i32.const 1 - local.get $8 + local.get $5 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.5 - local.get $0 - local.set $9 - local.get $8 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.6 - local.get $0 - local.set $11 - local.get $5 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $9 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $8 + f64.store + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|0 unreachable end unreachable end block $break|2 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.set $8 + local.set $5 loop $repeat|2 - local.get $8 + local.get $5 i32.const 2 i32.ge_s - i32.eqz - br_if $break|2 - block - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result f64) - local.get $0 - local.set $5 - i32.const 0 - local.set $7 - local.get $1 - local.set $9 - local.get $5 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/STORE|inlined.7 - local.get $0 - local.set $9 - i32.const 0 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f64) - local.get $0 - local.set $5 - local.get $8 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - local.get $1 - local.set $11 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.8 - local.get $0 - local.set $11 - local.get $8 - local.set $7 - local.get $13 - local.set $12 - local.get $1 - local.set $9 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f64.store offset=8 - end - i32.const 1 + i32.eqz + br_if $break|2 + block + local.get $0 + f64.load local.set $9 + local.get $0 + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + f64.store + local.get $0 + local.get $5 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + i32.const 1 + local.set $7 block $break|3 loop $continue|3 - local.get $9 + local.get $7 i32.const 1 i32.shl - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add i32.load - local.get $9 + local.get $7 i32.const 31 i32.and i32.shr_u i32.const 1 i32.and i32.add - local.tee $7 - local.get $8 + local.tee $6 + local.get $5 i32.lt_s if - local.get $7 - local.set $9 + local.get $6 + local.set $7 br $continue|3 end end end block $break|4 loop $continue|4 - local.get $9 + local.get $7 i32.const 0 i32.gt_s if block - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result f64) - local.get $0 - local.set $11 - i32.const 0 - local.set $10 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - f64.load offset=8 - end - local.set $13 - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f64) - local.get $0 - local.set $5 - local.get $9 - local.set $10 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 + local.get $0 + f64.load + local.set $9 + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $8 block (result i32) i32.const 2 global.set $~lib/argc - local.get $13 - local.get $12 - local.get $3 + local.get $9 + local.get $8 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 i32.shl i32.add - local.get $6 - local.get $9 + local.get $4 + local.get $7 i32.const 5 i32.shr_s i32.const 2 @@ -2775,309 +2079,140 @@ i32.add i32.load i32.const 1 - local.get $9 + local.get $7 i32.const 31 i32.and i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/STORE|inlined.9 - local.get $0 - local.set $11 - local.get $9 - local.set $10 - local.get $13 - local.set $14 - local.get $1 - local.set $5 - local.get $11 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $5 - i32.add - local.get $14 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.10 - local.get $0 - local.set $5 - i32.const 0 - local.set $10 - local.get $12 - local.set $14 - local.get $1 - local.set $11 - local.get $5 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $14 - f64.store offset=8 - end + local.get $0 + local.get $7 + i32.const 3 + i32.shl + i32.add + local.get $9 + f64.store + local.get $0 + local.get $8 + f64.store end - local.get $9 + local.get $7 i32.const 1 i32.shr_s - local.set $9 + local.set $7 end br $continue|4 end end end end - local.get $8 + local.get $5 i32.const 1 i32.sub - local.set $8 + local.set $5 br $repeat|2 unreachable end unreachable end - block $~lib/memory/memory.free|inlined.0 - local.get $6 - local.set $8 - local.get $8 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - end - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f64) - local.get $0 - local.set $8 - i32.const 1 - local.set $7 - local.get $1 - local.set $9 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $15 - block $~lib/internal/arraybuffer/STORE|inlined.11 - local.get $0 - local.set $9 - i32.const 1 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f64) - local.get $0 - local.set $8 - i32.const 0 - local.set $11 - local.get $1 - local.set $10 - local.get $8 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - local.set $13 - local.get $1 - local.set $10 - local.get $9 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - local.get $13 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.12 - local.get $0 - local.set $10 - i32.const 0 - local.set $7 - local.get $15 - local.set $13 - local.get $1 - local.set $9 - local.get $10 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $13 - f64.store offset=8 - end + local.get $4 + call $~lib/memory/memory.free + local.get $0 + f64.load offset=8 + local.set $10 + local.get $0 + local.get $0 + f64.load + f64.store offset=8 + local.get $0 + local.get $10 + f64.store ) - (func $~lib/typedarray/Float64Array#sort (; 37 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort (; 46 ;) (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 $6 f64) + (local $7 f64) (local $8 i32) (local $9 i32) - (local $10 f64) - (local $11 f64) - (local $12 f64) - (local $13 i32) - block $~lib/internal/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + (local $10 i32) + block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - local.get $2 - i32.load offset=4 + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Float64Array#get:length local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $5 - local.get $5 + local.get $4 i32.const 1 i32.le_s if - local.get $2 - br $~lib/internal/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $3 + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $2 - i32.load - local.set $6 - local.get $5 + local.get $3 + i32.load offset=4 + local.set $5 + local.get $4 i32.const 2 i32.eq if - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result f64) - local.get $6 - local.set $7 - i32.const 1 - local.set $8 - local.get $4 - local.set $9 - local.get $7 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - f64.load offset=8 - end - local.set $10 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f64) - local.get $6 - local.set $9 - i32.const 0 - local.set $8 - local.get $4 - local.set $7 - local.get $9 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - f64.load offset=8 - end - local.set $11 + local.get $5 + f64.load offset=8 + local.set $6 + local.get $5 + f64.load + local.set $7 block (result i32) i32.const 2 global.set $~lib/argc - local.get $10 - local.get $11 - local.get $3 + local.get $6 + local.get $7 + local.get $2 call_indirect (type $FUNCSIG$idd) end i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $6 - local.set $7 - i32.const 1 - local.set $8 - local.get $11 - local.set $12 - local.get $4 - local.set $9 - local.get $7 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.get $9 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $6 - local.set $9 - i32.const 0 - local.set $8 - local.get $10 - local.set $12 - local.get $4 - local.set $7 - local.get $9 - local.get $8 - i32.const 3 - i32.shl - i32.add - local.get $7 - i32.add - local.get $12 - f64.store offset=8 - end + local.get $5 + local.get $7 + f64.store offset=8 + local.get $5 + local.get $6 + f64.store end - local.get $2 - br $~lib/internal/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $3 + br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 end - block $~lib/internal/sort/SORT|inlined.0 - local.get $6 - local.set $7 - local.get $4 - local.set $8 + block $~lib/util/sort/SORT|inlined.0 local.get $5 + local.set $10 + local.get $4 local.set $9 - local.get $3 - local.set $13 + local.get $2 + local.set $8 local.get $9 i32.const 256 i32.lt_s if - local.get $7 - local.get $8 + local.get $10 local.get $9 - local.get $13 - call $~lib/internal/sort/insertionSort - else - local.get $7 local.get $8 + call $~lib/util/sort/insertionSort + else + local.get $10 local.get $9 - local.get $13 - call $~lib/internal/sort/weakHeapSort + local.get $8 + call $~lib/util/sort/weakHeapSort end end - local.get $2 + local.get $3 end ) - (func $~lib/internal/sort/COMPARATOR~anonymous|0 (; 38 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) + (func $~lib/util/sort/COMPARATOR~anonymous|0 (; 47 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32) (local $2 i64) (local $3 i64) local.get $0 @@ -3110,7 +2245,7 @@ i64.lt_s i32.sub ) - (func $~lib/typedarray/Float64Array#sort|trampoline (; 39 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#sort|trampoline (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) block $1of1 block $0of1 block $outOfRange @@ -3119,9 +2254,9 @@ end unreachable end - block $~lib/internal/sort/COMPARATOR|inlined.0 (result i32) + block $~lib/util/sort/COMPARATOR|inlined.0 (result i32) i32.const 1 - br $~lib/internal/sort/COMPARATOR|inlined.0 + br $~lib/util/sort/COMPARATOR|inlined.0 end local.set $1 end @@ -3129,10 +2264,7 @@ local.get $1 call $~lib/typedarray/Float64Array#sort ) - (func $~lib/internal/typedarray/TypedArray#__get (; 40 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Float64Array#__get (; 49 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64) local.get $1 local.get $0 i32.load offset=8 @@ -3141,385 +2273,519 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 848 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result f64) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - f64.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load ) - (func $~lib/typedarray/clampToByte (; 41 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 50 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 198 + i32.const 44 + call $~lib/builtins/abort + unreachable + end local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 i32.const 31 i32.shr_s i32.const -1 i32.xor i32.const 255 - local.get $0 + local.get $2 i32.sub i32.const 31 i32.shr_s - local.get $0 + local.get $2 i32.or i32.and + i32.store8 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 42 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint8ClampedArray#__get (; 51 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 - i32.const 0 - i32.shr_u i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort + i32.const 192 + i32.const 192 + i32.const 44 + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 0 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store8 offset=8 - end - ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 43 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $0 + i32.load offset=4 local.get $1 - local.get $2 - call $~lib/typedarray/clampToByte - call $~lib/internal/typedarray/TypedArray#__set + i32.add + i32.load8_u ) - (func $~lib/internal/typedarray/TypedArray#__get (; 44 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Int8Array#__set (; 52 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 - i32.const 0 - i32.shr_u i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort + i32.const 192 + i32.const 34 + i32.const 44 + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 0 - i32.shl - i32.add - local.get $4 - i32.add - i32.load8_u offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 ) - (func $~lib/internal/typedarray/TypedArray#__set (; 45 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) + (func $~lib/typedarray/Int8Array#fill (; 53 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $1 + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) local.get $0 - i32.load offset=8 + local.set $7 + local.get $1 + local.set $6 + local.get $2 + local.set $5 + local.get $3 + local.set $4 + local.get $7 + i32.load offset=4 + local.set $8 + local.get $7 + call $~lib/typedarray/Int8Array#get:length + local.set $9 + local.get $5 i32.const 0 - i32.shr_u - i32.ge_u - if + i32.lt_s + if (result i32) + local.get $9 + local.get $5 + i32.add + local.tee $10 i32.const 0 - i32.const 48 - i32.const 50 - i32.const 63 - call $~lib/env/abort - unreachable + local.tee $11 + local.get $10 + local.get $11 + i32.gt_s + select + else + local.get $5 + local.tee $10 + local.get $9 + local.tee $11 + local.get $10 + local.get $11 + i32.lt_s + select end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 + local.set $5 + local.get $4 + i32.const 0 + i32.lt_s + if (result i32) + local.get $9 local.get $4 + i32.add + local.tee $10 i32.const 0 - i32.shl + local.tee $11 + local.get $10 + local.get $11 + i32.gt_s + select + else + local.get $4 + local.tee $10 + local.get $9 + local.tee $11 + local.get $10 + local.get $11 + i32.lt_s + select + end + local.set $4 + local.get $5 + local.get $4 + i32.lt_s + if + local.get $8 + local.get $5 i32.add local.get $6 - i32.add + local.get $4 local.get $5 - i32.store8 offset=8 + i32.sub + call $~lib/memory/memory.fill + end + local.get $7 + ) + (func $~lib/memory/memory.copy (; 54 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 end ) - (func $~lib/typedarray/Int8Array#fill (; 46 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/util/runtime/makeArray (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - local.get $0 + i32.const 16 + call $~lib/util/runtime/allocate + local.get $2 + call $~lib/util/runtime/register local.set $4 + local.get $0 local.get $1 + i32.shl local.set $5 - local.get $2 + local.get $5 + call $~lib/util/runtime/allocate + i32.const 15 + call $~lib/util/runtime/register local.set $6 - local.get $3 - local.set $7 - local.get $4 - i32.load - local.set $8 local.get $4 - i32.load offset=4 - local.set $9 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $4 - local.set $10 - local.get $10 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $10 + local.tee $7 local.get $6 - i32.const 0 - i32.lt_s - if (result i32) - local.get $10 - local.get $6 - i32.add - local.tee $11 - i32.const 0 - local.tee $12 - local.get $11 - local.get $12 - i32.gt_s - select - else - local.get $6 - local.tee $11 - local.get $10 - local.tee $12 - local.get $11 - local.get $12 - i32.lt_s - select - end - local.set $6 + local.tee $8 local.get $7 - i32.const 0 - i32.lt_s + i32.load + local.tee $9 + i32.ne if (result i32) - local.get $10 + local.get $9 + if + local.get $9 + local.get $7 + call $~lib/collector/dummy/__ref_unlink + end + local.get $8 local.get $7 - i32.add - local.tee $11 - i32.const 0 - local.tee $12 - local.get $11 - local.get $12 - i32.gt_s - select + call $~lib/collector/dummy/__ref_link + local.get $8 else - local.get $7 - local.tee $11 - local.get $10 - local.tee $12 - local.get $11 - local.get $12 - i32.lt_s - select + local.get $8 end - local.set $7 + i32.store + local.get $4 local.get $6 - local.get $7 - i32.lt_s + i32.store offset=4 + local.get $4 + local.get $5 + i32.store offset=8 + local.get $4 + local.get $0 + i32.store offset=12 + local.get $3 if - local.get $8 local.get $6 - i32.add - local.get $9 - i32.add - i32.const 8 - i32.add - local.set $11 + local.get $3 local.get $5 - local.set $12 - local.get $7 - local.get $6 - i32.sub - local.set $13 - local.get $11 - local.get $12 - local.get $13 - call $~lib/internal/memory/memset + call $~lib/memory/memory.copy end local.get $4 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 47 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/array/Array#get:length (; 56 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.load offset=12 + ) + (func $~lib/typedarray/Int8Array#__get (; 57 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 - i32.const 0 - i32.shr_u i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 - i32.const 63 - call $~lib/env/abort + i32.const 192 + i32.const 28 + i32.const 44 + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 0 - i32.shl - i32.add - local.get $4 - i32.add - i32.load8_s offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_s ) - (func $~lib/array/Array#__get (; 48 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#__unchecked_get (; 58 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=4 local.get $1 - local.get $2 - i32.load + i32.const 0 + i32.shl + i32.add + i32.load8_s + ) + (func $~lib/array/Array#__get (; 59 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 0 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 - i32.const 0 - local.set $5 - local.get $3 - local.get $4 + i32.ge_u + if i32.const 0 - i32.shl - i32.add - local.get $5 - i32.add - i32.load8_s offset=8 - else + i32.const 272 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt8ArrayEqual (; 49 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt8ArrayEqual (; 60 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $0 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.load offset=4 - end + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 return end - block $break|0 - block - i32.const 0 - local.set $2 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + block $break|0 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Int8Array#get:length local.set $3 end loop $repeat|0 @@ -3530,18 +2796,10 @@ br_if $break|0 local.get $0 local.get $2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get local.get $1 local.get $2 call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s i32.ne if i32.const 0 @@ -3558,51 +2816,25 @@ end i32.const 1 ) - (func $~lib/typedarray/Int8Array#fill|trampoline (; 50 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/Int8Array#fill - ) - (func $~lib/typedarray/Int8Array#subarray (; 51 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#subarray (; 61 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Int8Array#get:length local.set $6 local.get $4 i32.const 0 @@ -3630,12 +2862,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -3644,9 +2876,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -3661,38 +2893,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.4 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.4 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 0 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 0 i32.shl i32.store offset=8 local.get $7 + i32.const 17 + call $~lib/util/runtime/register ) - (func $~lib/typedarray/Int32Array#fill (; 52 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $~lib/typedarray/Int32Array#fill (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) (local $5 i32) (local $6 i32) @@ -3701,169 +2954,134 @@ (local $9 i32) (local $10 i32) (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - local.set $4 + local.set $7 local.get $1 - local.set $5 - local.get $2 local.set $6 + local.get $2 + local.set $5 local.get $3 - local.set $7 - local.get $4 - i32.load - local.set $8 - local.get $4 + local.set $4 + local.get $7 i32.load offset=4 + local.set $8 + local.get $7 + call $~lib/typedarray/Int32Array#get:length local.set $9 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $4 - local.set $10 - local.get $10 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $10 - local.get $6 + local.get $5 i32.const 0 i32.lt_s if (result i32) - local.get $10 - local.get $6 + local.get $9 + local.get $5 i32.add - local.tee $11 + local.tee $10 i32.const 0 - local.tee $12 + local.tee $11 + local.get $10 local.get $11 - local.get $12 i32.gt_s select else - local.get $6 + local.get $5 + local.tee $10 + local.get $9 local.tee $11 local.get $10 - local.tee $12 local.get $11 - local.get $12 i32.lt_s select end - local.set $6 - local.get $7 + local.set $5 + local.get $4 i32.const 0 i32.lt_s if (result i32) - local.get $10 - local.get $7 + local.get $9 + local.get $4 i32.add - local.tee $11 + local.tee $10 i32.const 0 - local.tee $12 + local.tee $11 + local.get $10 local.get $11 - local.get $12 i32.gt_s select else - local.get $7 + local.get $4 + local.tee $10 + local.get $9 local.tee $11 local.get $10 - local.tee $12 local.get $11 - local.get $12 i32.lt_s select end - local.set $7 + local.set $4 block $break|0 loop $repeat|0 - local.get $6 - local.get $7 + local.get $5 + local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $8 - local.set $11 - local.get $6 - local.set $12 - local.get $5 - local.set $13 - local.get $9 - local.set $14 - local.get $11 - local.get $12 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - local.get $13 - i32.store offset=8 - end + local.get $8 + local.get $5 + i32.const 2 + i32.shl + i32.add local.get $6 + i32.store + local.get $5 i32.const 1 i32.add - local.set $6 + local.set $5 br $repeat|0 unreachable end unreachable end - local.get $4 + local.get $7 ) - (func $~lib/array/Array#__get (; 53 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) + (func $~lib/array/Array#get:length (; 63 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 - i32.load - local.set $2 + i32.load offset=12 + ) + (func $~lib/array/Array#__unchecked_get (; 64 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + i32.load offset=4 local.get $1 - local.get $2 + i32.const 2 + i32.shl + i32.add i32.load + ) + (func $~lib/array/Array#__get (; 65 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 i32.const 2 i32.shr_u - i32.lt_u - if (result i32) - local.get $2 - local.set $3 - local.get $1 - local.set $4 + i32.ge_u + if i32.const 0 - local.set $5 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $5 - i32.add - i32.load offset=8 - else + i32.const 272 + i32.const 99 + i32.const 61 + call $~lib/builtins/abort unreachable end + local.get $0 + local.get $1 + call $~lib/array/Array#__unchecked_get ) - (func $std/typedarray/isInt32ArrayEqual (; 54 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/isInt32ArrayEqual (; 66 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $0 - local.set $2 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - block $~lib/array/Array#get:length|inlined.1 (result i32) - local.get $1 - local.set $2 - local.get $2 - i32.load offset=4 - end + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.get $1 + call $~lib/array/Array#get:length i32.ne if i32.const 0 @@ -3873,14 +3091,8 @@ block i32.const 0 local.set $2 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $0 - local.set $3 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $0 + call $~lib/typedarray/Int32Array#get:length local.set $3 end loop $repeat|0 @@ -3891,7 +3103,7 @@ br_if $break|0 local.get $0 local.get $2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get local.get $1 local.get $2 call $~lib/array/Array#__get @@ -3911,114 +3123,69 @@ end i32.const 1 ) - (func $~lib/typedarray/Int32Array#fill|trampoline (; 55 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~lib/argc - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $2 - end - global.get $~lib/builtins/i32.MAX_VALUE - local.set $3 - end - local.get $0 - local.get $1 - local.get $2 - local.get $3 - call $~lib/typedarray/Int32Array#fill - ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 56 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 67 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduce (; 57 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduce (; 68 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - local.get $0 - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.10 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.get $0 + local.set $5 + local.get $1 + local.set $4 + local.get $2 + local.set $3 + local.get $5 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $5 + call $~lib/typedarray/Int8Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $12 - i32.add - i32.load8_s offset=8 - end - local.get $9 local.get $3 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $9 + local.set $3 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 58 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> (; 69 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4028,15 +3195,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 0 @@ -4052,97 +3219,96 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Uint8Array#__set (; 70 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 116 + i32.const 44 + call $~lib/builtins/abort unreachable end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + local.get $2 + i32.store8 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 59 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 71 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduce (; 60 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduce (; 72 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $5 + call $~lib/typedarray/Uint8Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $12 - i32.add - i32.load8_u offset=8 - end - local.get $9 local.get $3 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $9 + local.set $3 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 61 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8Array,u8> (; 73 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4152,15 +3318,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 3 i32.const 0 @@ -4174,97 +3340,76 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 62 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 74 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduce (; 63 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduce (; 75 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $5 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $12 - i32.add - i32.load8_u offset=8 - end - local.get $9 local.get $3 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $9 + local.set $3 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 64 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint8ClampedArray,u8> (; 76 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4296,18 +3441,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 65 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Int16Array#__set (; 77 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4316,118 +3457,84 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 280 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store16 offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 66 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 78 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduce (; 67 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduce (; 79 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $5 + call $~lib/typedarray/Int16Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $12 - i32.add - i32.load16_s offset=8 - end - local.get $9 local.get $3 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $9 + local.set $3 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 68 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int16Array,i16> (; 80 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4437,15 +3544,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 5 i32.const 0 @@ -4461,18 +3568,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 69 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint16Array#__set (; 81 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4481,118 +3584,84 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 362 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 1 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store16 offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + local.get $2 + i32.store16 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 70 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 82 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduce (; 71 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduce (; 83 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $5 + call $~lib/typedarray/Uint16Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $12 - i32.add - i32.load16_u offset=8 - end - local.get $9 local.get $3 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $9 + local.set $3 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 72 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint16Array,u16> (; 84 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4602,15 +3671,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 6 i32.const 0 @@ -4624,97 +3693,76 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 73 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 85 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduce (; 74 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduce (; 86 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $5 + call $~lib/typedarray/Int32Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.get $9 local.get $3 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $9 + local.set $3 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 75 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int32Array,i32> (; 87 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4724,15 +3772,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 7 i32.const 0 @@ -4744,18 +3792,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 76 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) + (func $~lib/typedarray/Uint32Array#__set (; 88 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 i32.load offset=8 @@ -4764,118 +3808,84 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 526 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i32.store offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 77 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 89 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduce (; 78 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduce (; 90 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $5 + call $~lib/typedarray/Uint32Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - i32.load offset=8 - end - local.get $9 local.get $3 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $9 + local.set $3 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 79 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint32Array,u32> (; 91 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -4885,15 +3895,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 8 i32.const 0 @@ -4905,18 +3915,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 80 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 i32) + (func $~lib/typedarray/Int64Array#__set (; 92 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -4925,77 +3931,53 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 608 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i64.store offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 81 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 93 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduce (; 82 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduce (; 94 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.get $4 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $4 + call $~lib/typedarray/Int64Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -5003,32 +3985,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $12 - i32.add - i64.load offset=8 - end - local.get $9 - local.get $3 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $7 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$jjjii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -5036,7 +4008,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 83 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64> (; 95 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5046,15 +4018,15 @@ local.get $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 9 i64.const 0 @@ -5066,18 +4038,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 84 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) - (local $3 i32) - (local $4 i32) - (local $5 i64) - (local $6 i32) + (func $~lib/typedarray/Uint64Array#__set (; 96 ;) (type $FUNCSIG$viij) (param $0 i32) (param $1 i32) (param $2 i64) local.get $1 local.get $0 i32.load offset=8 @@ -5086,77 +4054,53 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 690 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 3 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - i64.store offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + local.get $2 + i64.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 85 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 97 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduce (; 86 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduce (; 98 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.get $4 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $4 + call $~lib/typedarray/Uint64Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -5164,32 +4108,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result i64) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $12 - i32.add - i64.load offset=8 - end - local.get $9 - local.get $3 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $7 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$jjjii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -5197,7 +4131,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 87 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Uint64Array,u64> (; 99 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -5207,15 +4141,15 @@ local.get $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 10 i64.const 0 @@ -5227,18 +4161,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/internal/typedarray/TypedArray#__set (; 88 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) - (local $3 i32) - (local $4 i32) - (local $5 f32) - (local $6 i32) + (func $~lib/typedarray/Float32Array#__set (; 100 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32) local.get $1 local.get $0 i32.load offset=8 @@ -5247,77 +4177,53 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 50 + i32.const 192 + i32.const 772 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $0 - i32.load - local.set $3 - local.get $1 - local.set $4 - local.get $2 - local.set $5 - local.get $0 - i32.load offset=4 - local.set $6 - local.get $3 - local.get $4 - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.add - local.get $5 - f32.store offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $2 + f32.store ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 89 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 101 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduce (; 90 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduce (; 102 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.get $4 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $4 + call $~lib/typedarray/Float32Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -5325,32 +4231,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.0 (result f32) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $12 - i32.add - f32.load offset=8 - end - local.get $9 - local.get $3 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $7 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$fffii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -5358,7 +4254,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 91 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32> (; 103 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -5368,15 +4264,15 @@ local.get $0 i32.const 0 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 11 f32.const 0 @@ -5388,56 +4284,45 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 92 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 104 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduce (; 93 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduce (; 105 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $6 - local.get $3 - i32.load - local.set $7 - local.get $3 + local.get $4 i32.load offset=4 - local.set $8 + local.set $6 block $break|0 - i32.const 0 - local.set $9 + block + i32.const 0 + local.set $7 + local.get $4 + call $~lib/typedarray/Float64Array#get:length + local.set $8 + end loop $repeat|0 - local.get $9 - local.get $6 + local.get $7 + local.get $8 i32.lt_s i32.eqz br_if $break|0 @@ -5445,32 +4330,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result f64) - local.get $7 - local.set $10 - local.get $9 - local.set $11 - local.get $8 - local.set $12 - local.get $10 - local.get $11 - i32.const 3 - i32.shl - i32.add - local.get $12 - i32.add - f64.load offset=8 - end - local.get $9 - local.get $3 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $7 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$dddii) end local.set $5 - local.get $9 + local.get $7 i32.const 1 i32.add - local.set $9 + local.set $7 br $repeat|0 unreachable end @@ -5478,7 +4353,7 @@ end local.get $5 ) - (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 94 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64> (; 106 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -5488,15 +4363,15 @@ local.get $0 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 12 f64.const 0 @@ -5508,54 +4383,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 252 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 95 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int8Array#reduceRight (; 96 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int8Array#reduceRight (; 108 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.11 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -5563,41 +4425,31 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_s offset=8 - end - local.get $8 local.get $3 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $8 + local.set $3 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 97 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int8Array,i8> (; 109 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5607,15 +4459,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 13 i32.const 0 @@ -5631,54 +4483,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 98 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8Array#reduceRight (; 99 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reduceRight (; 111 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -5686,41 +4525,31 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_u offset=8 - end - local.get $8 local.get $3 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $8 + local.set $3 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 100 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8Array,u8> (; 112 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5730,15 +4559,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 14 i32.const 0 @@ -5752,54 +4581,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 101 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 102 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reduceRight (; 114 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -5807,41 +4623,31 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_u offset=8 - end - local.get $8 local.get $3 + local.get $6 + local.get $7 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $8 + local.set $3 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 103 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint8ClampedArray,u8> (; 115 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5873,54 +4679,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 104 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 116 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int16Array#reduceRight (; 105 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#reduceRight (; 117 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -5928,41 +4721,31 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.add - i32.load16_s offset=8 - end - local.get $8 local.get $3 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $8 + local.set $3 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 106 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int16Array,i16> (; 118 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -5972,15 +4755,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 16 i32.const 0 @@ -5996,54 +4779,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 107 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 119 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint16Array#reduceRight (; 108 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reduceRight (; 120 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6051,41 +4821,31 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.add - i32.load16_u offset=8 - end - local.get $8 local.get $3 + local.get $6 + local.get $7 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $8 + local.set $3 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 109 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint16Array,u16> (; 121 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6095,15 +4855,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 17 i32.const 0 @@ -6117,54 +4877,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 110 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 122 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Int32Array#reduceRight (; 111 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#reduceRight (; 123 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.10 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6172,41 +4919,31 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.get $8 local.get $3 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $8 + local.set $3 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 112 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int32Array,i32> (; 124 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6216,15 +4953,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 18 i32.const 0 @@ -6236,54 +4973,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 113 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 125 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) local.get $0 local.get $1 i32.add ) - (func $~lib/typedarray/Uint32Array#reduceRight (; 114 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reduceRight (; 126 ;) (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 $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.set $3 + local.get $5 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $5 + call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6291,41 +5015,31 @@ block (result i32) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.get $8 local.get $3 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $7 + local.get $5 local.get $4 call_indirect (type $FUNCSIG$iiiii) end - local.set $5 - local.get $8 + local.set $3 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end unreachable end - local.get $5 + local.get $3 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 115 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint32Array,u32> (; 127 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6335,15 +5049,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 19 i32.const 0 @@ -6355,54 +5069,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 116 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 128 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Int64Array#reduceRight (; 117 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Int64Array#reduceRight (; 129 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.get $4 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $4 + call $~lib/typedarray/Int64Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6411,32 +5112,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - i64.load offset=8 - end - local.get $8 - local.get $3 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $7 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$jjjii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6444,7 +5135,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 118 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Int64Array,i64> (; 130 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6454,15 +5145,15 @@ local.get $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 20 i64.const 0 @@ -6474,54 +5165,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 119 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 131 ;) (type $FUNCSIG$jjjii) (param $0 i64) (param $1 i64) (param $2 i32) (param $3 i32) (result i64) local.get $0 local.get $1 i64.add ) - (func $~lib/typedarray/Uint64Array#reduceRight (; 120 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) + (func $~lib/typedarray/Uint64Array#reduceRight (; 132 ;) (type $FUNCSIG$jiij) (param $0 i32) (param $1 i32) (param $2 i64) (result i64) (local $3 i32) (local $4 i32) (local $5 i64) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.get $4 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $4 + call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6529,33 +5207,23 @@ block (result i64) i32.const 4 global.set $~lib/argc - local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result i64) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - i64.load offset=8 - end - local.get $8 - local.get $3 + local.get $5 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $7 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$jjjii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6563,7 +5231,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 121 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Uint64Array,u64> (; 133 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i64) i32.const 0 @@ -6573,15 +5241,15 @@ local.get $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 21 i64.const 0 @@ -6593,54 +5261,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 122 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 134 ;) (type $FUNCSIG$fffii) (param $0 f32) (param $1 f32) (param $2 i32) (param $3 i32) (result f32) local.get $0 local.get $1 f32.add ) - (func $~lib/typedarray/Float32Array#reduceRight (; 123 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) + (func $~lib/typedarray/Float32Array#reduceRight (; 135 ;) (type $FUNCSIG$fiif) (param $0 i32) (param $1 i32) (param $2 f32) (result f32) (local $3 i32) (local $4 i32) (local $5 f32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.get $4 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $4 + call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6649,32 +5304,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.1 (result f32) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.get $8 - local.get $3 + local.get $6 + local.get $7 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $7 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$fffii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6682,7 +5327,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 124 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float32Array,f32> (; 136 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f32) i32.const 0 @@ -6692,15 +5337,15 @@ local.get $0 i32.const 0 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 22 f32.const 0 @@ -6712,54 +5357,41 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 125 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 137 ;) (type $FUNCSIG$dddii) (param $0 f64) (param $1 f64) (param $2 i32) (param $3 i32) (result f64) local.get $0 local.get $1 f64.add ) - (func $~lib/typedarray/Float64Array#reduceRight (; 126 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) + (func $~lib/typedarray/Float64Array#reduceRight (; 138 ;) (type $FUNCSIG$diid) (param $0 i32) (param $1 i32) (param $2 f64) (result f64) (local $3 i32) (local $4 i32) (local $5 f64) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 - local.set $3 - local.get $1 local.set $4 + local.get $1 + local.set $3 local.get $2 local.set $5 - local.get $3 - i32.load - local.set $6 - local.get $3 + local.get $4 i32.load offset=4 - local.set $7 + local.set $6 block $break|0 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $3 - local.set $8 - local.get $8 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $4 + call $~lib/typedarray/Float64Array#get:length i32.const 1 i32.sub - local.set $8 + local.set $7 loop $repeat|0 - local.get $8 + local.get $7 i32.const 0 i32.ge_s i32.eqz @@ -6768,32 +5400,22 @@ i32.const 4 global.set $~lib/argc local.get $5 - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result f64) - local.get $6 - local.set $9 - local.get $8 - local.set $10 - local.get $7 - local.set $11 - local.get $9 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.get $8 - local.get $3 + local.get $6 + local.get $7 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $7 local.get $4 + local.get $3 call_indirect (type $FUNCSIG$dddii) end local.set $5 - local.get $8 + local.get $7 i32.const 1 i32.sub - local.set $8 + local.set $7 br $repeat|0 unreachable end @@ -6801,7 +5423,7 @@ end local.get $5 ) - (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 127 ;) (type $FUNCSIG$v) + (func $std/typedarray/testReduceRight<~lib/typedarray/Float64Array,f64> (; 139 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 f64) i32.const 0 @@ -6811,15 +5433,15 @@ local.get $0 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 23 f64.const 0 @@ -6831,19 +5453,19 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 279 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 128 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 140 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (; 129 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#map (; 141 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6851,105 +5473,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.12 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Int8Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Int8Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 0 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_s offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 0 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store8 offset=8 + i32.load8_s + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store8 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 130 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8> (; 142 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -6959,80 +5540,68 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 24 call $~lib/typedarray/Int8Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 131 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 143 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8Array#map (; 132 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#map (; 144 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7040,103 +5609,83 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Uint8Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint8Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 0 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 255 - i32.and - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 0 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store8 offset=8 + i32.load8_u + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store8 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 + ) + (func $~lib/typedarray/Uint8Array#__get (; 145 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $1 + local.get $0 + i32.load offset=8 + i32.ge_u + if + i32.const 0 + i32.const 192 + i32.const 110 + i32.const 44 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + local.get $1 + i32.add + i32.load8_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 133 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8Array,u8> (; 146 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7146,74 +5695,68 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 25 call $~lib/typedarray/Uint8Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 134 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 147 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint8ClampedArray#map (; 135 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#map (; 148 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7221,103 +5764,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint8ClampedArray#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.2 + local.get $7 + local.get $8 + i32.const 0 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 0 - i32.shl - i32.add - local.get $14 - i32.add - i32.load8_u offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 255 - i32.and - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 0 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store8 offset=8 + i32.load8_u + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store8 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 136 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint8ClampedArray,u8> (; 149 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7342,59 +5846,53 @@ local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 137 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 150 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int16Array#map (; 138 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#map (; 151 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7402,108 +5900,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Int16Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Int16Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 1 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 1 - i32.shl - i32.add - local.get $14 - i32.add - i32.load16_s offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 1 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store16 offset=8 + i32.load16_s + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store16 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 139 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Int16Array#__get (; 152 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7512,32 +5966,21 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 274 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.get $4 - i32.add - i32.load16_s offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 140 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int16Array,i16> (; 153 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7547,80 +5990,68 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 27 call $~lib/typedarray/Int16Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + call $~lib/typedarray/Int16Array#__get i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + call $~lib/typedarray/Int16Array#__get i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + call $~lib/typedarray/Int16Array#__get i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 141 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 154 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint16Array#map (; 142 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#map (; 155 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7628,106 +6059,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Uint16Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint16Array#constructor - local.set $7 - local.get $7 - i32.load - local.set $8 + local.set $6 + local.get $6 + i32.load offset=4 + local.set $7 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 1 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 1 - i32.shl - i32.add - local.get $14 - i32.add - i32.load16_u offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - i32.const 65535 - i32.and - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 1 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store16 offset=8 + i32.load16_u + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store16 + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 143 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Uint16Array#__get (; 156 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -7736,32 +6125,21 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 356 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 1 - i32.shl - i32.add - local.get $4 - i32.add - i32.load16_u offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 144 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint16Array,u16> (; 157 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7771,74 +6149,68 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 28 call $~lib/typedarray/Uint16Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 145 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 158 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Int32Array#map (; 146 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#map (; 159 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7846,101 +6218,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.11 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Int32Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Int32Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.2 + local.get $7 + local.get $8 + i32.const 2 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.4 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 2 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store offset=8 + i32.load + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 147 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int32Array,i32> (; 160 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -7950,68 +6285,68 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 29 call $~lib/typedarray/Int32Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 148 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 161 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 local.get $0 i32.mul ) - (func $~lib/typedarray/Uint32Array#map (; 149 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#map (; 162 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8019,104 +6354,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Uint32Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint32Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 2 + i32.shl + i32.add + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - i32.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$iiii) - end - local.set $14 - i32.const 0 - local.set $13 - local.get $10 - local.get $11 i32.const 2 i32.shl i32.add - local.get $13 - i32.add - local.get $14 - i32.store offset=8 + i32.load + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$iiii) end - local.get $9 + i32.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 150 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Uint32Array#__get (; 163 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 @@ -8125,32 +6420,21 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 520 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - i32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 151 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint32Array,u32> (; 164 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8160,68 +6444,68 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 30 call $~lib/typedarray/Uint32Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 9 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 152 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 165 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Int64Array#map (; 153 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#map (; 166 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8229,105 +6513,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) - local.get $0 - local.set $2 - local.get $1 + local.get $0 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Int64Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Int64Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 3 + i32.shl + i32.add + block (result i64) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i64) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$jjii) - end - local.set $15 - i32.const 0 - local.set $14 - local.get $10 - local.get $11 i32.const 3 i32.shl i32.add - local.get $14 - i32.add - local.get $15 - i64.store offset=8 + i64.load + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$jjii) end - local.get $9 + i64.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 154 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Int64Array#__get (; 167 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -8336,32 +6579,21 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 602 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - i64.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 155 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64> (; 168 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8371,68 +6603,68 @@ local.get $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 31 call $~lib/typedarray/Int64Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 1 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 4 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 9 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 156 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 169 ;) (type $FUNCSIG$jjii) (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 local.get $0 i64.mul ) - (func $~lib/typedarray/Uint64Array#map (; 157 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#map (; 170 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8440,105 +6672,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 i64) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Uint64Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Uint64Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 3 + i32.shl + i32.add + block (result i64) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result i64) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result i64) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - i64.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$jjii) - end - local.set $15 - i32.const 0 - local.set $14 - local.get $10 - local.get $11 i32.const 3 i32.shl i32.add - local.get $14 - i32.add - local.get $15 - i64.store offset=8 + i64.load + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$jjii) end - local.get $9 + i64.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 158 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Uint64Array#__get (; 171 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 @@ -8547,32 +6738,21 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 684 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result i64) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 3 - i32.shl - i32.add - local.get $4 - i32.add - i64.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 3 + i32.shl + i32.add + i64.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 159 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Uint64Array,u64> (; 172 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8582,68 +6762,68 @@ local.get $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 32 call $~lib/typedarray/Uint64Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 1 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 4 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 9 i64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 160 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 173 ;) (type $FUNCSIG$ffii) (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 local.get $0 f32.mul ) - (func $~lib/typedarray/Float32Array#map (; 161 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#map (; 174 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8651,105 +6831,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 f32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Float32Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Float32Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.1 + local.get $7 + local.get $8 + i32.const 2 + i32.shl + i32.add + block (result f32) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result f32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.2 (result f32) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 2 - i32.shl - i32.add - local.get $14 - i32.add - f32.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$ffii) - end - local.set $15 - i32.const 0 - local.set $14 - local.get $10 - local.get $11 i32.const 2 i32.shl i32.add - local.get $14 - i32.add - local.get $15 - f32.store offset=8 + f32.load + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$ffii) end - local.get $9 + f32.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $~lib/internal/typedarray/TypedArray#__get (; 162 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (func $~lib/typedarray/Float32Array#__get (; 175 ;) (type $FUNCSIG$fii) (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 @@ -8758,32 +6897,21 @@ i32.ge_u if i32.const 0 - i32.const 48 - i32.const 39 + i32.const 192 + i32.const 766 i32.const 63 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/arraybuffer/LOAD|inlined.3 (result f32) - local.get $0 - i32.load - local.set $2 - local.get $1 - local.set $3 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - local.get $3 - i32.const 2 - i32.shl - i32.add - local.get $4 - i32.add - f32.load offset=8 - end + local.get $0 + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 163 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32> (; 176 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8793,68 +6921,68 @@ local.get $0 i32.const 0 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 33 call $~lib/typedarray/Float32Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 1 f32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 4 f32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 9 f32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 164 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 177 ;) (type $FUNCSIG$ddii) (param $0 f64) (param $1 i32) (param $2 i32) (result f64) local.get $0 local.get $0 f64.mul ) - (func $~lib/typedarray/Float64Array#map (; 165 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#map (; 178 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8862,102 +6990,64 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) - (local $12 i32) - (local $13 i32) - (local $14 i32) - (local $15 f64) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.get $1 + local.set $2 + local.get $3 + call $~lib/typedarray/Float64Array#get:length local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $5 i32.const 0 local.get $4 call $~lib/typedarray/Float64Array#constructor + local.set $6 + local.get $6 + i32.load offset=4 local.set $7 - local.get $7 - i32.load - local.set $8 block $break|0 i32.const 0 - local.set $9 + local.set $8 loop $repeat|0 - local.get $9 + local.get $8 local.get $4 i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/STORE|inlined.13 + local.get $7 + local.get $8 + i32.const 3 + i32.shl + i32.add + block (result f64) + i32.const 3 + global.set $~lib/argc + local.get $5 local.get $8 - local.set $10 - local.get $9 - local.set $11 - block (result f64) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.15 (result f64) - local.get $5 - local.set $12 - local.get $9 - local.set $13 - local.get $6 - local.set $14 - local.get $12 - local.get $13 - i32.const 3 - i32.shl - i32.add - local.get $14 - i32.add - f64.load offset=8 - end - local.get $9 - local.get $2 - local.get $3 - call_indirect (type $FUNCSIG$ddii) - end - local.set $15 - i32.const 0 - local.set $14 - local.get $10 - local.get $11 i32.const 3 i32.shl i32.add - local.get $14 - i32.add - local.get $15 - f64.store offset=8 + f64.load + local.get $8 + local.get $3 + local.get $2 + call_indirect (type $FUNCSIG$ddii) end - local.get $9 + f64.store + local.get $8 i32.const 1 i32.add - local.set $9 + local.set $8 br $repeat|0 unreachable end unreachable end - local.get $7 + local.get $6 ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 166 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64> (; 179 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) i32.const 0 @@ -8967,63 +7057,63 @@ local.get $0 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 34 call $~lib/typedarray/Float64Array#map local.set $1 local.get $1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 1 f64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 306 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 4 f64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 307 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 9 f64.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 308 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 167 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 180 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9032,79 +7122,56 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#some (; 168 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#some (; 181 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.13 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_s offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9113,7 +7180,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 169 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 182 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -9122,7 +7189,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 170 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8> (; 183 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9133,15 +7200,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 35 call $~lib/typedarray/Int8Array#some @@ -9152,10 +7219,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9169,93 +7236,70 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 171 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 184 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#some (; 172 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#some (; 185 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9264,14 +7308,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 173 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 186 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 174 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8Array,u8> (; 187 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9282,15 +7326,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 37 call $~lib/typedarray/Uint8Array#some @@ -9301,10 +7345,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9318,93 +7362,70 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 175 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 188 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#some (; 176 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#some (; 189 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9413,14 +7434,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 177 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 190 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 178 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint8ClampedArray,u8> (; 191 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9450,10 +7471,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9467,14 +7488,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 179 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 192 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -9483,79 +7504,56 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#some (; 180 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#some (; 193 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_s offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9564,7 +7562,7 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 181 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 194 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -9573,7 +7571,7 @@ i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 182 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16> (; 195 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9584,15 +7582,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 41 call $~lib/typedarray/Int16Array#some @@ -9603,10 +7601,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9620,93 +7618,70 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 183 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 196 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#some (; 184 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (; 197 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9715,14 +7690,14 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 185 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 198 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 186 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint16Array,u16> (; 199 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9733,15 +7708,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 43 call $~lib/typedarray/Uint16Array#some @@ -9752,10 +7727,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9769,91 +7744,68 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 187 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 200 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#some (; 188 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (; 201 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.12 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.6 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -9862,12 +7814,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 189 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 202 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 190 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32> (; 203 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -9878,15 +7830,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 45 call $~lib/typedarray/Int32Array#some @@ -9897,10 +7849,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -9914,91 +7866,68 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 191 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 204 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#some (; 192 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#some (; 205 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10007,12 +7936,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 193 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 206 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 0 i32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 194 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint32Array,u32> (; 207 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10023,15 +7952,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 47 call $~lib/typedarray/Uint32Array#some @@ -10042,10 +7971,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10059,91 +7988,68 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 195 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 208 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#some (; 196 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#some (; 209 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 - block $break|0 - i32.const 0 - local.set $7 + local.set $4 + block $break|0 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10152,12 +8058,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 197 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 210 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 198 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64> (; 211 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10168,15 +8074,15 @@ local.get $0 i32.const 0 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 49 call $~lib/typedarray/Int64Array#some @@ -10187,10 +8093,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10204,91 +8110,68 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 199 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 212 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#some (; 200 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#some (; 213 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10297,12 +8180,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 201 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 214 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 0 i64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 202 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Uint64Array,u64> (; 215 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10313,15 +8196,15 @@ local.get $0 i32.const 0 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 51 call $~lib/typedarray/Uint64Array#some @@ -10332,10 +8215,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10349,91 +8232,68 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 203 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 216 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#some (; 204 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#some (; 217 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.4 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Float32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.5 (result f32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - f32.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ifii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10442,12 +8302,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 205 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 218 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 0 f32.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 206 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32> (; 219 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10458,15 +8318,15 @@ local.get $0 i32.const 0 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 53 call $~lib/typedarray/Float32Array#some @@ -10477,10 +8337,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10494,91 +8354,68 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 207 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 220 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#some (; 208 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#some (; 221 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Float64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.17 (result f64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - f64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idii) end - i32.const 0 - i32.ne if i32.const 1 - br $~lib/internal/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10587,12 +8424,12 @@ i32.const 0 end ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 209 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 222 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 0 f64.eq ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 210 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64> (; 223 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10603,15 +8440,15 @@ local.get $0 i32.const 0 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 55 call $~lib/typedarray/Float64Array#some @@ -10622,10 +8459,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 335 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10639,14 +8476,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 338 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 211 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 224 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -10655,79 +8492,56 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int8Array#findIndex (; 212 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (; 225 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.14 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_s offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10736,7 +8550,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 213 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 226 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -10745,7 +8559,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 214 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8> (; 227 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10756,15 +8570,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 57 call $~lib/typedarray/Int8Array#findIndex @@ -10774,11 +8588,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10790,94 +8604,71 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 215 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 228 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8Array#findIndex (; 216 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#findIndex (; 229 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.10 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8Array,u8>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -10886,14 +8677,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 217 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 230 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 218 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8Array,u8> (; 231 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -10904,15 +8695,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 59 call $~lib/typedarray/Uint8Array#findIndex @@ -10922,11 +8713,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -10938,94 +8729,71 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 219 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 232 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 220 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#findIndex (; 233 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.11 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.14 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11034,14 +8802,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 221 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 234 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 222 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint8ClampedArray,u8> (; 235 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11070,11 +8838,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11086,15 +8854,15 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 223 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 236 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11103,79 +8871,56 @@ i32.const 2 i32.eq ) - (func $~lib/typedarray/Int16Array#findIndex (; 224 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int16Array#findIndex (; 237 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_s offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int16Array,i16>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11184,7 +8929,7 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 225 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 238 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -11193,7 +8938,7 @@ i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 226 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16> (; 239 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11204,15 +8949,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 63 call $~lib/typedarray/Int16Array#findIndex @@ -11222,11 +8967,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11238,94 +8983,71 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 227 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 240 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint16Array#findIndex (; 228 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#findIndex (; 241 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint16Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint16Array,u16>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11334,14 +9056,14 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 229 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 242 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 230 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint16Array,u16> (; 243 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11352,15 +9074,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 65 call $~lib/typedarray/Uint16Array#findIndex @@ -11370,11 +9092,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11386,92 +9108,69 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 231 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 244 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Int32Array#findIndex (; 232 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#findIndex (; 245 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.13 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.8 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int32Array,i32>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11480,12 +9179,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 233 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 246 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 234 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32> (; 247 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11496,15 +9195,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 67 call $~lib/typedarray/Int32Array#findIndex @@ -11514,11 +9213,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11530,92 +9229,69 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 235 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 248 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $~lib/typedarray/Uint32Array#findIndex (; 236 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#findIndex (; 249 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint32Array,u32>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11624,12 +9300,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 237 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 250 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 4 i32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 238 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint32Array,u32> (; 251 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11640,15 +9316,15 @@ local.get $0 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 69 call $~lib/typedarray/Uint32Array#findIndex @@ -11658,11 +9334,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11674,92 +9350,69 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 239 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 252 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Int64Array#findIndex (; 240 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#findIndex (; 253 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int64Array,i64>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11768,12 +9421,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 241 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 254 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 242 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64> (; 255 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11784,15 +9437,15 @@ local.get $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 71 call $~lib/typedarray/Int64Array#findIndex @@ -11802,11 +9455,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11818,92 +9471,69 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 243 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 256 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $~lib/typedarray/Uint64Array#findIndex (; 244 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#findIndex (; 257 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Uint64Array,u64>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -11912,12 +9542,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 245 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 258 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 4 i64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 246 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Uint64Array,u64> (; 259 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -11928,15 +9558,15 @@ local.get $0 i32.const 0 i64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 73 call $~lib/typedarray/Uint64Array#findIndex @@ -11946,11 +9576,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -11962,92 +9592,69 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 247 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 260 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $~lib/typedarray/Float32Array#findIndex (; 248 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#findIndex (; 261 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.5 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Float32Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s - i32.eqz - br_if $break|0 - block (result i32) - i32.const 3 - global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.7 (result f32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - f32.load offset=8 - end - local.get $7 - local.get $2 + i32.eqz + br_if $break|0 + block (result i32) + i32.const 3 + global.set $~lib/argc + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ifii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float32Array,f32>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12056,12 +9663,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 249 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 262 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 4 f32.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 250 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32> (; 263 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12072,15 +9679,15 @@ local.get $0 i32.const 0 f32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 75 call $~lib/typedarray/Float32Array#findIndex @@ -12090,11 +9697,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -12106,92 +9713,69 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 251 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 264 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $~lib/typedarray/Float64Array#findIndex (; 252 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#findIndex (; 265 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Float64Array#get:length + local.set $6 + end loop $repeat|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.19 (result f64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - f64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idii) end - i32.const 0 - i32.ne if - local.get $7 - br $~lib/internal/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $5 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12200,12 +9784,12 @@ i32.const -1 end ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 253 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 266 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 4 f64.eq ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 254 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64> (; 267 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12216,15 +9800,15 @@ local.get $0 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 77 call $~lib/typedarray/Float64Array#findIndex @@ -12234,11 +9818,11 @@ i32.eq i32.eqz if - i32.const 624 - i32.const 8 + i32.const 736 + i32.const 24 i32.const 365 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -12250,15 +9834,15 @@ i32.eq i32.eqz if - i32.const 664 - i32.const 8 + i32.const 784 + i32.const 24 i32.const 368 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 255 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 268 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12269,43 +9853,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Int8Array#every (; 256 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#every (; 269 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.15 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int8Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12313,42 +9886,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_s offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Int8Array,i8>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12357,7 +9918,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 257 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|1 (; 270 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 24 i32.shl @@ -12366,7 +9927,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 258 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8> (; 271 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12377,15 +9938,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 79 call $~lib/typedarray/Int8Array#every @@ -12396,10 +9957,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -12413,14 +9974,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 259 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 272 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -12429,43 +9990,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8Array#every (; 260 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8Array#every (; 273 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.12 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint8Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12473,42 +10023,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.16 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Uint8Array,u8>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12517,14 +10055,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 261 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|1 (; 274 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 262 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8> (; 275 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12535,15 +10073,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 81 call $~lib/typedarray/Uint8Array#every @@ -12554,10 +10092,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -12571,14 +10109,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 263 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 276 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -12587,43 +10125,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint8ClampedArray#every (; 264 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#every (; 277 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.13 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12631,42 +10158,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.18 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Uint8ClampedArray,u8>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12675,14 +10190,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 265 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|1 (; 278 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 266 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint8ClampedArray,u8> (; 279 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12712,10 +10227,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -12729,14 +10244,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 267 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 280 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -12745,45 +10260,34 @@ i32.const 2 i32.rem_s i32.const 0 - i32.eq - ) - (func $~lib/typedarray/Int16Array#every (; 268 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) - local.get $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + i32.eq + ) + (func $~lib/typedarray/Int16Array#every (; 281 ;) (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) + block $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + local.get $0 + local.set $3 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int16Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12791,42 +10295,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_s offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Int16Array,i16>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12835,7 +10327,7 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 269 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|1 (; 282 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 16 i32.shl @@ -12844,7 +10336,7 @@ i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 270 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16> (; 283 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -12855,15 +10347,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 85 call $~lib/typedarray/Int16Array#every @@ -12874,10 +10366,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -12891,14 +10383,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 271 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 284 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and @@ -12907,43 +10399,32 @@ i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint16Array#every (; 272 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#every (; 285 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint16Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -12951,42 +10432,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_u offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Uint16Array,u16>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -12995,14 +10464,14 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 273 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16>~anonymous|1 (; 286 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 65535 i32.and i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 274 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint16Array,u16> (; 287 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13013,15 +10482,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 87 call $~lib/typedarray/Uint16Array#every @@ -13032,10 +10501,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -13049,57 +10518,46 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 275 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 288 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_s i32.const 0 i32.eq ) - (func $~lib/typedarray/Int32Array#every (; 276 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#every (; 289 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.14 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int32Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13107,42 +10565,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Int32Array,i32>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -13151,12 +10597,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 277 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|1 (; 290 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 278 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32> (; 291 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13167,15 +10613,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 89 call $~lib/typedarray/Int32Array#every @@ -13186,10 +10632,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -13203,57 +10649,46 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 279 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 292 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.rem_u i32.const 0 i32.eq ) - (func $~lib/typedarray/Uint32Array#every (; 280 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint32Array#every (; 293 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint32Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13261,42 +10696,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$iiii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Uint32Array,u32>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -13305,12 +10728,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 281 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32>~anonymous|1 (; 294 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 2 i32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 282 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint32Array,u32> (; 295 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13321,15 +10744,15 @@ local.get $0 i32.const 0 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 91 call $~lib/typedarray/Uint32Array#every @@ -13340,10 +10763,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -13357,57 +10780,46 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 283 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 296 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_s i64.const 0 i64.eq ) - (func $~lib/typedarray/Int64Array#every (; 284 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int64Array#every (; 297 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Int64Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13415,42 +10827,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Int64Array,i64>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -13459,12 +10859,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 285 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|1 (; 298 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 286 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64> (; 299 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13475,15 +10875,15 @@ local.get $0 i32.const 0 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 93 call $~lib/typedarray/Int64Array#every @@ -13494,10 +10894,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -13511,57 +10911,46 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 287 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 300 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.rem_u i64.const 0 i64.eq ) - (func $~lib/typedarray/Uint64Array#every (; 288 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#every (; 301 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) - local.get $0 - local.set $2 - local.get $1 + block $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 (result i32) + local.get $0 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Uint64Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13569,42 +10958,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result i64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ijii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Uint64Array,u64>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -13613,12 +10990,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 289 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|1 (; 302 ;) (type $FUNCSIG$ijii) (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 i64.const 2 i64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 290 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64> (; 303 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -13629,15 +11006,15 @@ local.get $0 i32.const 0 i64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 i64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 i64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 95 call $~lib/typedarray/Uint64Array#every @@ -13648,10 +11025,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -13665,24 +11042,28 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/math/NativeMathf.mod (; 291 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) + (func $~lib/builtins/isNaN (; 304 ;) (type $FUNCSIG$if) (param $0 f32) (result i32) + local.get $0 + local.get $0 + f32.ne + ) + (func $~lib/math/NativeMathf.mod (; 305 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 f32) + (local $8 f32) + (local $9 i32) (local $10 i32) - (local $11 i32) local.get $0 i32.reinterpret_f32 local.set $2 @@ -13712,45 +11093,38 @@ local.get $7 i32.const 0 i32.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i32.const 255 i32.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f32.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 f32.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f32.div return end local.get $2 i32.const 1 i32.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i32.le_u if - local.get $10 + local.get $9 local.get $7 i32.eq if @@ -13886,13 +11260,13 @@ i32.const 8 i32.shl i32.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i32.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i32.shl local.set $2 local.get $4 @@ -13928,50 +11302,39 @@ local.get $2 f32.reinterpret_i32 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 292 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 306 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 call $~lib/math/NativeMathf.mod f32.const 0 f32.eq ) - (func $~lib/typedarray/Float32Array#every (; 293 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#every (; 307 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Float32Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -13979,42 +11342,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.9 (result f32) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - f32.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$ifii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Float32Array,f32>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -14023,12 +11374,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 294 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|1 (; 308 ;) (type $FUNCSIG$ifii) (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 f32.const 2 f32.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 295 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32> (; 309 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14039,15 +11390,15 @@ local.get $0 i32.const 0 f32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 f32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 f32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 97 call $~lib/typedarray/Float32Array#every @@ -14058,10 +11409,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -14075,24 +11426,28 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/math/NativeMath.mod (; 296 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/builtins/isNaN (; 310 ;) (type $FUNCSIG$id) (param $0 f64) (result i32) + local.get $0 + local.get $0 + f64.ne + ) + (func $~lib/math/NativeMath.mod (; 311 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i64) (local $4 i64) (local $5 i64) (local $6 i64) (local $7 i64) - (local $8 i32) - (local $9 f64) + (local $8 f64) + (local $9 i64) (local $10 i64) - (local $11 i64) local.get $0 i64.reinterpret_f64 local.set $2 @@ -14122,45 +11477,38 @@ local.get $7 i64.const 0 i64.eq - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $4 i64.const 2047 i64.eq end - local.tee $8 if (result i32) - local.get $8 + i32.const 1 else local.get $1 - local.set $9 - local.get $9 - local.get $9 - f64.ne + call $~lib/builtins/isNaN end - i32.const 0 - i32.ne if local.get $0 local.get $1 f64.mul - local.set $9 - local.get $9 - local.get $9 + local.set $8 + local.get $8 + local.get $8 f64.div return end local.get $2 i64.const 1 i64.shl - local.set $10 - local.get $10 + local.set $9 + local.get $9 local.get $7 i64.le_u if - local.get $10 + local.get $9 local.get $7 i64.eq if @@ -14296,13 +11644,13 @@ i64.const 11 i64.shl i64.clz - local.set $11 + local.set $10 local.get $4 - local.get $11 + local.get $10 i64.sub local.set $4 local.get $2 - local.get $11 + local.get $10 i64.shl local.set $2 local.get $4 @@ -14340,50 +11688,39 @@ local.get $2 f64.reinterpret_i64 ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 297 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 312 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 call $~lib/math/NativeMath.mod f64.const 0 f64.eq ) - (func $~lib/typedarray/Float64Array#every (; 298 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float64Array#every (; 313 ;) (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 $8 i32) - (local $9 i32) - (local $10 i32) - block $~lib/internal/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + block $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) local.get $0 - local.set $2 - local.get $1 local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + local.get $1 + local.set $2 + local.get $3 i32.load offset=4 - local.set $6 + local.set $4 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $5 + local.get $3 + call $~lib/typedarray/Float64Array#get:length + local.set $6 + end loop $repeat|0 block $continue|0 - local.get $7 - local.get $4 + local.get $5 + local.get $6 i32.lt_s i32.eqz br_if $break|0 @@ -14391,42 +11728,30 @@ block (result i32) i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.21 (result f64) - local.get $5 - local.set $10 - local.get $7 - local.set $9 - local.get $6 - local.set $8 - local.get $10 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - f64.load offset=8 - end - local.get $7 - local.get $2 + local.get $4 + local.get $5 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $5 local.get $3 + local.get $2 call_indirect (type $FUNCSIG$idii) end - i32.const 0 - i32.ne if br $continue|0 end i32.const 0 - br $~lib/internal/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 + br $~lib/typedarray/EVERY<~lib/typedarray/Float64Array,f64>|inlined.0 unreachable end unreachable end - local.get $7 + local.get $5 i32.const 1 i32.add - local.set $7 + local.set $5 br $repeat|0 unreachable end @@ -14435,12 +11760,12 @@ i32.const 1 end ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 299 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|1 (; 314 ;) (type $FUNCSIG$idii) (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 f64.const 2 f64.eq ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 300 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64> (; 315 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -14451,15 +11776,15 @@ local.get $0 i32.const 0 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 99 call $~lib/typedarray/Float64Array#every @@ -14470,10 +11795,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 395 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $0 @@ -14487,14 +11812,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 398 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 301 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 (; 316 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14513,11 +11838,11 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -14525,64 +11850,47 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf local.get $2 - i32.eq - i32.eqz - if - i32.const 848 - i32.const 8 - i32.const 427 - i32.const 4 - call $~lib/env/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - ) - (func $~lib/typedarray/Int8Array#forEach (; 302 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.16 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + i32.eq + i32.eqz + if + i32.const 1032 + i32.const 24 + i32.const 427 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $~lib/typedarray/Int8Array#forEach (; 317 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Int8Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -14590,38 +11898,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_s offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_s + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 303 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8> (; 318 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14640,7 +11938,7 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues @@ -14650,7 +11948,7 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues @@ -14660,7 +11958,7 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $0 i32.const 101 call $~lib/typedarray/Int8Array#forEach @@ -14669,15 +11967,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 304 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8>~anonymous|0 (; 319 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14692,11 +11990,11 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -14704,11 +12002,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -14716,11 +12014,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -14728,40 +12026,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8Array#forEach (; 305 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8Array#forEach (; 320 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.14 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Uint8Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -14769,38 +12050,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.19 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 306 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8Array,u8> (; 321 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -14817,7 +12088,7 @@ call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues @@ -14825,7 +12096,7 @@ call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues @@ -14833,7 +12104,7 @@ call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $0 i32.const 102 call $~lib/typedarray/Uint8Array#forEach @@ -14842,15 +12113,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 307 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8>~anonymous|0 (; 322 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -14865,11 +12136,11 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -14877,11 +12148,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -14889,11 +12160,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -14901,40 +12172,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint8ClampedArray#forEach (; 308 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint8ClampedArray#forEach (; 323 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.15 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 0 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Uint8ClampedArray#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -14942,38 +12196,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.20 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - i32.load8_u offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 0 + i32.shl + i32.add + i32.load8_u + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 309 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint8ClampedArray,u8> (; 324 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15015,15 +12259,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 310 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 (; 325 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -15042,11 +12286,11 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -15054,11 +12298,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -15066,11 +12310,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -15078,40 +12322,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int16Array#forEach (; 311 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#forEach (; 326 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Int16Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -15119,38 +12346,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - i32.load16_s offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 312 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16> (; 327 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15169,7 +12386,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues @@ -15179,7 +12396,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues @@ -15189,7 +12406,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 104 call $~lib/typedarray/Int16Array#forEach @@ -15198,15 +12415,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 313 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16>~anonymous|0 (; 328 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -15221,11 +12438,11 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -15233,11 +12450,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -15245,11 +12462,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -15257,40 +12474,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint16Array#forEach (; 314 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint16Array#forEach (; 329 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 1 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Uint16Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -15298,38 +12498,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - i32.load16_u offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 315 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint16Array,u16> (; 330 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15346,7 +12536,7 @@ call $~lib/array/Array#__get i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues @@ -15354,7 +12544,7 @@ call $~lib/array/Array#__get i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues @@ -15362,7 +12552,7 @@ call $~lib/array/Array#__get i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 105 call $~lib/typedarray/Uint16Array#forEach @@ -15371,15 +12561,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 316 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 (; 331 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -15390,11 +12580,11 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -15402,11 +12592,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -15414,11 +12604,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -15426,40 +12616,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int32Array#forEach (; 317 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int32Array#forEach (; 332 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.15 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Int32Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -15467,38 +12640,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 318 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32> (; 333 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15513,19 +12676,19 @@ global.get $std/typedarray/forEachValues i32.const 0 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues i32.const 1 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues i32.const 2 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 106 call $~lib/typedarray/Int32Array#forEach @@ -15534,15 +12697,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 319 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32>~anonymous|0 (; 334 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -15553,11 +12716,11 @@ i32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -15565,11 +12728,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -15577,11 +12740,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -15589,40 +12752,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Uint32Array#forEach (; 320 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Uint32Array#forEach (; 335 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Uint32Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -15630,38 +12776,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - i32.load offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$viii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 321 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint32Array,u32> (; 336 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15676,19 +12812,19 @@ global.get $std/typedarray/forEachValues i32.const 0 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues i32.const 1 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues i32.const 2 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 107 call $~lib/typedarray/Uint32Array#forEach @@ -15697,15 +12833,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 322 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 (; 337 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -15717,11 +12853,11 @@ i64.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -15729,11 +12865,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -15741,11 +12877,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -15753,40 +12889,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Int64Array#forEach (; 323 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int64Array#forEach (; 338 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Int64Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -15794,38 +12913,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i64) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$vjii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 324 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64> (; 339 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -15841,21 +12950,21 @@ i32.const 0 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues i32.const 1 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues i32.const 2 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 108 call $~lib/typedarray/Int64Array#forEach @@ -15864,15 +12973,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 325 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64>~anonymous|0 (; 340 ;) (type $FUNCSIG$vjii) (param $0 i64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -15884,11 +12993,11 @@ i64.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -15896,64 +13005,47 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf local.get $2 - i32.eq - i32.eqz - if - i32.const 848 - i32.const 8 - i32.const 427 - i32.const 4 - call $~lib/env/abort - unreachable - end - global.get $std/typedarray/forEachCallCount - i32.const 1 - i32.add - global.set $std/typedarray/forEachCallCount - ) - (func $~lib/typedarray/Uint64Array#forEach (; 326 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 + i32.eq + i32.eqz + if + i32.const 1032 + i32.const 24 + i32.const 427 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + global.get $std/typedarray/forEachCallCount + i32.const 1 + i32.add + global.set $std/typedarray/forEachCallCount + ) + (func $~lib/typedarray/Uint64Array#forEach (; 341 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + local.get $0 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Uint64Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -15961,38 +13053,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result i64) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - i64.load offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + i64.load + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$vjii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 327 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Uint64Array,u64> (; 342 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -16008,21 +13090,21 @@ i32.const 0 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues i32.const 1 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues i32.const 2 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 109 call $~lib/typedarray/Uint64Array#forEach @@ -16031,15 +13113,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 328 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 (; 343 ;) (type $FUNCSIG$vfii) (param $0 f32) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -16051,11 +13133,11 @@ f32.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -16063,11 +13145,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -16075,11 +13157,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -16087,40 +13169,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float32Array#forEach (; 329 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float32Array#forEach (; 344 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 2 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Float32Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -16128,38 +13193,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.10 (result f32) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - f32.load offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$vfii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 330 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32> (; 345 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -16175,21 +13230,21 @@ i32.const 0 call $~lib/array/Array#__get f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues i32.const 1 call $~lib/array/Array#__get f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues i32.const 2 call $~lib/array/Array#__get f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 110 call $~lib/typedarray/Float32Array#forEach @@ -16198,15 +13253,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 331 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0 (; 346 ;) (type $FUNCSIG$vdii) (param $0 f64) (param $1 i32) (param $2 i32) (local $3 i32) global.get $std/typedarray/forEachValues local.get $1 @@ -16218,11 +13273,11 @@ f64.eq i32.eqz if - i32.const 752 - i32.const 8 + i32.const 904 + i32.const 24 i32.const 425 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $1 @@ -16230,11 +13285,11 @@ i32.eq i32.eqz if - i32.const 800 - i32.const 8 + i32.const 968 + i32.const 24 i32.const 426 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachSelf @@ -16242,11 +13297,11 @@ i32.eq i32.eqz if - i32.const 848 - i32.const 8 + i32.const 1032 + i32.const 24 i32.const 427 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/forEachCallCount @@ -16254,40 +13309,23 @@ i32.add global.set $std/typedarray/forEachCallCount ) - (func $~lib/typedarray/Float64Array#forEach (; 332 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Float64Array#forEach (; 347 ;) (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 $0 - local.set $2 - local.get $1 - local.set $3 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.10 (result i32) - local.get $2 - local.set $4 - local.get $4 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - local.set $4 - local.get $2 - i32.load - local.set $5 - local.get $2 i32.load offset=4 - local.set $6 + local.set $3 block $break|0 - i32.const 0 - local.set $7 + block + i32.const 0 + local.set $2 + local.get $0 + call $~lib/typedarray/Float64Array#get:length + local.set $4 + end loop $repeat|0 - local.get $7 + local.get $2 local.get $4 i32.lt_s i32.eqz @@ -16295,38 +13333,28 @@ block i32.const 3 global.set $~lib/argc - block $~lib/internal/arraybuffer/LOAD|inlined.22 (result f64) - local.get $5 - local.set $8 - local.get $7 - local.set $9 - local.get $6 - local.set $10 - local.get $8 - local.get $9 - i32.const 3 - i32.shl - i32.add - local.get $10 - i32.add - f64.load offset=8 - end - local.get $7 - local.get $2 local.get $3 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.get $2 + local.get $0 + local.get $1 call_indirect (type $FUNCSIG$vdii) end - local.get $7 + local.get $2 i32.const 1 i32.add - local.set $7 + local.set $2 br $repeat|0 unreachable end unreachable end ) - (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 333 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64> (; 348 ;) (type $FUNCSIG$v) (local $0 i32) i32.const 0 global.set $std/typedarray/forEachCallCount @@ -16342,21 +13370,21 @@ i32.const 0 call $~lib/array/Array#__get f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 global.get $std/typedarray/forEachValues i32.const 1 call $~lib/array/Array#__get f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 global.get $std/typedarray/forEachValues i32.const 2 call $~lib/array/Array#__get f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 111 call $~lib/typedarray/Float64Array#forEach @@ -16365,15 +13393,15 @@ i32.eq i32.eqz if - i32.const 920 - i32.const 8 + i32.const 1112 + i32.const 24 i32.const 430 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int8Array#reverse (; 334 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int8Array#reverse (; 349 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16381,121 +13409,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.17 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Int8Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_s offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_s offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store8 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store8 offset=8 - end - end - block + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 - i32.const 1 + i32.const 0 + i32.shl i32.add - local.set $4 + local.set $6 + local.get $5 + i32.load8_s + local.set $7 local.get $5 + local.get $6 + i32.load8_s + i32.store8 + local.get $6 + local.get $7 + i32.store8 + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -16504,7 +13471,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 335 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> (; 350 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16541,7 +13508,7 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set local.get $2 local.get $3 local.get $0 @@ -16551,7 +13518,7 @@ i32.shl i32.const 24 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set end local.get $3 i32.const 1 @@ -16576,11 +13543,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get local.get $0 i32.const 8 local.get $3 @@ -16593,11 +13556,11 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -16617,78 +13580,62 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8Array#reverse (; 336 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8Array#reverse (; 351 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -16696,121 +13643,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.16 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint8Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.21 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.22 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_u offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store8 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store8 offset=8 - end + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 0 + i32.shl + i32.add + local.set $6 + local.get $5 + i32.load8_u + local.set $7 + local.get $5 + local.get $6 + i32.load8_u + i32.store8 + local.get $6 + local.get $7 + i32.store8 end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -16819,27 +13705,25 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8Array#subarray (; 337 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array#subarray (; 352 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.17 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Uint8Array#get:length local.set $6 local.get $4 i32.const 0 @@ -16867,12 +13751,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -16881,9 +13765,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -16898,38 +13782,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.5 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.5 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 0 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 0 i32.shl i32.store offset=8 local.get $7 + i32.const 18 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 338 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> (; 353 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -16964,7 +13869,7 @@ call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set local.get $2 local.get $3 local.get $0 @@ -16972,7 +13877,7 @@ call $~lib/array/Array#__get i32.const 255 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint8Array#__set end local.get $3 i32.const 1 @@ -16997,9 +13902,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get local.get $0 i32.const 8 local.get $3 @@ -17010,11 +13913,11 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -17034,70 +13937,62 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint8ClampedArray#reverse (; 339 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#reverse (; 354 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17105,121 +14000,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.18 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint8ClampedArray#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 - local.get $4 - local.get $5 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.23 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 0 - i32.shl - i32.add - local.get $8 - i32.add - i32.load8_u offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.24 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 0 - i32.shl - i32.add - local.get $11 - i32.add - i32.load8_u offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 0 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store8 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 0 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store8 offset=8 - end - end + local.get $3 + local.get $4 + i32.lt_s + i32.eqz + br_if $break|0 block + local.get $2 + local.get $3 + i32.const 0 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 - i32.const 1 + i32.const 0 + i32.shl i32.add - local.set $4 + local.set $6 local.get $5 + i32.load8_u + local.set $7 + local.get $5 + local.get $6 + i32.load8_u + i32.store8 + local.get $6 + local.get $7 + i32.store8 + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -17228,27 +14062,25 @@ end local.get $1 ) - (func $~lib/typedarray/Uint8ClampedArray#subarray (; 340 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8ClampedArray#subarray (; 355 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.19 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Uint8ClampedArray#get:length local.set $6 local.get $4 i32.const 0 @@ -17276,12 +14108,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -17290,9 +14122,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -17307,38 +14139,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.6 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.6 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 0 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 0 i32.shl i32.store offset=8 local.get $7 + i32.const 19 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 341 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> (; 356 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17406,9 +14259,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get local.get $0 i32.const 8 local.get $3 @@ -17419,11 +14270,11 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -17443,70 +14294,62 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int16Array#reverse (; 342 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#reverse (; 357 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17514,121 +14357,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Int16Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_s offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.add - i32.load16_s offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store16 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store16 offset=8 - end - end - block + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 i32.const 1 + i32.shl i32.add - local.set $4 + local.set $6 + local.get $5 + i32.load16_s + local.set $7 local.get $5 + local.get $6 + i32.load16_s + i32.store16 + local.get $6 + local.get $7 + i32.store16 + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -17637,27 +14419,25 @@ end local.get $1 ) - (func $~lib/typedarray/Int16Array#subarray (; 343 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int16Array#subarray (; 358 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Int16Array#get:length local.set $6 local.get $4 i32.const 0 @@ -17685,12 +14465,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -17699,9 +14479,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -17716,38 +14496,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.7 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.7 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 1 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 1 i32.shl i32.store offset=8 local.get $7 + i32.const 20 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 344 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> (; 359 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -17784,7 +14585,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set local.get $2 local.get $3 local.get $0 @@ -17794,7 +14595,7 @@ i32.shl i32.const 16 i32.shr_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int16Array#__set end local.get $3 i32.const 1 @@ -17819,11 +14620,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + call $~lib/typedarray/Int16Array#__get local.get $0 i32.const 8 local.get $3 @@ -17836,11 +14633,11 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -17859,79 +14656,63 @@ call $~lib/typedarray/Int16Array#reverse local.set $4 local.get $4 - i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + i32.const 0 + call $~lib/typedarray/Int16Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + call $~lib/typedarray/Int16Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + call $~lib/typedarray/Int16Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s + call $~lib/typedarray/Int16Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint16Array#reverse (; 345 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#reverse (; 360 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -17939,121 +14720,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint16Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 1 - i32.shl - i32.add - local.get $8 - i32.add - i32.load16_u offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.0 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 1 - i32.shl - i32.add - local.get $11 - i32.add - i32.load16_u offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 1 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store16 offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.1 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 1 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store16 offset=8 - end - end - block + local.get $2 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 i32.const 1 + i32.shl i32.add - local.set $4 + local.set $6 + local.get $5 + i32.load16_u + local.set $7 local.get $5 + local.get $6 + i32.load16_u + i32.store16 + local.get $6 + local.get $7 + i32.store16 + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -18062,27 +14782,25 @@ end local.get $1 ) - (func $~lib/typedarray/Uint16Array#subarray (; 346 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint16Array#subarray (; 361 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 1 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Uint16Array#get:length local.set $6 local.get $4 i32.const 0 @@ -18110,12 +14828,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -18124,9 +14842,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -18141,38 +14859,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.8 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.8 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 1 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 1 i32.shl i32.store offset=8 local.get $7 + i32.const 21 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 347 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> (; 362 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18207,7 +14946,7 @@ call $~lib/array/Array#__get i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set local.get $2 local.get $3 local.get $0 @@ -18215,7 +14954,7 @@ call $~lib/array/Array#__get i32.const 65535 i32.and - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint16Array#__set end local.get $3 i32.const 1 @@ -18240,9 +14979,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get local.get $0 i32.const 8 local.get $3 @@ -18253,11 +14990,11 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -18277,70 +15014,62 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 65535 - i32.and + call $~lib/typedarray/Uint16Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Int32Array#reverse (; 348 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Int32Array#reverse (; 363 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18348,121 +15077,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.16 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.13 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.4 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store offset=8 - end + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.set $6 + local.get $5 + i32.load + local.set $7 + local.get $5 + local.get $6 + i32.load + i32.store + local.get $6 + local.get $7 + i32.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -18471,7 +15139,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 349 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> (; 364 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18504,13 +15172,13 @@ local.get $0 local.get $3 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $2 local.get $3 local.get $0 local.get $3 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set end local.get $3 i32.const 1 @@ -18535,7 +15203,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get local.get $0 i32.const 8 local.get $3 @@ -18544,11 +15212,11 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -18568,62 +15236,62 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint32Array#reverse (; 350 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#reverse (; 365 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -18631,121 +15299,60 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - (local $11 i32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - i32.load offset=8 - end - local.set $8 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $7 - local.get $4 - local.set $6 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i32) - local.get $2 - local.set $9 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $9 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - i32.load offset=8 - end - local.set $11 - local.get $3 - local.set $10 - local.get $7 - local.get $6 - i32.const 2 - i32.shl - i32.add - local.get $10 - i32.add - local.get $11 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $10 - local.get $5 - local.set $11 - local.get $8 - local.set $6 - local.get $3 - local.set $7 - local.get $10 - local.get $11 - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.add - local.get $6 - i32.store offset=8 - end + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.set $6 + local.get $5 + i32.load + local.set $7 + local.get $5 + local.get $6 + i32.load + i32.store + local.get $6 + local.get $7 + i32.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -18754,27 +15361,25 @@ end local.get $1 ) - (func $~lib/typedarray/Uint32Array#subarray (; 351 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint32Array#subarray (; 366 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Uint32Array#get:length local.set $6 local.get $4 i32.const 0 @@ -18802,12 +15407,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -18816,9 +15421,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -18833,38 +15438,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.9 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.9 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 2 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 2 i32.shl i32.store offset=8 local.get $7 + i32.const 23 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 352 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> (; 367 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -18897,13 +15523,13 @@ local.get $0 local.get $3 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set local.get $2 local.get $3 local.get $0 local.get $3 call $~lib/array/Array#__get - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint32Array#__set end local.get $3 i32.const 1 @@ -18928,7 +15554,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get local.get $0 i32.const 8 local.get $3 @@ -18937,11 +15563,11 @@ i32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -18961,185 +15587,123 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 8 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 7 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint32Array#__get i32.const 6 i32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort - unreachable - end - local.get $4 - i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 5 - i32.eq - i32.eqz - if - i32.const 1128 - i32.const 8 - i32.const 469 - i32.const 2 - call $~lib/env/abort - unreachable - end - ) - (func $~lib/typedarray/Int64Array#reverse (; 353 ;) (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 $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (local $12 i64) - local.get $0 - local.set $1 - local.get $1 - i32.load - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - block $break|0 - block - i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - i32.const 1 - i32.sub - local.set $5 - end - loop $repeat|0 - local.get $4 - local.get $5 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i64) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.set $9 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - local.get $4 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i64) - local.get $2 - local.set $6 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $6 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - i64.load offset=8 - end - local.set $12 - local.get $3 - local.set $11 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $11 - local.get $5 - local.set $7 - local.get $9 - local.set $12 - local.get $3 - local.set $8 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $12 - i64.store offset=8 - end - end + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 3 + call $~lib/typedarray/Uint32Array#__get + i32.const 5 + i32.eq + i32.eqz + if + i32.const 1360 + i32.const 24 + i32.const 469 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + ) + (func $~lib/typedarray/Int64Array#reverse (; 368 ;) (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 $7 i64) + local.get $0 + local.set $1 + local.get $1 + i32.load offset=4 + local.set $2 + block $break|0 + block + i32.const 0 + local.set $3 + local.get $1 + call $~lib/typedarray/Int64Array#get:length + i32.const 1 + i32.sub + local.set $4 + end + loop $repeat|0 + local.get $3 + local.get $4 + i32.lt_s + i32.eqz + br_if $break|0 block + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 - i32.const 1 + i32.const 3 + i32.shl i32.add - local.set $4 + local.set $6 + local.get $5 + i64.load + local.set $7 local.get $5 + local.get $6 + i64.load + i64.store + local.get $6 + local.get $7 + i64.store + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -19148,27 +15712,25 @@ end local.get $1 ) - (func $~lib/typedarray/Int64Array#subarray (; 354 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int64Array#subarray (; 369 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Int64Array#get:length local.set $6 local.get $4 i32.const 0 @@ -19196,12 +15758,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -19210,9 +15772,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -19227,38 +15789,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.10 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.10 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 3 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 3 i32.shl i32.store offset=8 local.get $7 + i32.const 24 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 355 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> (; 370 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19292,14 +15875,14 @@ local.get $3 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set local.get $2 local.get $3 local.get $0 local.get $3 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int64Array#__set end local.get $3 i32.const 1 @@ -19324,7 +15907,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get local.get $0 i32.const 8 local.get $3 @@ -19334,11 +15917,11 @@ i64.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -19358,185 +15941,123 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 8 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 7 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 6 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int64Array#__get i64.const 5 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Uint64Array#reverse (; 356 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#reverse (; 371 ;) (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 $7 i32) - (local $8 i32) - (local $9 i64) - (local $10 i32) - (local $11 i32) - (local $12 i64) + (local $7 i64) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Uint64Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result i64) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - i64.load offset=8 - end - local.set $9 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - local.get $4 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result i64) - local.get $2 - local.set $6 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $6 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - i64.load offset=8 - end - local.set $12 - local.get $3 - local.set $11 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - i64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $11 - local.get $5 - local.set $7 - local.get $9 - local.set $12 - local.get $3 - local.set $8 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $12 - i64.store offset=8 - end + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 3 + i32.shl + i32.add + local.set $6 + local.get $5 + i64.load + local.set $7 + local.get $5 + local.get $6 + i64.load + i64.store + local.get $6 + local.get $7 + i64.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -19545,27 +16066,25 @@ end local.get $1 ) - (func $~lib/typedarray/Uint64Array#subarray (; 357 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint64Array#subarray (; 372 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Uint64Array#get:length local.set $6 local.get $4 i32.const 0 @@ -19593,12 +16112,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -19607,9 +16126,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -19624,38 +16143,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.11 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.11 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 3 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 3 i32.shl i32.store offset=8 local.get $7 + i32.const 25 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 358 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> (; 373 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -19689,14 +16229,14 @@ local.get $3 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set local.get $2 local.get $3 local.get $0 local.get $3 call $~lib/array/Array#__get i64.extend_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Uint64Array#__set end local.get $3 i32.const 1 @@ -19721,7 +16261,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get local.get $0 i32.const 8 local.get $3 @@ -19731,11 +16271,11 @@ i64.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -19755,185 +16295,123 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 8 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 7 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 6 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Uint64Array#__get i64.const 5 i64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Float32Array#reverse (; 359 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#reverse (; 374 ;) (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 $7 i32) - (local $8 i32) - (local $9 f32) - (local $10 i32) - (local $11 i32) - (local $12 f32) + (local $7 f32) local.get $0 local.set $1 local.get $1 - i32.load - local.set $2 - local.get $1 i32.load offset=4 - local.set $3 + local.set $2 block $break|0 block i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $1 + call $~lib/typedarray/Float32Array#get:length i32.const 1 i32.sub - local.set $5 + local.set $4 end loop $repeat|0 + local.get $3 local.get $4 - local.get $5 i32.lt_s i32.eqz br_if $break|0 block - block $~lib/internal/arraybuffer/LOAD|inlined.11 (result f32) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - f32.load offset=8 - end - local.set $9 - block $~lib/internal/arraybuffer/STORE|inlined.2 - local.get $2 - local.set $8 - local.get $4 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.12 (result f32) - local.get $2 - local.set $6 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $6 - local.get $10 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - f32.load offset=8 - end - local.set $12 - local.get $3 - local.set $11 - local.get $8 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.3 - local.get $2 - local.set $11 - local.get $5 - local.set $7 - local.get $9 - local.set $12 - local.get $3 - local.set $8 - local.get $11 - local.get $7 - i32.const 2 - i32.shl - i32.add - local.get $8 - i32.add - local.get $12 - f32.store offset=8 - end + local.get $2 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.set $5 + local.get $2 + local.get $4 + i32.const 2 + i32.shl + i32.add + local.set $6 + local.get $5 + f32.load + local.set $7 + local.get $5 + local.get $6 + f32.load + f32.store + local.get $6 + local.get $7 + f32.store end block - local.get $4 + local.get $3 i32.const 1 i32.add - local.set $4 - local.get $5 + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -19942,27 +16420,25 @@ end local.get $1 ) - (func $~lib/typedarray/Float32Array#subarray (; 360 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Float32Array#subarray (; 375 ;) (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 $9 i32) + (local $10 i32) + (local $11 i32) + (local $12 i32) local.get $0 - local.set $3 + local.set $5 local.get $1 local.set $4 local.get $2 - local.set $5 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - local.get $3 - local.set $6 - local.get $6 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + local.set $3 + local.get $5 + call $~lib/typedarray/Float32Array#get:length local.set $6 local.get $4 i32.const 0 @@ -19990,12 +16466,12 @@ select local.set $4 end - local.get $5 + local.get $3 i32.const 0 i32.lt_s if local.get $6 - local.get $5 + local.get $3 i32.add local.tee $7 local.get $4 @@ -20004,9 +16480,9 @@ local.get $8 i32.gt_s select - local.set $5 + local.set $3 else - local.get $5 + local.get $3 local.tee $7 local.get $6 local.tee $8 @@ -20021,38 +16497,59 @@ local.get $8 i32.gt_s select - local.set $5 - end - block $~lib/memory/memory.allocate|inlined.12 (result i32) - i32.const 12 - local.set $7 - local.get $7 - call $~lib/allocator/arena/__memory_allocate - br $~lib/memory/memory.allocate|inlined.12 + local.set $3 end + i32.const 12 + call $~lib/util/runtime/allocate local.set $7 + local.get $5 + i32.load + local.set $8 + local.get $5 + i32.load offset=4 + local.set $9 local.get $7 - local.get $3 + local.tee $10 + local.get $8 + local.tee $11 + local.get $10 i32.load + local.tee $12 + i32.ne + if (result i32) + local.get $12 + if + local.get $12 + local.get $10 + call $~lib/collector/dummy/__ref_unlink + end + local.get $11 + local.get $10 + call $~lib/collector/dummy/__ref_link + local.get $11 + else + local.get $11 + end i32.store local.get $7 - local.get $3 - i32.load offset=4 + local.get $9 local.get $4 i32.const 2 i32.shl i32.add i32.store offset=4 local.get $7 - local.get $5 + local.get $3 local.get $4 i32.sub i32.const 2 i32.shl i32.store offset=8 local.get $7 + i32.const 26 + call $~lib/util/runtime/register ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 361 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> (; 376 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20086,14 +16583,14 @@ local.get $3 call $~lib/array/Array#__get f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set local.get $2 local.get $3 local.get $0 local.get $3 call $~lib/array/Array#__get f32.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float32Array#__set end local.get $3 i32.const 1 @@ -20118,7 +16615,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get local.get $0 i32.const 8 local.get $3 @@ -20128,11 +16625,11 @@ f32.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -20152,185 +16649,123 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 8 f32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 7 f32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 6 f32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float32Array#__get f32.const 5 f32.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $~lib/typedarray/Float64Array#reverse (; 362 ;) (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 $7 i32) - (local $8 i32) - (local $9 f64) - (local $10 i32) - (local $11 i32) - (local $12 f64) - local.get $0 - local.set $1 - local.get $1 - i32.load - local.set $2 - local.get $1 - i32.load offset=4 - local.set $3 - block $break|0 - block - i32.const 0 - local.set $4 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.11 (result i32) - local.get $1 - local.set $5 - local.get $5 - i32.load offset=8 - i32.const 3 - i32.shr_u - end - i32.const 1 - i32.sub - local.set $5 - end - loop $repeat|0 - local.get $4 - local.get $5 - i32.lt_s - i32.eqz - br_if $break|0 - block - block $~lib/internal/arraybuffer/LOAD|inlined.23 (result f64) - local.get $2 - local.set $6 - local.get $4 - local.set $7 - local.get $3 - local.set $8 - local.get $6 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - f64.load offset=8 - end - local.set $9 - block $~lib/internal/arraybuffer/STORE|inlined.14 - local.get $2 - local.set $8 - local.get $4 - local.set $7 - block $~lib/internal/arraybuffer/LOAD|inlined.24 (result f64) - local.get $2 - local.set $6 - local.get $5 - local.set $10 - local.get $3 - local.set $11 - local.get $6 - local.get $10 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - f64.load offset=8 - end - local.set $12 - local.get $3 - local.set $11 - local.get $8 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $11 - i32.add - local.get $12 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/STORE|inlined.15 - local.get $2 - local.set $11 - local.get $5 - local.set $7 - local.get $9 - local.set $12 - local.get $3 - local.set $8 - local.get $11 - local.get $7 - i32.const 3 - i32.shl - i32.add - local.get $8 - i32.add - local.get $12 - f64.store offset=8 - end - end + (func $~lib/typedarray/Float64Array#reverse (; 377 ;) (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 $7 f64) + local.get $0 + local.set $1 + local.get $1 + i32.load offset=4 + local.set $2 + block $break|0 + block + i32.const 0 + local.set $3 + local.get $1 + call $~lib/typedarray/Float64Array#get:length + i32.const 1 + i32.sub + local.set $4 + end + loop $repeat|0 + local.get $3 + local.get $4 + i32.lt_s + i32.eqz + br_if $break|0 block + local.get $2 + local.get $3 + i32.const 3 + i32.shl + i32.add + local.set $5 + local.get $2 local.get $4 - i32.const 1 + i32.const 3 + i32.shl i32.add - local.set $4 + local.set $6 + local.get $5 + f64.load + local.set $7 local.get $5 + local.get $6 + f64.load + f64.store + local.get $6 + local.get $7 + f64.store + end + block + local.get $3 + i32.const 1 + i32.add + local.set $3 + local.get $4 i32.const 1 i32.sub - local.set $5 + local.set $4 end br $repeat|0 unreachable @@ -20339,7 +16774,7 @@ end local.get $1 ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 363 ;) (type $FUNCSIG$v) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> (; 378 ;) (type $FUNCSIG$v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -20373,14 +16808,14 @@ local.get $3 call $~lib/array/Array#__get f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set local.get $2 local.get $3 local.get $0 local.get $3 call $~lib/array/Array#__get f64.convert_i32_s - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set end local.get $3 i32.const 1 @@ -20405,7 +16840,7 @@ br_if $break|1 local.get $1 local.get $3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get local.get $0 i32.const 8 local.get $3 @@ -20415,11 +16850,11 @@ f64.eq i32.eqz if - i32.const 1056 - i32.const 8 + i32.const 1272 + i32.const 24 i32.const 461 i32.const 4 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $3 @@ -20439,73 +16874,72 @@ local.set $4 local.get $4 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 8 f64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 466 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 467 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 6 f64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 468 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end local.get $4 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 5 f64.eq i32.eqz if - i32.const 1128 - i32.const 8 + i32.const 1360 + i32.const 24 i32.const 469 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) - (func $start:std/typedarray (; 364 ;) (type $FUNCSIG$v) - (local $0 i32) + (func $start:std/typedarray (; 379 ;) (type $FUNCSIG$v) global.get $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 - i32.const 1 + i32.const 24 + i32.const 3 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT @@ -20514,10 +16948,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 2 + i32.const 24 + i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint8ClampedArray.BYTES_PER_ELEMENT @@ -20526,10 +16960,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 3 + i32.const 24 + i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Int16Array.BYTES_PER_ELEMENT @@ -20538,10 +16972,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 4 + i32.const 24 + i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint16Array.BYTES_PER_ELEMENT @@ -20550,10 +16984,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 5 + i32.const 24 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Int32Array.BYTES_PER_ELEMENT @@ -20562,10 +16996,10 @@ i32.eqz if i32.const 0 + i32.const 24 i32.const 8 - i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint32Array.BYTES_PER_ELEMENT @@ -20574,10 +17008,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 7 + i32.const 24 + i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Int64Array.BYTES_PER_ELEMENT @@ -20586,10 +17020,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 8 + i32.const 24 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Uint64Array.BYTES_PER_ELEMENT @@ -20598,10 +17032,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 9 + i32.const 24 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Float32Array.BYTES_PER_ELEMENT @@ -20610,10 +17044,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 10 + i32.const 24 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $~lib/typedarray/Float64Array.BYTES_PER_ELEMENT @@ -20622,13 +17056,22 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 11 + i32.const 24 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - call $start:~lib/allocator/arena + 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 i32.const 0 call $std/typedarray/testInstantiate i32.const 5 @@ -20640,49 +17083,43 @@ global.get $std/typedarray/arr i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set - block $~lib/internal/typedarray/TypedArray#get:length|inlined.1 (result i32) - global.get $std/typedarray/arr - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + call $~lib/typedarray/Int32Array#__set + global.get $std/typedarray/arr + call $~lib/typedarray/Int32Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 96 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 97 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.const 4 i32.mul @@ -20690,52 +17127,52 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 98 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 99 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 100 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 101 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr @@ -20743,27 +17180,21 @@ i32.const 2 call $~lib/typedarray/Int32Array#subarray global.set $std/typedarray/arr - block $~lib/internal/typedarray/TypedArray#get:length|inlined.3 (result i32) - global.get $std/typedarray/arr - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + global.get $std/typedarray/arr + call $~lib/typedarray/Int32Array#get:length i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 104 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.const 4 i32.mul @@ -20771,14 +17202,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 105 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 1 i32.const 4 i32.mul @@ -20786,24 +17217,24 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 106 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 107 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -20813,61 +17244,55 @@ global.get $std/typedarray/af64 i32.const 0 f64.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 1 f64.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 2 f64.const 7 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 3 f64.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 4 f64.const 5 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 5 f64.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 6 f64.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 7 f64.const 8 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Float64Array#__set global.get $std/typedarray/af64 i32.const 2 i32.const 6 call $~lib/typedarray/Float64Array#subarray global.set $std/typedarray/af64 - block $~lib/internal/typedarray/TypedArray#get:length|inlined.2 (result i32) - global.get $std/typedarray/af64 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - end + global.get $std/typedarray/af64 + call $~lib/typedarray/Float64Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 121 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/af64 - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 2 i32.const 8 i32.mul @@ -20875,14 +17300,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 122 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/af64 - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 4 i32.const 8 i32.mul @@ -20890,10 +17315,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 123 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block (result i32) @@ -20906,46 +17331,43 @@ drop global.get $std/typedarray/af64 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 4 f64.eq - local.tee $0 if (result i32) global.get $std/typedarray/af64 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 5 f64.eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/typedarray/af64 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 6 f64.eq else - local.get $0 + i32.const 0 end - local.tee $0 if (result i32) global.get $std/typedarray/af64 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__get + call $~lib/typedarray/Float64Array#__get f64.const 7 f64.eq else - local.get $0 + i32.const 0 end i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 125 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -20966,50 +17388,44 @@ call $~lib/typedarray/Uint8ClampedArray#__set global.get $std/typedarray/clampedArr i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 0 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 132 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/clampedArr i32.const 1 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 133 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/clampedArr i32.const 2 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 255 - i32.and + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 255 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 134 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -21019,23 +17435,23 @@ global.get $std/typedarray/arr8 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 3 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/arr8 i32.const 1 i32.const 1 @@ -21043,37 +17459,41 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 192 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 248 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 144 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/typedarray/arr8 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline - end + global.get $std/typedarray/arr8 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 216 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 320 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 147 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -21083,37 +17503,41 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 240 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 344 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 150 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/typedarray/arr8 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline - end + global.get $std/typedarray/arr8 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 264 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 368 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 153 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -21123,15 +17547,19 @@ call $~lib/typedarray/Int8Array#fill drop global.get $std/typedarray/arr8 - i32.const 288 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 392 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 156 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 @@ -21139,83 +17567,81 @@ i32.const 4 call $~lib/typedarray/Int8Array#subarray global.set $std/typedarray/sub8 - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/typedarray/sub8 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int8Array#fill|trampoline - end + global.get $std/typedarray/sub8 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int8Array#fill drop - block $~lib/internal/typedarray/TypedArray#get:length|inlined.6 (result i32) - global.get $std/typedarray/sub8 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + global.get $std/typedarray/sub8 + call $~lib/typedarray/Int8Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 160 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 161 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 162 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub8 - i32.const 312 + i32.const 3 + i32.const 0 + i32.const 28 + i32.const 416 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 163 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr8 - i32.const 336 + i32.const 5 + i32.const 0 + i32.const 28 + i32.const 440 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt8ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 164 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -21225,23 +17651,23 @@ global.get $std/typedarray/arr32 i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 3 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int32Array#__set global.get $std/typedarray/arr32 i32.const 1 i32.const 1 @@ -21249,37 +17675,41 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 376 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 464 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 174 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/typedarray/arr32 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline - end + global.get $std/typedarray/arr32 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 416 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 504 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 177 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -21289,37 +17719,41 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 456 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 544 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 180 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block (result i32) - i32.const 2 - global.set $~lib/argc - global.get $std/typedarray/arr32 - i32.const 2 - i32.const -2 - i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline - end + global.get $std/typedarray/arr32 + i32.const 2 + i32.const -2 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 496 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 584 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 183 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -21329,15 +17763,19 @@ call $~lib/typedarray/Int32Array#fill drop global.get $std/typedarray/arr32 - i32.const 536 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 624 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 186 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 @@ -21345,37 +17783,27 @@ i32.const 4 call $~lib/typedarray/Int32Array#subarray global.set $std/typedarray/sub32 - block (result i32) - i32.const 1 - global.set $~lib/argc - global.get $std/typedarray/sub32 - i32.const 0 - i32.const 0 - i32.const 0 - call $~lib/typedarray/Int32Array#fill|trampoline - end + global.get $std/typedarray/sub32 + i32.const 0 + i32.const 0 + global.get $~lib/builtins/i32.MAX_VALUE + call $~lib/typedarray/Int32Array#fill drop - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - global.get $std/typedarray/sub32 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - end + global.get $std/typedarray/sub32 + call $~lib/typedarray/Int32Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 190 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.const 4 i32.mul @@ -21383,14 +17811,14 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 191 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.const 4 i32.mul @@ -21398,34 +17826,42 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 192 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/sub32 - i32.const 576 + i32.const 3 + i32.const 2 + i32.const 29 + i32.const 664 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 193 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/arr32 - i32.const 616 + i32.const 5 + i32.const 2 + i32.const 29 + i32.const 696 + call $~lib/util/runtime/makeArray call $std/typedarray/isInt32ArrayEqual i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 194 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -21439,27 +17875,27 @@ global.get $std/typedarray/multisubarr i32.const 0 i32.const 1 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 1 i32.const 2 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 2 i32.const 3 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 3 i32.const 4 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 4 i32.const 5 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 5 i32.const 6 - call $~lib/internal/typedarray/TypedArray#__set + call $~lib/typedarray/Int8Array#__set global.get $std/typedarray/multisubarr i32.const 1 i32.const 6 @@ -21467,65 +17903,55 @@ global.set $std/typedarray/multisubarr1 global.get $std/typedarray/multisubarr1 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 211 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.7 (result i32) - global.get $std/typedarray/multisubarr1 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + global.get $std/typedarray/multisubarr1 + call $~lib/typedarray/Int8Array#get:length i32.const 5 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 212 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 1 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 213 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 5 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 214 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr1 @@ -21535,65 +17961,55 @@ global.set $std/typedarray/multisubarr2 global.get $std/typedarray/multisubarr2 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 217 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.8 (result i32) - global.get $std/typedarray/multisubarr2 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + global.get $std/typedarray/multisubarr2 + call $~lib/typedarray/Int8Array#get:length i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 218 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 2 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 219 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 220 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr2 @@ -21603,65 +18019,55 @@ global.set $std/typedarray/multisubarr3 global.get $std/typedarray/multisubarr3 i32.const 0 - call $~lib/internal/typedarray/TypedArray#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s + call $~lib/typedarray/Int8Array#__get i32.const 4 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 223 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end - block $~lib/internal/typedarray/TypedArray#get:length|inlined.9 (result i32) - global.get $std/typedarray/multisubarr3 - local.set $0 - local.get $0 - i32.load offset=8 - i32.const 0 - i32.shr_u - end + global.get $std/typedarray/multisubarr3 + call $~lib/typedarray/Int8Array#get:length i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 224 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 - i32.load offset=4 + call $~lib/arraybuffer/ArrayBufferView#get:byteOffset i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 225 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $std/typedarray/multisubarr3 - i32.load offset=8 + call $~lib/arraybuffer/ArrayBufferView#get:byteLength i32.const 3 i32.eq i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 226 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end call $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8> @@ -21753,9 +18159,237 @@ call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> ) - (func $start (; 365 ;) (type $FUNCSIG$v) + (func $~lib/runtime/runtime.instanceof (; 380 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load + local.set $2 + global.get $~lib/runtime/RTTI_BASE + local.set $3 + local.get $2 + if (result i32) + local.get $2 + local.get $3 + i32.load + i32.le_u + else + i32.const 0 + end + if + loop $continue|0 + local.get $2 + local.get $1 + i32.eq + if + i32.const 1 + return + end + local.get $3 + local.get $2 + i32.const 8 + i32.mul + i32.add + i32.load offset=4 + local.tee $2 + br_if $continue|0 + end + end + i32.const 0 + ) + (func $~lib/runtime/runtime.flags (; 381 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $~lib/runtime/runtime.newObject (; 382 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + local.get $0 + call $~lib/util/runtime/allocate + local.get $1 + call $~lib/util/runtime/register + ) + (func $~lib/runtime/runtime.newString (; 383 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 1 + i32.shl + i32.const 16 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/runtime/runtime.newArrayBuffer (; 384 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.const 15 + call $~lib/runtime/runtime.newObject + ) + (func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 385 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + global.get $~lib/util/runtime/HEADER_SIZE + i32.sub + i32.load offset=4 + ) + (func $~lib/runtime/runtime.newArray (; 386 ;) (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 $8 i32) + local.get $0 + call $~lib/runtime/runtime.flags + local.set $2 + local.get $2 + i32.const 16 + i32.div_u + i32.const 31 + i32.and + local.set $3 + local.get $1 + i32.eqz + if + i32.const 0 + local.tee $4 + call $~lib/runtime/runtime.newArrayBuffer + local.set $1 + else + local.get $1 + call $~lib/arraybuffer/ArrayBuffer#get:byteLength + local.set $4 + end + local.get $0 + i32.const 16 + call $~lib/runtime/runtime.newObject + local.set $5 + local.get $5 + local.tee $6 + local.get $1 + local.tee $7 + local.get $6 + i32.load + local.tee $8 + i32.ne + if (result i32) + local.get $8 + if + local.get $8 + local.get $6 + call $~lib/collector/dummy/__ref_unlink + end + local.get $7 + local.get $6 + call $~lib/collector/dummy/__ref_link + local.get $7 + else + local.get $7 + end + i32.store + local.get $5 + local.get $1 + i32.store offset=4 + local.get $5 + local.get $4 + i32.store offset=8 + local.get $5 + local.get $4 + local.get $3 + i32.shr_u + i32.store offset=12 + local.get $2 + i32.const 1024 + i32.and + if + local.get $1 + local.set $6 + local.get $6 + local.get $4 + i32.add + local.set $8 + block $break|0 + loop $continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + block + local.get $6 + i32.load + local.set $7 + local.get $7 + if + local.get $7 + local.get $5 + call $~lib/collector/dummy/__ref_link + end + local.get $6 + i32.const 4 + i32.add + local.set $6 + end + br $continue|0 + end + end + end + end + local.get $5 + ) + (func $~lib/runtime/Root#constructor (; 387 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + local.get $0 + i32.eqz + if + i32.const 0 + call $~lib/util/runtime/allocate + i32.const 30 + call $~lib/util/runtime/register + local.set $0 + end + local.get $0 + ) + (func $~lib/runtime/runtime.retain (; 388 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_link + ) + (func $~lib/runtime/runtime.release (; 389 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + global.get $~lib/runtime/ROOT + call $~lib/collector/dummy/__ref_unlink + ) + (func $~lib/collector/dummy/__ref_collect (; 390 ;) (type $FUNCSIG$v) + nop + ) + (func $~lib/runtime/runtime.collect (; 391 ;) (type $FUNCSIG$v) + call $~lib/collector/dummy/__ref_collect + ) + (func $~lib/runtime/runtime#constructor (; 392 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $start (; 393 ;) (type $FUNCSIG$v) call $start:std/typedarray + i32.const 0 + call $~lib/runtime/Root#constructor + global.set $~lib/runtime/ROOT ) - (func $null (; 366 ;) (type $FUNCSIG$v) + (func $null (; 394 ;) (type $FUNCSIG$v) ) ) diff --git a/tests/compiler/switch.json b/tests/compiler/switch.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/switch.optimized.wat b/tests/compiler/switch.optimized.wat index 2eb034e32c..884f3adc97 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.optimized.wat @@ -2,13 +2,11 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\12") + (data (i32.const 24) "s\00w\00i\00t\00c\00h\00.\00t\00s") (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $switch/doSwitch (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) block $case4|0 @@ -68,10 +66,10 @@ call $switch/doSwitch if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -80,10 +78,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -92,10 +90,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -104,30 +102,30 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 call $switch/doSwitch if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 call $switch/doSwitch if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -136,10 +134,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -148,10 +146,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -160,30 +158,30 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 call $switch/doSwitch if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 call $switch/doSwitchDefaultOmitted if i32.const 0 - i32.const 8 + i32.const 24 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -192,10 +190,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -204,10 +202,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -216,20 +214,20 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 call $switch/doSwitchDefaultOmitted if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/switch.untouched.wat b/tests/compiler/switch.untouched.wat index ce046aa220..653916eecc 100644 --- a/tests/compiler/switch.untouched.wat +++ b/tests/compiler/switch.untouched.wat @@ -2,14 +2,12 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\t\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\12\00\00\00\00\00\00\00\00\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $~lib/memory/HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $switch/doSwitch (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -176,10 +174,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -189,10 +187,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -202,10 +200,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -215,10 +213,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -228,10 +226,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -241,10 +239,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -254,10 +252,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -267,10 +265,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -280,10 +278,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -293,10 +291,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -306,10 +304,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 38 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -319,10 +317,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 39 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -332,10 +330,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 40 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 3 @@ -345,10 +343,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 41 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 4 @@ -358,10 +356,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 42 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -371,10 +369,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -384,10 +382,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 52 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -397,10 +395,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -410,10 +408,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 62 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -423,10 +421,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 63 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -436,10 +434,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 64 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -449,10 +447,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 73 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -462,10 +460,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 74 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -475,10 +473,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 75 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -488,10 +486,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 84 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -501,10 +499,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 85 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -514,10 +512,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 86 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -527,10 +525,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 92 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -540,10 +538,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 93 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -553,10 +551,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 94 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/ternary.json b/tests/compiler/ternary.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/ternary.optimized.wat b/tests/compiler/ternary.optimized.wat index 55ac7fbfba..56846df9d8 100644 --- a/tests/compiler/ternary.optimized.wat +++ b/tests/compiler/ternary.optimized.wat @@ -1,11 +1,8 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $ternary/a (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $FUNCSIG$v) i32.const 1 diff --git a/tests/compiler/ternary.untouched.wat b/tests/compiler/ternary.untouched.wat index 61a47091d6..e281029495 100644 --- a/tests/compiler/ternary.untouched.wat +++ b/tests/compiler/ternary.untouched.wat @@ -4,9 +4,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $ternary/a (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:ternary (; 0 ;) (type $FUNCSIG$v) i32.const 1 diff --git a/tests/compiler/threads.json b/tests/compiler/threads.json index 32c45dde2b..b3cf3d479c 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/threads.optimized.wat b/tests/compiler/threads.optimized.wat index 85fe9b4a28..c002c873cb 100644 --- a/tests/compiler/threads.optimized.wat +++ b/tests/compiler/threads.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 (shared 1 1)) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $threads/testAtomic (; 0 ;) (type $FUNCSIG$v) i32.const 0 diff --git a/tests/compiler/threads.untouched.wat b/tests/compiler/threads.untouched.wat index 74598aa5b8..3b6ad104e8 100644 --- a/tests/compiler/threads.untouched.wat +++ b/tests/compiler/threads.untouched.wat @@ -4,9 +4,7 @@ (table $0 1 funcref) (elem (i32.const 0) $null) (global $~lib/ASC_FEATURE_THREADS i32 (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $threads/testAtomic (; 0 ;) (type $FUNCSIG$v) i32.const 0 diff --git a/tests/compiler/typealias.json b/tests/compiler/typealias.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/typealias.optimized.wat b/tests/compiler/typealias.optimized.wat index f4a8304ebb..4a7b9bd96f 100644 --- a/tests/compiler/typealias.optimized.wat +++ b/tests/compiler/typealias.optimized.wat @@ -2,10 +2,7 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (export "memory" (memory $0)) - (export "table" (table $0)) (export "alias" (func $typealias/alias)) (func $typealias/alias (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/typealias.untouched.wat b/tests/compiler/typealias.untouched.wat index 72e197e1ee..8cd06aa993 100644 --- a/tests/compiler/typealias.untouched.wat +++ b/tests/compiler/typealias.untouched.wat @@ -4,9 +4,7 @@ (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)) (export "alias" (func $typealias/alias)) (func $typealias/alias (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) local.get $0 diff --git a/tests/compiler/unary.json b/tests/compiler/unary.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/unary.optimized.wat b/tests/compiler/unary.optimized.wat index 1e04efb779..fd6525e13b 100644 --- a/tests/compiler/unary.optimized.wat +++ b/tests/compiler/unary.optimized.wat @@ -1,14 +1,11 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $null) (global $unary/i (mut i32) (i32.const 0)) (global $unary/I (mut i64) (i64.const 0)) (global $unary/f (mut f32) (f32.const 0)) (global $unary/F (mut f64) (f64.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:unary (; 0 ;) (type $FUNCSIG$v) (local $0 f32) @@ -53,10 +50,16 @@ global.get $unary/i i32.const 1 i32.add + local.tee $2 + global.set $unary/i + local.get $2 global.set $unary/i global.get $unary/i i32.const 1 i32.sub + local.tee $2 + global.set $unary/i + local.get $2 global.set $unary/i global.get $unary/i local.tee $2 @@ -111,10 +114,16 @@ global.get $unary/I i64.const 1 i64.add + local.tee $3 + global.set $unary/I + local.get $3 global.set $unary/I global.get $unary/I i64.const 1 i64.sub + local.tee $3 + global.set $unary/I + local.get $3 global.set $unary/I global.get $unary/I local.tee $3 @@ -163,10 +172,16 @@ local.get $0 f32.const 1 f32.add + local.tee $0 + global.set $unary/f + local.get $0 global.set $unary/f global.get $unary/f f32.const 1 f32.sub + local.tee $0 + global.set $unary/f + local.get $0 global.set $unary/f global.get $unary/f local.tee $0 @@ -216,10 +231,16 @@ local.get $1 f64.const 1 f64.add + local.tee $1 + global.set $unary/F + local.get $1 global.set $unary/F global.get $unary/F f64.const 1 f64.sub + local.tee $1 + global.set $unary/F + local.get $1 global.set $unary/F global.get $unary/F local.tee $1 diff --git a/tests/compiler/unary.untouched.wat b/tests/compiler/unary.untouched.wat index 2a3437b0d1..e0fbbd5389 100644 --- a/tests/compiler/unary.untouched.wat +++ b/tests/compiler/unary.untouched.wat @@ -7,9 +7,7 @@ (global $unary/I (mut i64) (i64.const 0)) (global $unary/f (mut f32) (f32.const 0)) (global $unary/F (mut f64) (f64.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:unary (; 0 ;) (type $FUNCSIG$v) (local $0 i32) @@ -92,16 +90,18 @@ global.get $unary/i i32.const 1 i32.add + local.tee $0 global.set $unary/i - global.get $unary/i + local.get $0 end global.set $unary/i block (result i32) global.get $unary/i i32.const 1 i32.sub + local.tee $0 global.set $unary/i - global.get $unary/i + local.get $0 end global.set $unary/i block (result i32) @@ -181,16 +181,18 @@ global.get $unary/I i64.const 1 i64.add + local.tee $1 global.set $unary/I - global.get $unary/I + local.get $1 end global.set $unary/I block (result i64) global.get $unary/I i64.const 1 i64.sub + local.tee $1 global.set $unary/I - global.get $unary/I + local.get $1 end global.set $unary/I block (result i64) @@ -257,16 +259,18 @@ global.get $unary/f f32.const 1 f32.add + local.tee $2 global.set $unary/f - global.get $unary/f + local.get $2 end global.set $unary/f block (result f32) global.get $unary/f f32.const 1 f32.sub + local.tee $2 global.set $unary/f - global.get $unary/f + local.get $2 end global.set $unary/f block (result f32) @@ -335,16 +339,18 @@ global.get $unary/F f64.const 1 f64.add + local.tee $3 global.set $unary/F - global.get $unary/F + local.get $3 end global.set $unary/F block (result f64) global.get $unary/F f64.const 1 f64.sub + local.tee $3 global.set $unary/F - global.get $unary/F + local.get $3 end global.set $unary/F block (result f64) diff --git a/tests/compiler/void.json b/tests/compiler/void.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/void.optimized.wat b/tests/compiler/void.optimized.wat index 86b388ad0a..e2acb0a3b8 100644 --- a/tests/compiler/void.optimized.wat +++ b/tests/compiler/void.optimized.wat @@ -1,10 +1,7 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (export "memory" (memory $0)) - (export "table" (table $0)) (func $start (; 0 ;) (type $FUNCSIG$v) nop ) diff --git a/tests/compiler/void.untouched.wat b/tests/compiler/void.untouched.wat index 8ee4c756ac..a46ab488c7 100644 --- a/tests/compiler/void.untouched.wat +++ b/tests/compiler/void.untouched.wat @@ -6,9 +6,7 @@ (elem (i32.const 0) $null) (global $void/u8Val1 (mut i32) (i32.const 1)) (global $void/u8Val2 (mut i32) (i32.const 255)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $void/anInt (; 0 ;) (type $FUNCSIG$i) (result i32) i32.const 2 diff --git a/tests/compiler/wasi.json b/tests/compiler/wasi.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/wasi.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/wasi.optimized.wat b/tests/compiler/wasi.optimized.wat index e04375f36b..e31c1f81e7 100644 --- a/tests/compiler/wasi.optimized.wat +++ b/tests/compiler/wasi.optimized.wat @@ -1,12 +1,10 @@ (module (type $FUNCSIG$v (func)) (memory $0 1) - (data (i32.const 8) "\07\00\00\00w\00a\00s\00i\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\0e") + (data (i32.const 24) "w\00a\00s\00i\00.\00t\00s") (global $wasi/sig (mut i32) (i32.const 1)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $FUNCSIG$v) i32.const 9 diff --git a/tests/compiler/wasi.ts b/tests/compiler/wasi.ts index cd42168ffb..cf2a76dbf5 100644 --- a/tests/compiler/wasi.ts +++ b/tests/compiler/wasi.ts @@ -1,7 +1,5 @@ import { dirent, rwevent, fdstat, filestat, iovec, clocksubscription, fdsubscription, signal, dirprestat } from "bindings/wasi"; - -const WASM32 = 1; -const WASM64 = 2; +import { Target } from "common/target"; assert(offsetof("next") == 0); assert(offsetof("ino") == 8); @@ -33,10 +31,10 @@ assert(offsetof("ctim") == 48); assert(offsetof() == 56); assert(offsetof("buf") == 0); -if (ASC_TARGET == WASM32) { +if (ASC_TARGET == Target.WASM32) { assert(offsetof("buf_len") == 4); assert(offsetof() == 8); -} else if (ASC_TARGET == WASM64) { +} else if (ASC_TARGET == Target.WASM64) { assert(offsetof("buf_len") == 8); assert(offsetof() == 16); } else { @@ -58,10 +56,10 @@ assert(offsetof("fd") == 16); assert(offsetof() == 20); assert(offsetof("type") == 0); -if (ASC_TARGET == WASM32) { +if (ASC_TARGET == Target.WASM32) { assert(offsetof("name_len") == 4); assert(offsetof() == 8); -} else if (ASC_TARGET == WASM64) { +} else if (ASC_TARGET == Target.WASM64) { assert(offsetof("name_len") == 8); assert(offsetof() == 16); } else { diff --git a/tests/compiler/wasi.untouched.wat b/tests/compiler/wasi.untouched.wat index b71b5b7799..b4564bf151 100644 --- a/tests/compiler/wasi.untouched.wat +++ b/tests/compiler/wasi.untouched.wat @@ -1,18 +1,17 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\07\00\00\00w\00a\00s\00i\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\0e\00\00\00\00\00\00\00\00\00\00\00w\00a\00s\00i\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) - (global $wasi/WASM32 i32 (i32.const 1)) - (global $wasi/WASM64 i32 (i32.const 2)) + (global $~lib/common/target/Target.WASM32 i32 (i32.const 0)) + (global $~lib/common/target/Target.WASM64 i32 (i32.const 1)) + (global $~lib/common/target/Target.JS i32 (i32.const 2)) (global $~lib/ASC_TARGET i32 (i32.const 0)) (global $wasi/sig (mut i32) (i32.const 1)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:wasi (; 1 ;) (type $FUNCSIG$v) i32.const 0 @@ -21,10 +20,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 6 + i32.const 24 + i32.const 4 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -33,10 +32,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 7 + i32.const 24 + i32.const 5 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -45,10 +44,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 8 + i32.const 24 + i32.const 6 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 20 @@ -57,10 +56,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 9 + i32.const 24 + i32.const 7 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -69,10 +68,10 @@ i32.eqz if i32.const 0 + i32.const 24 i32.const 8 - i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -81,10 +80,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 12 + i32.const 24 + i32.const 10 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -93,10 +92,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 13 + i32.const 24 + i32.const 11 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -105,10 +104,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 14 + i32.const 24 + i32.const 12 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -117,10 +116,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 15 + i32.const 24 + i32.const 13 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -129,10 +128,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 16 + i32.const 24 + i32.const 14 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -141,10 +140,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 17 + i32.const 24 + i32.const 15 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -153,10 +152,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 19 + i32.const 24 + i32.const 17 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 2 @@ -165,10 +164,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 20 + i32.const 24 + i32.const 18 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -177,10 +176,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 21 + i32.const 24 + i32.const 19 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -189,10 +188,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 22 + i32.const 24 + i32.const 20 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -201,10 +200,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 23 + i32.const 24 + i32.const 21 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -213,10 +212,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 25 + i32.const 24 + i32.const 23 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -225,10 +224,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 26 + i32.const 24 + i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -237,10 +236,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 27 + i32.const 24 + i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 20 @@ -249,10 +248,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 28 + i32.const 24 + i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -261,10 +260,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 29 + i32.const 24 + i32.const 27 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -273,10 +272,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 30 + i32.const 24 + i32.const 28 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 40 @@ -285,10 +284,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 31 + i32.const 24 + i32.const 29 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 48 @@ -297,10 +296,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 32 + i32.const 24 + i32.const 30 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 56 @@ -309,10 +308,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 33 + i32.const 24 + i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -321,10 +320,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 35 + i32.const 24 + i32.const 33 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block @@ -334,10 +333,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 37 + i32.const 24 + i32.const 35 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -346,10 +345,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 38 + i32.const 24 + i32.const 36 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -359,10 +358,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 46 + i32.const 24 + i32.const 44 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -371,10 +370,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 47 + i32.const 24 + i32.const 45 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -383,10 +382,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 48 + i32.const 24 + i32.const 46 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 24 @@ -395,10 +394,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 49 + i32.const 24 + i32.const 47 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 32 @@ -407,10 +406,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 50 + i32.const 24 + i32.const 48 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 40 @@ -419,10 +418,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 51 + i32.const 24 + i32.const 49 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 48 @@ -431,10 +430,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 52 + i32.const 24 + i32.const 50 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 56 @@ -443,10 +442,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 53 + i32.const 24 + i32.const 51 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -455,10 +454,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 55 + i32.const 24 + i32.const 53 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -467,10 +466,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 56 + i32.const 24 + i32.const 54 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 16 @@ -479,10 +478,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 57 + i32.const 24 + i32.const 55 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 20 @@ -491,10 +490,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 58 + i32.const 24 + i32.const 56 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 0 @@ -503,10 +502,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 60 + i32.const 24 + i32.const 58 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end block @@ -516,10 +515,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 62 + i32.const 24 + i32.const 60 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 8 @@ -528,10 +527,10 @@ i32.eqz if i32.const 0 - i32.const 8 - i32.const 63 + i32.const 24 + i32.const 61 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end diff --git a/tests/compiler/while.json b/tests/compiler/while.json new file mode 100644 index 0000000000..b1da366ff4 --- /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/while.optimized.wat b/tests/compiler/while.optimized.wat index 30cf03a39a..863d496d5f 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,16 +1,14 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s") - (table $0 1 funcref) - (elem (i32.const 0) $null) + (data (i32.const 8) "\10\00\00\00\10") + (data (i32.const 24) "w\00h\00i\00l\00e\00.\00t\00s") (global $while/n (mut i32) (i32.const 10)) (global $while/m (mut i32) (i32.const 0)) (global $while/o (mut i32) (i32.const 0)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:while (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -31,10 +29,10 @@ global.get $while/n if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -42,10 +40,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -80,10 +78,10 @@ global.get $while/n if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/o @@ -91,10 +89,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end br $continue|1 @@ -103,10 +101,10 @@ global.get $while/n if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -114,10 +112,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/o @@ -125,10 +123,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -146,8 +144,10 @@ global.get $while/m i32.const 1 i32.add + local.tee $0 global.set $while/m - global.get $while/m + else + i32.const 0 local.set $0 end local.get $0 @@ -158,10 +158,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -169,10 +169,10 @@ i32.ne if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 1b84c40428..2838d8dc4e 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -1,17 +1,15 @@ (module (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) - (data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") + (data (i32.const 8) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") (table $0 1 funcref) (elem (i32.const 0) $null) (global $while/n (mut i32) (i32.const 10)) (global $while/m (mut i32) (i32.const 0)) (global $while/o (mut i32) (i32.const 0)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 28)) (export "memory" (memory $0)) - (export "table" (table $0)) (start $start) (func $start:while (; 1 ;) (type $FUNCSIG$v) (local $0 i32) @@ -39,10 +37,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 8 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -51,10 +49,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 9 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 10 @@ -98,10 +96,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 21 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/o @@ -110,10 +108,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 22 i32.const 2 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end end @@ -127,10 +125,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 24 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -139,10 +137,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 25 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/o @@ -151,10 +149,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 26 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end i32.const 1 @@ -171,15 +169,15 @@ global.set $while/n local.get $0 end - local.tee $0 if (result i32) global.get $while/m i32.const 1 i32.add + local.tee $0 global.set $while/m - global.get $while/m - else local.get $0 + else + i32.const 0 end if nop @@ -193,10 +191,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 31 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end global.get $while/m @@ -205,10 +203,10 @@ i32.eqz if i32.const 0 - i32.const 8 + i32.const 24 i32.const 32 i32.const 0 - call $~lib/env/abort + call $~lib/builtins/abort unreachable end ) diff --git a/tests/compiler/wildcard-export.json b/tests/compiler/wildcard-export.json new file mode 100644 index 0000000000..b1da366ff4 --- /dev/null +++ b/tests/compiler/wildcard-export.json @@ -0,0 +1,5 @@ +{ + "asc_flags": [ + "--runtime none" + ] +} \ No newline at end of file diff --git a/tests/compiler/wildcard-export.optimized.wat b/tests/compiler/wildcard-export.optimized.wat index 1139e552a6..306f12dff1 100644 --- a/tests/compiler/wildcard-export.optimized.wat +++ b/tests/compiler/wildcard-export.optimized.wat @@ -1,12 +1,9 @@ (module (type $FUNCSIG$v (func)) (memory $0 0) - (table $0 1 funcref) - (elem (i32.const 0) $start) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) diff --git a/tests/compiler/wildcard-export.untouched.wat b/tests/compiler/wildcard-export.untouched.wat index a1662de342..b86295da07 100644 --- a/tests/compiler/wildcard-export.untouched.wat +++ b/tests/compiler/wildcard-export.untouched.wat @@ -7,9 +7,7 @@ (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (global $~lib/memory/HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) - (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) diff --git a/tests/runtime/.gitignore b/tests/runtime/.gitignore new file mode 100644 index 0000000000..4ef75906ec --- /dev/null +++ b/tests/runtime/.gitignore @@ -0,0 +1 @@ +!untouched.wasm diff --git a/tests/runtime/assembly/index.ts b/tests/runtime/assembly/index.ts new file mode 100644 index 0000000000..018c10d965 --- /dev/null +++ b/tests/runtime/assembly/index.ts @@ -0,0 +1,3 @@ +export * from "rt"; + +@start export function main(): void {} diff --git a/tests/runtime/assembly/tsconfig.json b/tests/runtime/assembly/tsconfig.json new file mode 100644 index 0000000000..6e52b21c48 --- /dev/null +++ b/tests/runtime/assembly/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../../std/assembly.json", + "include": [ + "./**/*.ts" + ] +} diff --git a/tests/runtime/index.html b/tests/runtime/index.html new file mode 100644 index 0000000000..f7f8b46c0c --- /dev/null +++ b/tests/runtime/index.html @@ -0,0 +1,236 @@ + + + + +

AssemblyScript Runtime Visualizer / TLSF

+

+ Notes: +

    +
  • It is expected that there is exactly one block on initialization. This is the remaining space (< 64K) within the last page after static data.
  • +
  • It is expected that if two adjacent blocks of size K are freed, the merged block doesn't go into the first level list for K*2 because its size is actually larger than that (K + OVERHEAD + K).
  • +
  • It is expected that if memory grows beyond 1GB, that even if all blocks are free'd there are at least two (or even three if the largest block is in the middle) remaining blocks, because a single block must not be larger than 1GB.
  • +
  • It is expected that after other operations have already been performed, being able to allocate 1GB can't be guaranteed anymore, even if there should be enough space left in absolute terms, if prior subdivision prevents it.
  • +
  • It is expected that the second level 0 in first level 0 isn't ever used due to alignment guarantees. Smallest block is 32 bytes (16 bytes overhead + 16 bytes payload if used, respectively linking information if free) in this implementation.
  • +
+

+

Implementation constants: ? bits alignment, ? bits first level, ? bits second level, ? B overhead

+ +

First level bitmap

+

The first level map is a bitmap determining whether free blocks exist in at least one of its respective second levels. In this implementation, the first bit indicates whether a small block (< 256B) exists. Each bit doubles the size.

+
+
+ +

Second level maps

+

Second level maps subdivide each first level into multiple lists of subsizes. Each one works similar to the first level bitmap.

+
+
+ +

Heads

+

The heads of the actual free lists, one per second level per first level. Values here are pointers into memory. Last item is the address of the special zero-size "used" tail block, which is usually the end of WASM memory minus block overhead.

+
+
+ +

Allocator

+

Chose a size to allocate. Annotated list indexes depend on implementation constants but match those of this implementation.

+

+   +

+

+ Small blocks: + + + + + + ... + + (δ ≙ block overhead) +

+

+ Common blocks: + + + + + + (e.g. allocate 3, free middle, check second level) +

+

+ Large blocks: + + + + + +

+

+ +

Segments

+

Allocations performed above are tracked here so you can free them again. Note that TLSF alone does not keep track of used blocks (unless free'd and put in a free list again). It is expected that adjacent free blocks become merged automatically.

+
+
diff --git a/tests/runtime/optimized.wat b/tests/runtime/optimized.wat new file mode 100644 index 0000000000..2a9ad39857 --- /dev/null +++ b/tests/runtime/optimized.wat @@ -0,0 +1,1366 @@ +(module + (type $FUNCSIG$v (func)) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (type $FUNCSIG$iiii (func (param i32 i32 i32) (result 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$viii (func (param i32 i32 i32))) + (type $FUNCSIG$vi (func (param i32))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1e") + (data (i32.const 24) "~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s") + (data (i32.const 56) "\10\00\00\00\1c") + (data (i32.const 72) "~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s") + (data (i32.const 104) "\10\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08") + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) + (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) + (export "memory" (memory $0)) + (export "main" (func $assembly/index/main)) + (export "__rt_allocate" (func $~lib/rt/index/__rt_allocate)) + (export "__rt_reallocate" (func $~lib/rt/index/__rt_reallocate)) + (export "__rt_free" (func $~lib/rt/index/__rt_free)) + (export "__rt_retain" (func $~lib/rt/index/__rt_retain)) + (export "__rt_release" (func $~lib/rt/index/__rt_release)) + (export "__rt_collect" (func $~lib/rt/index/__rt_collect)) + (export "__rt_typeinfo" (func $~lib/rt/common/__rt_typeinfo)) + (func $assembly/index/main (; 1 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + i32.const 1 + global.set $~lib/started + end + ) + (func $~lib/rt/tlsf/removeBlock (; 2 ;) (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 + i32.const -4 + i32.and + local.tee $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 4 + i32.shr_u + local.set $4 + i32.const 0 + else + local.get $2 + i32.const 31 + local.get $2 + i32.clz + i32.sub + local.tee $3 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $4 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $1 + i32.load offset=20 + local.set $2 + local.get $1 + i32.load offset=16 + local.tee $5 + if + local.get $5 + local.get $2 + i32.store offset=20 + end + local.get $2 + if + local.get $2 + local.get $5 + i32.store offset=16 + end + local.get $1 + local.get $0 + local.get $3 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + i32.eq + if + local.get $0 + local.get $3 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $2 + i32.store offset=96 + local.get $2 + i32.eqz + if + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $1 + i32.store offset=4 + local.get $1 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $3 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (; 3 ;) (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.get $1 + i32.load + local.set $2 + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.tee $5 + i32.const 1 + i32.and + if + local.get $2 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $5 + i32.const -4 + i32.and + i32.add + local.tee $3 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $2 + i32.const 3 + i32.and + local.get $3 + i32.or + local.tee $2 + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.load + local.set $5 + end + end + local.get $2 + i32.const 2 + i32.and + if + local.get $1 + i32.const 4 + i32.sub + i32.load + local.tee $3 + i32.load + local.tee $6 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $2 + i32.const -4 + i32.and + i32.add + local.tee $7 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $3 + local.get $6 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $2 + i32.store + local.get $3 + local.set $1 + end + end + local.get $4 + local.get $5 + i32.const 2 + i32.or + i32.store + local.get $4 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $2 + i32.const -4 + i32.and + local.tee $2 + i32.const 256 + i32.lt_u + if (result i32) + local.get $2 + i32.const 4 + i32.shr_u + local.set $2 + i32.const 0 + else + local.get $2 + i32.const 31 + local.get $2 + i32.clz + i32.sub + local.tee $3 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $2 + local.get $3 + i32.const 7 + i32.sub + end + local.set $3 + local.get $0 + local.get $3 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + local.set $4 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $4 + i32.store offset=20 + local.get $4 + if + local.get $4 + local.get $1 + i32.store offset=16 + end + local.get $0 + local.get $3 + i32.const 4 + i32.shl + local.get $2 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $1 + i32.store offset=96 + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $3 + i32.shl + i32.or + i32.store + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + local.get $0 + local.get $3 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const 1 + local.get $2 + i32.shl + i32.or + i32.store offset=4 + ) + (func $~lib/rt/tlsf/addMemory (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + local.get $2 + block (result i32) + local.get $0 + i32.load offset=1568 + local.tee $2 + if + local.get $1 + i32.const 16 + i32.sub + local.get $2 + i32.eq + if + local.get $2 + i32.load + local.set $3 + local.get $1 + i32.const 16 + i32.sub + local.set $1 + end + end + local.get $1 + end + i32.sub + local.tee $2 + i32.const 48 + i32.lt_u + if + return + end + local.get $1 + local.get $3 + i32.const 2 + i32.and + local.get $2 + i32.const 32 + i32.sub + i32.const 1 + i32.or + i32.or + i32.store + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $2 + i32.add + i32.const 16 + i32.sub + local.tee $2 + i32.const 2 + i32.store + local.get $0 + local.get $2 + i32.store offset=1568 + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/tlsf/initializeRoot (; 5 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + i32.const 240 + local.tee $3 + i32.const 67107 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + current_memory + local.tee $0 + i32.gt_s + if (result i32) + local.get $1 + local.get $0 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $3 + local.tee $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=1568 + loop $repeat|0 + block $break|0 + local.get $2 + i32.const 23 + i32.ge_u + br_if $break|0 + local.get $0 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $repeat|1 + block $break|1 + local.get $1 + i32.const 16 + i32.ge_u + br_if $break|1 + local.get $0 + local.get $2 + i32.const 4 + i32.shl + local.get $1 + i32.add + i32.const 2 + i32.shl + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $repeat|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $repeat|0 + end + end + local.get $0 + local.get $3 + i32.const 1587 + i32.add + i32.const -16 + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + local.get $0 + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/prepareSize (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 448 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 15 + i32.add + i32.const -16 + i32.and + local.tee $0 + i32.const 16 + local.tee $1 + local.get $0 + local.get $1 + i32.gt_u + select + ) + (func $~lib/rt/tlsf/searchBlock (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + local.get $0 + local.get $1 + i32.const 256 + i32.lt_u + if (result i32) + local.get $1 + i32.const 4 + i32.shr_u + local.set $1 + i32.const 0 + else + i32.const 31 + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + local.get $1 + local.get $1 + i32.const 536870912 + i32.lt_u + select + local.tee $1 + i32.clz + i32.sub + local.set $2 + local.get $1 + local.get $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 16 + i32.xor + local.set $1 + local.get $2 + i32.const 7 + i32.sub + end + local.tee $2 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.const -1 + local.get $1 + i32.shl + i32.and + local.tee $1 + if (result i32) + local.get $0 + local.get $1 + i32.ctz + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + 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 $0 + local.get $1 + i32.ctz + local.tee $1 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + i32.ctz + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + else + i32.const 0 + end + end + ) + (func $~lib/rt/tlsf/growMemory (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + current_memory + local.tee $2 + local.tee $3 + local.get $1 + i32.const 65535 + i32.add + i32.const -65536 + i32.and + i32.const 16 + i32.shr_u + local.tee $1 + local.tee $4 + local.get $3 + local.get $4 + i32.gt_s + select + grow_memory + i32.const 0 + i32.lt_s + if + local.get $1 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + local.get $0 + local.get $2 + i32.const 16 + i32.shl + current_memory + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + ) + (func $~lib/rt/tlsf/prepareBlock (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + local.get $1 + i32.load + local.tee $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 32 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.tee $1 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end + ) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $0 + local.get $1 + call $~lib/rt/tlsf/prepareSize + local.tee $3 + call $~lib/rt/tlsf/searchBlock + local.tee $2 + i32.eqz + if + local.get $0 + local.get $3 + call $~lib/rt/tlsf/growMemory + local.get $0 + local.get $3 + call $~lib/rt/tlsf/searchBlock + local.set $2 + end + local.get $2 + i32.const 0 + i32.store offset=4 + local.get $2 + i32.const 0 + i32.store offset=8 + local.get $2 + local.get $1 + i32.store offset=12 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $2 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $2 + ) + (func $~lib/rt/index/__rt_allocate (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + global.get $~lib/rt/tlsf/ROOT + local.tee $2 + if (result i32) + local.get $2 + else + call $~lib/rt/tlsf/initializeRoot + global.get $~lib/rt/tlsf/ROOT + end + local.get $0 + call $~lib/rt/tlsf/allocateBlock + local.tee $0 + local.get $1 + i32.store offset=8 + local.get $0 + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + br_if $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.lt_u + if + local.get $1 + i32.const 7 + i32.and + local.get $0 + i32.const 7 + i32.and + i32.eq + if + loop $continue|0 + local.get $0 + i32.const 7 + i32.and + if + local.get $2 + i32.eqz + br_if $~lib/util/memory/memmove|inlined.0 + 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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 $3 + block (result i32) + local.get $1 + local.tee $3 + i32.const 1 + i32.add + local.set $1 + local.get $3 + i32.load8_u + end + 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 + br_if $~lib/util/memory/memmove|inlined.0 + 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|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 $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/rt/tlsf/reallocateBlock (; 13 ;) (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.get $2 + call $~lib/rt/tlsf/prepareSize + local.tee $3 + local.get $1 + i32.load + local.tee $4 + i32.const -4 + i32.and + i32.le_u + if + local.get $0 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + local.get $2 + i32.store offset=12 + local.get $1 + return + end + local.get $1 + i32.const 16 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $6 + i32.load + local.tee $5 + i32.const 1 + i32.and + if + local.get $4 + i32.const -4 + i32.and + i32.const 16 + i32.add + local.get $5 + i32.const -4 + i32.and + i32.add + local.tee $5 + local.get $3 + i32.ge_u + if + local.get $0 + local.get $6 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $4 + i32.const 3 + i32.and + local.get $5 + i32.or + i32.store + local.get $1 + local.get $2 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + return + end + end + local.get $0 + local.get $2 + call $~lib/rt/tlsf/allocateBlock + local.tee $3 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $3 + local.get $1 + i32.load offset=8 + i32.store offset=8 + local.get $3 + i32.const 16 + i32.add + local.get $1 + i32.const 16 + i32.add + local.get $2 + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $3 + ) + (func $~lib/rt/index/__rt_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 16 + i32.sub + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + ) + (func $~lib/rt/tlsf/freeBlock (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + local.get $1 + local.get $1 + i32.load + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/index/__rt_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/index/__rt_retain (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + local.get $0 + i32.load offset=4 + i32.const 1 + i32.add + i32.store offset=4 + end + ) + (func $~lib/rt/index/__rt_release (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + local.tee $0 + i32.load offset=4 + i32.const 268435455 + i32.and + i32.const 1 + i32.ne + if + local.get $0 + i32.load offset=8 + drop + end + unreachable + end + ) + (func $~lib/rt/pure/markGray (; 19 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.ne + if + local.get $0 + local.get $1 + i32.const -1879048193 + i32.and + i32.const 268435456 + i32.or + i32.store offset=4 + unreachable + end + ) + (func $~lib/rt/pure/scan (; 20 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.eq + if + local.get $1 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + if + local.get $0 + local.get $0 + i32.load offset=4 + i32.const -1879048193 + i32.and + i32.store offset=4 + else + local.get $0 + local.get $1 + i32.const -1879048193 + i32.and + i32.const 536870912 + i32.or + i32.store offset=4 + end + unreachable + end + ) + (func $~lib/rt/pure/collectWhite (; 21 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.tee $1 + i32.const -2147483648 + i32.and + i32.eqz + i32.const 0 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 536870912 + i32.eq + select + if + unreachable + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/pure/collectCycles (; 22 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/rt/pure/ROOTS + local.tee $5 + local.tee $2 + local.set $3 + global.get $~lib/rt/pure/CUR + local.set $0 + loop $repeat|0 + block $break|0 + local.get $3 + local.get $0 + i32.ge_u + br_if $break|0 + local.get $3 + i32.load + local.tee $4 + i32.load offset=4 + local.tee $1 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + i32.const 0 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 805306368 + i32.eq + select + if + local.get $4 + call $~lib/rt/pure/markGray + local.get $2 + local.get $4 + i32.store + local.get $2 + i32.const 4 + i32.add + local.set $2 + else + i32.const 0 + local.get $1 + i32.const 268435455 + i32.and + i32.eqz + local.get $1 + i32.const 1879048192 + i32.and + select + if + global.get $~lib/rt/tlsf/ROOT + local.get $4 + call $~lib/rt/tlsf/freeBlock + else + local.get $4 + local.get $1 + i32.const 2147483647 + i32.and + i32.store offset=4 + end + end + local.get $3 + i32.const 4 + i32.add + local.set $3 + br $repeat|0 + end + end + local.get $2 + global.set $~lib/rt/pure/CUR + local.get $5 + local.set $0 + loop $repeat|1 + block $break|1 + local.get $0 + local.get $2 + i32.ge_u + br_if $break|1 + local.get $0 + i32.load + call $~lib/rt/pure/scan + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $repeat|1 + end + end + local.get $5 + local.set $0 + loop $repeat|2 + block $break|2 + local.get $0 + local.get $2 + i32.ge_u + br_if $break|2 + local.get $0 + i32.load + local.tee $1 + local.get $1 + i32.load offset=4 + i32.const 2147483647 + i32.and + i32.store offset=4 + local.get $1 + call $~lib/rt/pure/collectWhite + local.get $0 + i32.const 4 + i32.add + local.set $0 + br $repeat|2 + end + end + local.get $5 + global.set $~lib/rt/pure/CUR + ) + (func $~lib/rt/index/__rt_collect (; 23 ;) (type $FUNCSIG$v) + call $~lib/rt/pure/collectCycles + ) + (func $~lib/rt/common/__rt_typeinfo (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + i32.const 104 + local.set $1 + local.get $0 + if (result i32) + local.get $0 + local.get $1 + i32.load + i32.gt_u + else + i32.const 1 + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 3 + i32.shl + i32.add + i32.load + end + ) + (func $start (; 25 ;) (type $FUNCSIG$v) + nop + ) +) diff --git a/tests/runtime/package-lock.json b/tests/runtime/package-lock.json new file mode 100644 index 0000000000..166100d470 --- /dev/null +++ b/tests/runtime/package-lock.json @@ -0,0 +1,213 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + }, + "corser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", + "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", + "dev": true + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ecstatic": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.1.tgz", + "integrity": "sha512-/rrctvxZ78HMI/tPIsqdvFKHHscxR3IJuKrZI2ZoUgkt2SiufyLFBmcco+aqQBIu6P1qBsUNG3drAAGLx80vTQ==", + "dev": true, + "requires": { + "he": "^1.1.1", + "mime": "^1.6.0", + "minimist": "^1.1.0", + "url-join": "^2.0.5" + } + }, + "eventemitter3": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz", + "integrity": "sha512-ivIvhpq/Y0uSjcHDcOIccjmYjGLcP09MFGE7ysAwkAvkXfpZlC985pH2/ui64DKazbTW/4kN3yqozUxlXzI6cA==", + "dev": true + }, + "follow-redirects": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", + "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", + "dev": true, + "requires": { + "debug": "^3.2.6" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "http-proxy": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", + "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "dev": true, + "requires": { + "eventemitter3": "^3.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-server": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.11.1.tgz", + "integrity": "sha512-6JeGDGoujJLmhjiRGlt8yK8Z9Kl0vnl/dQoQZlc4oeqaUoAKQg94NILLfrY3oWzSyFaQCVNTcKE5PZ3cH8VP9w==", + "dev": true, + "requires": { + "colors": "1.0.3", + "corser": "~2.0.0", + "ecstatic": "^3.0.0", + "http-proxy": "^1.8.1", + "opener": "~1.4.0", + "optimist": "0.6.x", + "portfinder": "^1.0.13", + "union": "~0.4.3" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "opener": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", + "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=", + "dev": true + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + }, + "dependencies": { + "minimist": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "dev": true + } + } + }, + "portfinder": { + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", + "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", + "dev": true, + "requires": { + "async": "^1.5.2", + "debug": "^2.2.0", + "mkdirp": "0.5.x" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "qs": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", + "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", + "dev": true + }, + "union": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz", + "integrity": "sha1-GY+9rrolTniLDvy2MLwR8kopWeA=", + "dev": true, + "requires": { + "qs": "~2.3.3" + } + }, + "url-join": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", + "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", + "dev": true + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true + } + } +} diff --git a/tests/runtime/package.json b/tests/runtime/package.json new file mode 100644 index 0000000000..e82de9a00c --- /dev/null +++ b/tests/runtime/package.json @@ -0,0 +1,12 @@ +{ + "private": true, + "scripts": { + "server": "http-server . -o -c-1", + "build": "npm run build:untouched && npm run build:optimized", + "build:untouched": "node ../../bin/asc assembly/index.ts -t untouched.wat -b untouched.wasm --runtime none --validate --sourceMap --measure", + "build:optimized": "node ../../bin/asc assembly/index.ts -t optimized.wat -b optimized.wasm --runtime none --validate --sourceMap --measure --noAssert --optimize" + }, + "devDependencies": { + "http-server": "^0.11.1" + } +} diff --git a/tests/runtime/untouched.wasm b/tests/runtime/untouched.wasm new file mode 100644 index 0000000000..b20dc4e80d Binary files /dev/null and b/tests/runtime/untouched.wasm differ diff --git a/tests/runtime/untouched.wat b/tests/runtime/untouched.wat new file mode 100644 index 0000000000..ea4746fd41 --- /dev/null +++ b/tests/runtime/untouched.wat @@ -0,0 +1,2344 @@ +(module + (type $FUNCSIG$v (func)) + (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$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))) + (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s\00") + (data (i32.const 56) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00n\00d\00e\00x\00.\00t\00s\00") + (data (i32.const 104) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00") + (data (i32.const 152) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00") + (data (i32.const 200) "\10\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00") + (table $0 1 funcref) + (elem (i32.const 0) $null) + (global $~lib/rt/pure/ACYCLIC_FLAG i32 (i32.const 0)) + (global $~lib/started (mut i32) (i32.const 0)) + (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/rt/pure/CUR (mut i32) (i32.const 0)) + (global $~lib/rt/pure/END (mut i32) (i32.const 0)) + (global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0)) + (global $~lib/runtime/RTTI_BASE i32 (i32.const 200)) + (global $~lib/memory/HEAP_BASE i32 (i32.const 336)) + (export "memory" (memory $0)) + (export "main" (func $assembly/index/main)) + (export "__rt_allocate" (func $~lib/rt/index/__rt_allocate)) + (export "__rt_reallocate" (func $~lib/rt/index/__rt_reallocate)) + (export "__rt_free" (func $~lib/rt/index/__rt_free)) + (export "__rt_retain" (func $~lib/rt/index/__rt_retain)) + (export "__rt_release" (func $~lib/rt/index/__rt_release)) + (export "__rt_collect" (func $~lib/rt/index/__rt_collect)) + (export "__rt_typeinfo" (func $~lib/rt/common/__rt_typeinfo)) + (func $assembly/index/main (; 1 ;) (type $FUNCSIG$v) + global.get $~lib/started + i32.eqz + if + call $start + i32.const 1 + global.set $~lib/started + end + ) + (func $~lib/rt/tlsf/removeBlock (; 2 ;) (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 $11 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 277 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $3 + local.get $3 + i32.const 16 + i32.ge_u + if (result i32) + local.get $3 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 279 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $4 + local.get $3 + i32.const 4 + i32.shr_u + local.set $5 + else + i32.const 31 + local.get $3 + i32.clz + i32.sub + local.set $4 + local.get $3 + local.get $4 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $5 + local.get $4 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $4 + end + local.get $4 + i32.const 23 + i32.lt_u + if (result i32) + local.get $5 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 292 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load offset=16 + local.set $6 + local.get $1 + i32.load offset=20 + local.set $7 + local.get $6 + if + local.get $6 + local.get $7 + i32.store offset=20 + end + local.get $7 + if + local.get $7 + local.get $6 + i32.store offset=16 + end + local.get $1 + block $~lib/rt/tlsf/GETHEAD|inlined.1 (result i32) + local.get $0 + local.set $10 + local.get $4 + local.set $9 + local.get $5 + local.set $8 + local.get $10 + local.get $9 + i32.const 4 + i32.shl + local.get $8 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + end + i32.eq + if + block $~lib/rt/tlsf/SETHEAD|inlined.1 + local.get $0 + local.set $11 + local.get $4 + local.set $10 + local.get $5 + local.set $9 + local.get $7 + local.set $8 + local.get $11 + local.get $10 + i32.const 4 + i32.shl + local.get $9 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $8 + i32.store offset=96 + end + local.get $7 + i32.eqz + if + block $~lib/rt/tlsf/GETSL|inlined.0 (result i32) + local.get $0 + local.set $9 + local.get $4 + local.set $8 + local.get $9 + local.get $8 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + local.set $8 + block $~lib/rt/tlsf/SETSL|inlined.1 + local.get $0 + local.set $11 + local.get $4 + local.set $10 + local.get $8 + i32.const 1 + local.get $5 + i32.shl + i32.const -1 + i32.xor + i32.and + local.tee $8 + local.set $9 + local.get $11 + local.get $10 + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store offset=4 + end + local.get $8 + i32.eqz + if + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $4 + i32.shl + i32.const -1 + i32.xor + i32.and + i32.store + end + end + end + ) + (func $~lib/rt/tlsf/insertBlock (; 3 ;) (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 $11 i32) + (local $12 i32) + (local $13 i32) + local.get $1 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 205 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 207 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETRIGHT|inlined.0 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 16 + i32.add + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + local.set $4 + local.get $4 + i32.load + local.set $5 + local.get $5 + i32.const 1 + i32.and + if + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.add + local.get $5 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $3 + local.get $3 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $4 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $2 + i32.const 3 + i32.and + local.get $3 + i32.or + local.tee $2 + i32.store + block $~lib/rt/tlsf/GETRIGHT|inlined.1 (result i32) + local.get $1 + local.set $6 + local.get $6 + i32.const 16 + i32.add + local.get $6 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + local.set $4 + local.get $4 + i32.load + local.set $5 + end + end + local.get $2 + i32.const 2 + i32.and + if + block $~lib/rt/tlsf/GETFREELEFT|inlined.0 (result i32) + local.get $1 + local.set $3 + local.get $3 + i32.const 4 + i32.sub + i32.load + end + local.set $3 + local.get $3 + i32.load + local.set $6 + local.get $6 + i32.const 1 + i32.and + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 228 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $6 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.add + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $7 + local.get $7 + i32.const 1073741824 + i32.lt_u + if + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $3 + local.get $6 + i32.const 3 + i32.and + local.get $7 + i32.or + local.tee $2 + i32.store + local.get $3 + local.set $1 + end + end + local.get $4 + local.get $5 + i32.const 2 + i32.or + i32.store + local.get $2 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.set $8 + local.get $8 + i32.const 16 + i32.ge_u + if (result i32) + local.get $8 + i32.const 1073741824 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 243 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.add + local.get $8 + i32.add + local.get $4 + i32.eq + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 244 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $4 + i32.const 4 + i32.sub + local.get $1 + i32.store + local.get $8 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $9 + local.get $8 + i32.const 4 + i32.shr_u + local.set $10 + else + i32.const 31 + local.get $8 + i32.clz + i32.sub + local.set $9 + local.get $8 + local.get $9 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $10 + local.get $9 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $9 + end + local.get $9 + i32.const 23 + i32.lt_u + if (result i32) + local.get $10 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 260 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETHEAD|inlined.2 (result i32) + local.get $0 + local.set $3 + local.get $9 + local.set $6 + local.get $10 + local.set $7 + local.get $3 + local.get $6 + i32.const 4 + i32.shl + local.get $7 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + end + local.set $11 + local.get $1 + i32.const 0 + i32.store offset=16 + local.get $1 + local.get $11 + i32.store offset=20 + local.get $11 + if + local.get $11 + local.get $1 + i32.store offset=16 + end + block $~lib/rt/tlsf/SETHEAD|inlined.2 + local.get $0 + local.set $12 + local.get $9 + local.set $3 + local.get $10 + local.set $6 + local.get $1 + local.set $7 + local.get $12 + local.get $3 + i32.const 4 + i32.shl + local.get $6 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $7 + i32.store offset=96 + end + local.get $0 + local.get $0 + i32.load + i32.const 1 + local.get $9 + i32.shl + i32.or + i32.store + block $~lib/rt/tlsf/SETSL|inlined.2 + block $~lib/rt/tlsf/GETSL|inlined.1 (result i32) + local.get $0 + local.set $13 + local.get $9 + local.set $12 + local.get $13 + local.get $12 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + i32.const 1 + local.get $10 + i32.shl + i32.or + local.set $3 + local.get $0 + local.get $9 + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.store offset=4 + end + ) + (func $~lib/rt/tlsf/addMemory (; 4 ;) (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 $9 i32) + local.get $1 + local.get $2 + i32.le_u + if (result i32) + local.get $1 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + if (result i32) + local.get $2 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 386 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETTAIL|inlined.0 (result i32) + local.get $0 + local.set $3 + local.get $3 + i32.load offset=1568 + end + local.set $4 + i32.const 0 + local.set $5 + local.get $4 + if + local.get $1 + local.get $4 + i32.const 16 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 396 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 16 + i32.sub + local.get $4 + i32.eq + if + local.get $1 + i32.const 16 + i32.sub + local.set $1 + local.get $4 + i32.load + local.set $5 + else + nop + end + else + local.get $1 + local.get $0 + i32.const 1572 + i32.add + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 408 + i32.const 4 + call $~lib/builtins/abort + unreachable + end + end + local.get $2 + local.get $1 + i32.sub + local.set $6 + local.get $6 + i32.const 16 + i32.const 16 + i32.add + i32.const 16 + i32.add + i32.lt_u + if + i32.const 0 + return + end + local.get $6 + i32.const 2 + i32.const 16 + i32.mul + i32.sub + local.set $7 + local.get $1 + local.set $8 + local.get $8 + local.get $7 + i32.const 1 + i32.or + local.get $5 + i32.const 2 + i32.and + i32.or + i32.store + local.get $8 + i32.const 0 + i32.store offset=16 + local.get $8 + i32.const 0 + i32.store offset=20 + local.get $1 + local.get $6 + i32.add + i32.const 16 + i32.sub + local.set $4 + local.get $4 + i32.const 0 + i32.const 2 + i32.or + i32.store + block $~lib/rt/tlsf/SETTAIL|inlined.1 + local.get $0 + local.set $9 + local.get $4 + local.set $3 + local.get $9 + local.get $3 + i32.store offset=1568 + end + local.get $0 + local.get $8 + call $~lib/rt/tlsf/insertBlock + i32.const 1 + ) + (func $~lib/rt/tlsf/initializeRoot (; 5 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + global.get $~lib/memory/HEAP_BASE + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.set $0 + current_memory + local.set $1 + local.get $0 + i32.const 1572 + i32.add + 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 $2 + local.get $1 + i32.gt_s + if (result i32) + local.get $2 + local.get $1 + i32.sub + grow_memory + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + local.get $0 + local.set $3 + local.get $3 + i32.const 0 + i32.store + block $~lib/rt/tlsf/SETTAIL|inlined.0 + local.get $3 + local.set $5 + i32.const 0 + local.set $4 + local.get $5 + local.get $4 + i32.store offset=1568 + end + block $break|0 + i32.const 0 + local.set $4 + loop $repeat|0 + local.get $4 + i32.const 23 + i32.lt_u + i32.eqz + br_if $break|0 + block + block $~lib/rt/tlsf/SETSL|inlined.0 + local.get $3 + local.set $7 + local.get $4 + local.set $6 + i32.const 0 + local.set $5 + local.get $7 + local.get $6 + i32.const 2 + i32.shl + i32.add + local.get $5 + i32.store offset=4 + end + block $break|1 + i32.const 0 + local.set $5 + loop $repeat|1 + local.get $5 + i32.const 16 + i32.lt_u + i32.eqz + br_if $break|1 + block $~lib/rt/tlsf/SETHEAD|inlined.0 + local.get $3 + local.set $9 + local.get $4 + local.set $8 + local.get $5 + local.set $7 + i32.const 0 + local.set $6 + local.get $9 + local.get $8 + i32.const 4 + i32.shl + local.get $7 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + i32.store offset=96 + end + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $repeat|1 + unreachable + end + unreachable + end + end + local.get $4 + i32.const 1 + i32.add + local.set $4 + br $repeat|0 + unreachable + end + unreachable + end + local.get $3 + local.get $0 + i32.const 1572 + i32.add + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + current_memory + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + drop + local.get $3 + global.set $~lib/rt/tlsf/ROOT + ) + (func $~lib/rt/tlsf/prepareSize (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.const 1073741824 + i32.ge_u + if + i32.const 0 + i32.const 24 + i32.const 448 + i32.const 29 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 15 + i32.add + i32.const 15 + i32.const -1 + i32.xor + i32.and + local.tee $1 + i32.const 16 + local.tee $2 + local.get $1 + local.get $2 + i32.gt_u + select + ) + (func $~lib/rt/tlsf/searchBlock (; 7 ;) (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 $8 i32) + (local $9 i32) + local.get $1 + i32.const 256 + i32.lt_u + if + i32.const 0 + local.set $2 + local.get $1 + i32.const 4 + i32.shr_u + local.set $3 + else + local.get $1 + i32.const 536870912 + i32.lt_u + if (result i32) + local.get $1 + i32.const 1 + i32.const 27 + local.get $1 + i32.clz + i32.sub + i32.shl + i32.add + i32.const 1 + i32.sub + else + local.get $1 + end + local.set $4 + i32.const 31 + local.get $4 + i32.clz + i32.sub + local.set $2 + local.get $4 + local.get $2 + i32.const 4 + i32.sub + i32.shr_u + i32.const 1 + i32.const 4 + i32.shl + i32.xor + local.set $3 + local.get $2 + i32.const 8 + i32.const 1 + i32.sub + i32.sub + local.set $2 + end + local.get $2 + i32.const 23 + i32.lt_u + if (result i32) + local.get $3 + i32.const 16 + i32.lt_u + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 338 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETSL|inlined.2 (result i32) + local.get $0 + local.set $5 + local.get $2 + local.set $4 + local.get $5 + local.get $4 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + i32.const 0 + i32.const -1 + i32.xor + local.get $3 + i32.shl + i32.and + local.set $6 + local.get $6 + i32.eqz + if + local.get $0 + i32.load + i32.const 0 + i32.const -1 + i32.xor + local.get $2 + i32.const 1 + i32.add + i32.shl + i32.and + local.set $4 + local.get $4 + i32.eqz + if + i32.const 0 + local.set $7 + else + local.get $4 + i32.ctz + local.set $2 + block $~lib/rt/tlsf/GETSL|inlined.3 (result i32) + local.get $0 + local.set $8 + local.get $2 + local.set $5 + local.get $8 + local.get $5 + i32.const 2 + i32.shl + i32.add + i32.load offset=4 + end + local.set $6 + local.get $6 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 351 + i32.const 17 + call $~lib/builtins/abort + unreachable + end + block $~lib/rt/tlsf/GETHEAD|inlined.3 (result i32) + local.get $0 + local.set $9 + local.get $2 + local.set $8 + local.get $6 + i32.ctz + local.set $5 + local.get $9 + local.get $8 + i32.const 4 + i32.shl + local.get $5 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + end + local.set $7 + end + else + block $~lib/rt/tlsf/GETHEAD|inlined.4 (result i32) + local.get $0 + local.set $8 + local.get $2 + local.set $5 + local.get $6 + i32.ctz + local.set $4 + local.get $8 + local.get $5 + i32.const 4 + i32.shl + local.get $4 + i32.add + i32.const 2 + i32.shl + i32.add + i32.load offset=96 + end + local.set $7 + end + local.get $7 + ) + (func $~lib/rt/tlsf/growMemory (; 8 ;) (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) + current_memory + local.set $2 + local.get $1 + 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 $2 + local.tee $4 + local.get $3 + local.tee $5 + local.get $4 + local.get $5 + i32.gt_s + select + local.set $6 + local.get $6 + grow_memory + i32.const 0 + i32.lt_s + if + local.get $3 + grow_memory + i32.const 0 + i32.lt_s + if + unreachable + end + end + current_memory + local.set $7 + local.get $0 + local.get $2 + i32.const 16 + i32.shl + local.get $7 + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + drop + ) + (func $~lib/rt/tlsf/prepareBlock (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 15 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 365 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.sub + local.set $4 + local.get $4 + i32.const 16 + i32.const 16 + i32.add + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $1 + i32.const 16 + i32.add + local.get $2 + i32.add + local.set $5 + local.get $5 + local.get $4 + i32.const 16 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $5 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const 1 + i32.const -1 + i32.xor + i32.and + i32.store + block $~lib/rt/tlsf/GETRIGHT|inlined.3 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + block $~lib/rt/tlsf/GETRIGHT|inlined.2 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + i32.load + i32.const 2 + i32.const -1 + i32.xor + i32.and + i32.store + end + ) + (func $~lib/rt/tlsf/allocateBlock (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + local.get $1 + call $~lib/rt/tlsf/prepareSize + local.set $2 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + local.get $3 + i32.eqz + if + local.get $0 + local.get $2 + call $~lib/rt/tlsf/growMemory + local.get $0 + local.get $2 + call $~lib/rt/tlsf/searchBlock + local.set $3 + local.get $3 + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 478 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + end + local.get $3 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.ge_u + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 480 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const 0 + i32.store offset=4 + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + local.get $1 + i32.store offset=12 + local.get $0 + local.get $3 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $3 + local.get $2 + call $~lib/rt/tlsf/prepareBlock + local.get $3 + ) + (func $~lib/rt/index/__rt_allocate (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + global.get $~lib/rt/tlsf/ROOT + local.set $2 + local.get $2 + i32.eqz + if + call $~lib/rt/tlsf/initializeRoot + global.get $~lib/rt/tlsf/ROOT + local.set $2 + end + local.get $2 + local.get $0 + call $~lib/rt/tlsf/allocateBlock + local.set $3 + local.get $3 + local.get $1 + i32.store offset=8 + local.get $3 + i32.const 16 + i32.add + ) + (func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + block $~lib/util/memory/memmove|inlined.0 + local.get $0 + local.get $1 + i32.eq + if + br $~lib/util/memory/memmove|inlined.0 + 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 + br $~lib/util/memory/memmove|inlined.0 + end + local.get $2 + i32.const 1 + i32.sub + local.set $2 + 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 + 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 $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|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 + br $~lib/util/memory/memmove|inlined.0 + 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 + end + ) + (func $~lib/rt/tlsf/reallocateBlock (; 13 ;) (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 $2 + call $~lib/rt/tlsf/prepareSize + local.set $3 + local.get $1 + i32.load + local.set $4 + local.get $4 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 493 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $3 + local.get $4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.le_u + if + local.get $0 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + local.get $2 + i32.store offset=12 + local.get $1 + return + end + block $~lib/rt/tlsf/GETRIGHT|inlined.4 (result i32) + local.get $1 + local.set $5 + local.get $5 + i32.const 16 + i32.add + local.get $5 + i32.load + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + end + local.set $6 + local.get $6 + i32.load + local.set $7 + local.get $7 + i32.const 1 + i32.and + if + local.get $4 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.const 16 + i32.add + local.get $7 + i32.const 3 + i32.const -1 + i32.xor + i32.and + i32.add + local.set $5 + local.get $5 + local.get $3 + i32.ge_u + if + local.get $0 + local.get $6 + call $~lib/rt/tlsf/removeBlock + local.get $1 + local.get $4 + i32.const 3 + i32.and + local.get $5 + i32.or + i32.store + local.get $1 + local.get $2 + i32.store offset=12 + local.get $0 + local.get $1 + local.get $3 + call $~lib/rt/tlsf/prepareBlock + local.get $1 + return + end + end + local.get $0 + local.get $2 + call $~lib/rt/tlsf/allocateBlock + local.set $8 + local.get $8 + local.get $1 + i32.load offset=4 + i32.store offset=4 + local.get $8 + local.get $1 + i32.load offset=8 + i32.store offset=8 + local.get $8 + i32.const 16 + i32.add + local.get $1 + i32.const 16 + i32.add + local.get $2 + call $~lib/memory/memory.copy + local.get $1 + local.get $4 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + local.get $8 + ) + (func $~lib/rt/index/__rt_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 23 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.ne + if (result i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 24 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 16 + i32.sub + local.get $1 + call $~lib/rt/tlsf/reallocateBlock + i32.const 16 + i32.add + ) + (func $~lib/rt/tlsf/freeBlock (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) + local.get $1 + i32.load + local.set $2 + local.get $2 + i32.const 1 + i32.and + i32.eqz + i32.eqz + if + i32.const 0 + i32.const 24 + i32.const 531 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.get $2 + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $1 + call $~lib/rt/tlsf/insertBlock + ) + (func $~lib/rt/index/__rt_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 31 + i32.const 13 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + i32.ne + if (result i32) + local.get $0 + i32.const 15 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 72 + i32.const 32 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/pure/increment (; 17 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $1 + i32.const 1 + i32.add + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + i32.eq + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 105 + i32.const 2 + call $~lib/builtins/abort + unreachable + end + local.get $0 + local.get $1 + i32.const 1 + i32.add + i32.store offset=4 + ) + (func $~lib/rt/index/__rt_retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/increment + end + ) + (func $~lib/rt/pure/__rt_visit_members (; 19 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + unreachable + ) + (func $~lib/rt/pure/__rt_flags (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + unreachable + ) + (func $~lib/memory/memory.allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + i32.const 0 + i32.const 168 + i32.const 61 + i32.const 9 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/rt/pure/growRoots (; 22 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/rt/pure/ROOTS + local.set $0 + global.get $~lib/rt/pure/CUR + local.get $0 + i32.sub + local.set $1 + local.get $1 + i32.const 2 + i32.mul + local.tee $2 + i32.const 64 + i32.const 2 + i32.shl + local.tee $3 + local.get $2 + local.get $3 + i32.gt_u + select + local.set $4 + local.get $4 + call $~lib/memory/memory.allocate + local.set $5 + local.get $5 + local.get $0 + local.get $1 + call $~lib/memory/memory.copy + local.get $5 + global.set $~lib/rt/pure/ROOTS + local.get $5 + local.get $1 + i32.add + global.set $~lib/rt/pure/CUR + local.get $5 + local.get $4 + i32.add + global.set $~lib/rt/pure/END + ) + (func $~lib/rt/pure/appendRoot (; 23 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + global.get $~lib/rt/pure/CUR + local.set $1 + local.get $1 + global.get $~lib/rt/pure/END + i32.ge_u + if + call $~lib/rt/pure/growRoots + global.get $~lib/rt/pure/CUR + local.set $1 + end + local.get $1 + local.get $0 + i32.store + local.get $1 + i32.const 1 + i32.add + global.set $~lib/rt/pure/CUR + ) + (func $~lib/rt/pure/decrement (; 24 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 268435455 + i32.and + local.set $2 + local.get $2 + i32.const 1 + i32.eq + if + local.get $0 + i32.const 1 + call $~lib/rt/pure/__rt_visit_members + local.get $1 + i32.const -2147483648 + i32.and + i32.eqz + if + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/freeBlock + else + local.get $0 + i32.const -2147483648 + i32.const 0 + i32.or + i32.const 0 + i32.or + i32.store offset=4 + end + else + local.get $2 + i32.const 0 + i32.gt_u + i32.eqz + if + i32.const 0 + i32.const 120 + i32.const 121 + i32.const 15 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + call $~lib/rt/pure/__rt_flags + global.get $~lib/rt/pure/ACYCLIC_FLAG + i32.and + i32.eqz + if + local.get $0 + i32.const -2147483648 + i32.const 805306368 + i32.or + local.get $2 + i32.const 1 + i32.sub + i32.or + i32.store offset=4 + local.get $1 + i32.const -2147483648 + i32.and + i32.eqz + if + local.get $0 + call $~lib/rt/pure/appendRoot + end + else + local.get $0 + local.get $1 + i32.const 268435455 + i32.const -1 + i32.xor + i32.and + local.get $2 + i32.const 1 + i32.sub + i32.or + i32.store offset=4 + end + end + ) + (func $~lib/rt/index/__rt_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + if + local.get $0 + i32.const 16 + i32.sub + call $~lib/rt/pure/decrement + end + ) + (func $~lib/rt/pure/markGray (; 26 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.ne + if + local.get $0 + local.get $1 + i32.const 1879048192 + i32.const -1 + i32.xor + i32.and + i32.const 268435456 + i32.or + i32.store offset=4 + local.get $0 + i32.const 2 + call $~lib/rt/pure/__rt_visit_members + end + ) + (func $~lib/rt/pure/scanBlack (; 27 ;) (type $FUNCSIG$vi) (param $0 i32) + local.get $0 + local.get $0 + i32.load offset=4 + i32.const 1879048192 + i32.const -1 + i32.xor + i32.and + i32.const 0 + i32.or + i32.store offset=4 + local.get $0 + i32.const 4 + call $~lib/rt/pure/__rt_visit_members + ) + (func $~lib/rt/pure/scan (; 28 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 268435456 + i32.eq + if + local.get $1 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + if + local.get $0 + call $~lib/rt/pure/scanBlack + else + local.get $0 + local.get $1 + i32.const 1879048192 + i32.const -1 + i32.xor + i32.and + i32.const 536870912 + i32.or + i32.store offset=4 + local.get $0 + i32.const 3 + call $~lib/rt/pure/__rt_visit_members + end + end + ) + (func $~lib/rt/pure/collectWhite (; 29 ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + local.get $0 + i32.load offset=4 + local.set $1 + local.get $1 + i32.const 1879048192 + i32.and + i32.const 536870912 + i32.eq + if (result i32) + local.get $1 + i32.const -2147483648 + i32.and + i32.eqz + else + i32.const 0 + end + if + local.get $0 + i32.const 5 + call $~lib/rt/pure/__rt_visit_members + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + call $~lib/rt/tlsf/freeBlock + ) + (func $~lib/rt/pure/collectCycles (; 30 ;) (type $FUNCSIG$v) + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + global.get $~lib/rt/pure/ROOTS + local.set $0 + local.get $0 + local.set $1 + block $break|0 + block + local.get $1 + local.set $2 + global.get $~lib/rt/pure/CUR + local.set $3 + end + loop $repeat|0 + local.get $2 + local.get $3 + i32.lt_u + i32.eqz + br_if $break|0 + block + local.get $2 + i32.load + local.set $4 + local.get $4 + i32.load offset=4 + local.set $5 + local.get $5 + i32.const 1879048192 + i32.and + i32.const 805306368 + i32.eq + if (result i32) + local.get $5 + i32.const 268435455 + i32.and + i32.const 0 + i32.gt_u + else + i32.const 0 + end + if + local.get $4 + call $~lib/rt/pure/markGray + local.get $1 + local.get $4 + i32.store + local.get $1 + i32.const 4 + i32.add + local.set $1 + else + local.get $5 + i32.const 1879048192 + i32.and + i32.const 0 + i32.eq + if (result i32) + local.get $5 + i32.const 268435455 + i32.and + i32.eqz + else + i32.const 0 + end + if + global.get $~lib/rt/tlsf/ROOT + local.get $4 + call $~lib/rt/tlsf/freeBlock + else + local.get $4 + local.get $5 + i32.const -2147483648 + i32.const -1 + i32.xor + i32.and + i32.store offset=4 + end + end + end + local.get $2 + i32.const 4 + i32.add + local.set $2 + br $repeat|0 + unreachable + end + unreachable + end + local.get $1 + global.set $~lib/rt/pure/CUR + block $break|1 + local.get $0 + local.set $3 + loop $repeat|1 + local.get $3 + local.get $1 + i32.lt_u + i32.eqz + br_if $break|1 + local.get $3 + i32.load + call $~lib/rt/pure/scan + local.get $3 + i32.const 4 + i32.add + local.set $3 + br $repeat|1 + unreachable + end + unreachable + end + block $break|2 + local.get $0 + local.set $3 + loop $repeat|2 + local.get $3 + local.get $1 + i32.lt_u + i32.eqz + br_if $break|2 + block + local.get $3 + i32.load + local.set $2 + local.get $2 + local.get $2 + i32.load offset=4 + i32.const -2147483648 + i32.const -1 + i32.xor + i32.and + i32.store offset=4 + local.get $2 + call $~lib/rt/pure/collectWhite + end + local.get $3 + i32.const 4 + i32.add + local.set $3 + br $repeat|2 + unreachable + end + unreachable + end + local.get $0 + global.set $~lib/rt/pure/CUR + ) + (func $~lib/rt/index/__rt_collect (; 31 ;) (type $FUNCSIG$v) + call $~lib/rt/pure/collectCycles + ) + (func $~lib/rt/common/__rt_typeinfo (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) + global.get $~lib/runtime/RTTI_BASE + local.set $1 + local.get $0 + i32.eqz + if (result i32) + i32.const 1 + else + local.get $0 + local.get $1 + i32.load + i32.gt_u + end + if (result i32) + unreachable + else + local.get $1 + local.get $0 + i32.const 8 + i32.mul + i32.add + i32.load + end + ) + (func $start (; 33 ;) (type $FUNCSIG$v) + ) + (func $null (; 34 ;) (type $FUNCSIG$v) + ) +) diff --git a/tslint.json b/tslint.json index dbd2c28b27..e075f8c784 100644 --- a/tslint.json +++ b/tslint.json @@ -7,12 +7,6 @@ "indent": { "options": ["spaces", 2] }, - "max-line-length": { - "options": [{ - "limit": 120, - "ignore-pattern": " *DiagnosticCode\\.[^ ]+,$" - }] - }, "member-access": { "options": ["no-public"] },